aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties.reel/sections/custom-rows
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-03-09 13:36:41 -0800
committerJose Antonio Marquez2012-03-09 13:36:41 -0800
commit9a03f869ff4520431da3ac8c64b748b5fbb60339 (patch)
treedad948f012cbc7d65e0dccde273667a389ff1c6d /js/panels/properties.reel/sections/custom-rows
parentb0b4a1ee6792d98f06cbd8ecf5291e66db8a4eef (diff)
parentb4eb2f6cc1208fe5c18aa1f02a85adda25075d81 (diff)
downloadninja-9a03f869ff4520431da3ac8c64b748b5fbb60339.tar.gz
Merge branch 'refs/heads/Ninja-Internal' into Color
Diffstat (limited to 'js/panels/properties.reel/sections/custom-rows')
-rwxr-xr-xjs/panels/properties.reel/sections/custom-rows/color-select.reel/color-select.html53
-rwxr-xr-xjs/panels/properties.reel/sections/custom-rows/color-select.reel/color-select.js83
-rwxr-xr-xjs/panels/properties.reel/sections/custom-rows/dual-row.reel/dual-row.html67
-rwxr-xr-xjs/panels/properties.reel/sections/custom-rows/dual-row.reel/dual-row.js53
-rwxr-xr-xjs/panels/properties.reel/sections/custom-rows/single-row.reel/single-row.html47
-rwxr-xr-xjs/panels/properties.reel/sections/custom-rows/single-row.reel/single-row.js50
6 files changed, 353 insertions, 0 deletions
diff --git a/js/panels/properties.reel/sections/custom-rows/color-select.reel/color-select.html b/js/panels/properties.reel/sections/custom-rows/color-select.reel/color-select.html
new file mode 100755
index 00000000..58a50a0d
--- /dev/null
+++ b/js/panels/properties.reel/sections/custom-rows/color-select.reel/color-select.html
@@ -0,0 +1,53 @@
1<!DOCTYPE html>
2<!-- <copyright>
3 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
4 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
5 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
6 </copyright> -->
7<html lang="en">
8<head>
9 <script type="text/montage-serialization">
10 {
11 "owner": {
12 "module" : "js/panels/properties.reel/sections/custom-rows/color-select.reel",
13 "name" : "ColorSelect",
14 "properties" : {
15 "element" : {"#": "section"},
16 "Stroke" : {"#": "Stroke"},
17 "Fill" : {"#": "Fill"},
18 "strokeChip" : {"@": "colorChip"},
19 "fillChip" : {"@": "colorChip2"}
20 }
21 },
22
23
24 "colorChip": {
25 "module" : "js/components/ui/color-chip.reel",
26 "name" : "ColorChip",
27 "properties" : {
28 "element" : {"#": "Stroke"}
29 }
30 },
31
32 "colorChip2": {
33 "module" : "js/components/ui/color-chip.reel",
34 "name" : "ColorChip",
35 "properties" : {
36 "element" : {"#": "Fill"},
37 "mode": "fill"
38 }
39 }
40 }
41 </script>
42</head>
43<body>
44 <div id="section">
45 <section class="fieldCol">
46 <article class="fieldRow colorSelect">
47 <div id="Stroke"></div>
48 <div id="Fill"></div>
49 </article>
50 </section>
51 </div>
52</body>
53</html> \ No newline at end of file
diff --git a/js/panels/properties.reel/sections/custom-rows/color-select.reel/color-select.js b/js/panels/properties.reel/sections/custom-rows/color-select.reel/color-select.js
new file mode 100755
index 00000000..3e81ff67
--- /dev/null
+++ b/js/panels/properties.reel/sections/custom-rows/color-select.reel/color-select.js
@@ -0,0 +1,83 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7var Montage = require("montage/core/core").Montage;
8var Component = require("montage/ui/component").Component;
9
10exports.ColorSelect = Montage.create(Component, {
11
12 Stroke: {
13 value: null
14 },
15
16 Fill: {
17 value: null
18 },
19
20 strokeChip: {
21 value: null
22 },
23
24 fillChip: {
25 value: null
26 },
27
28 handleChange: {
29 value: function(e) {
30
31 }
32 },
33
34 colorVisible: {
35 value: true
36 },
37
38 color2Visible: {
39 value: true
40 },
41
42 divider: {
43 value: false
44 },
45
46 prepareForDraw: {
47 value: function() {
48 if (this.divider) {
49 this.element.appendChild(document.createElement("hr"));
50 }
51 if (!this.colorVisible) {
52 this.Stroke.style.display = "none";
53 }
54
55 if (!this.color2Visible) {
56 this.Fill.style.display = "none";
57 }
58
59// for (var i = 0; i < this.options.length; i ++ ) {
60// var tmpOption = new Option();
61// tmpOption.text = this.options[i].name;
62// tmpOption.value = this.options[i].value;
63// if (i === this.selectedIndex) tmpOption.selected = true
64// this.options[i].name = this.element.getElementsByTagName("select")[0].add(tmpOption);
65// }
66
67 }
68 },
69
70 destroy: {
71 value: function() {
72 if(this.strokeChip)
73 {
74 this.strokeChip.destroy();
75 }
76 if(this.fillChip)
77 {
78 this.fillChip.destroy();
79 }
80 }
81 }
82
83}); \ No newline at end of file
diff --git a/js/panels/properties.reel/sections/custom-rows/dual-row.reel/dual-row.html b/js/panels/properties.reel/sections/custom-rows/dual-row.reel/dual-row.html
new file mode 100755
index 00000000..be4ae431
--- /dev/null
+++ b/js/panels/properties.reel/sections/custom-rows/dual-row.reel/dual-row.html
@@ -0,0 +1,67 @@
1<!DOCTYPE html>
2<!-- <copyright>
3 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
4 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
5 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
6 </copyright> -->
7<html lang="en">
8<head>
9 <script type="text/montage-serialization">
10 {
11 "owner": {
12 "module" : "js/panels/properties.reel/sections/custom-rows/dual-row.reel",
13 "name" : "DualRow",
14 "properties" : {
15 "element" : {"#": "section"},
16 "slot" : {"@": "slot"},
17 "slot2" : {"@": "slot2"}
18 }
19 },
20 "slot": {
21 "module": "montage/ui/slot.reel",
22 "name": "Slot",
23 "properties": {
24 "element": { "#": "slotElement" }
25 },
26 "bindings": {
27 "content" : {
28 "boundObject": {"@": "owner"},
29 "boundObjectPropertyPath": "content"
30 }
31 }
32 },
33 "slot2": {
34 "module": "montage/ui/slot.reel",
35 "name": "Slot",
36 "properties": {
37 "element": { "#": "slotElement2" }
38 },
39 "bindings": {
40 "content" : {
41 "boundObject": {"@": "owner"},
42 "boundObjectPropertyPath": "content2"
43 }
44 }
45 }
46 }