aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties/sections/custom-rows/color-select.reel
diff options
context:
space:
mode:
authorPierre Frisch2011-12-22 07:25:50 -0800
committerValerio Virgillito2012-01-27 11:18:17 -0800
commitb89a7ee8b956c96a1dcee995ea840feddc5d4b27 (patch)
tree0f3136ab0ecdbbbed6a83576581af0a53124d6f1 /js/panels/properties/sections/custom-rows/color-select.reel
parent2401f05d1f4b94d45e4568b81fc73e67b969d980 (diff)
downloadninja-b89a7ee8b956c96a1dcee995ea840feddc5d4b27.tar.gz
First commit of Ninja to ninja-internal
Signed-off-by: Valerio Virgillito <rmwh84@motorola.com>
Diffstat (limited to 'js/panels/properties/sections/custom-rows/color-select.reel')
-rw-r--r--js/panels/properties/sections/custom-rows/color-select.reel/color-select.html51
-rw-r--r--js/panels/properties/sections/custom-rows/color-select.reel/color-select.js62
2 files changed, 113 insertions, 0 deletions
diff --git a/js/panels/properties/sections/custom-rows/color-select.reel/color-select.html b/js/panels/properties/sections/custom-rows/color-select.reel/color-select.html
new file mode 100644
index 00000000..9c2588b9
--- /dev/null
+++ b/js/panels/properties/sections/custom-rows/color-select.reel/color-select.html
@@ -0,0 +1,51 @@
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/sections/custom-rows/color-select.reel",
13 "name" : "ColorSelect",
14 "properties" : {
15 "element" : {"#": "section"},
16 "Stroke" : {"#": "Stroke"},
17 "Fill" : {"#": "Fill"}
18 }
19 },
20
21
22 "colorChip": {
23 "module" : "js/components/ui/color-chip.reel",
24 "name" : "ColorChip",
25 "properties" : {
26 "element" : {"#": "Stroke"}
27 }
28 },
29
30 "colorChip2": {
31 "module" : "js/components/ui/color-chip.reel",
32 "name" : "ColorChip",
33 "properties" : {
34 "element" : {"#": "Fill"},
35 "mode": "fill"
36 }
37 }
38 }
39 </script>
40</head>
41<body>
42 <div id="section">
43 <section class="fieldCol">
44 <article class="fieldRow colorSelect">
45 <div id="Stroke"></div>
46 <div id="Fill"></div>
47 </article>
48 </section>
49 </div>
50</body>
51</html> \ No newline at end of file
diff --git a/js/panels/properties/sections/custom-rows/color-select.reel/color-select.js b/js/panels/properties/sections/custom-rows/color-select.reel/color-select.js
new file mode 100644
index 00000000..60f8efef
--- /dev/null
+++ b/js/panels/properties/sections/custom-rows/color-select.reel/color-select.js
@@ -0,0 +1,62 @@
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 handleChange: {
21 value: function(e) {
22
23 }
24 },
25
26 colorVisible: {
27 value: true
28 },
29
30 color2Visible: {
31 value: true
32 },
33
34 divider: {
35 value: false
36 },
37
38 prepareForDraw: {
39 value: function() {
40 if (this.divider) {
41 this.element.appendChild(document.createElement("hr"));
42 }
43 if (!this.colorVisible) {
44 this.Stroke.style.display = "none";
45 }
46
47 if (!this.color2Visible) {
48 this.Fill.style.display = "none";
49 }
50
51// for (var i = 0; i < this.options.length; i ++ ) {
52// var tmpOption = new Option();
53// tmpOption.text = this.options[i].name;
54// tmpOption.value = this.options[i].value;
55// if (i === this.selectedIndex) tmpOption.selected = true
56// this.options[i].name = this.element.getElementsByTagName("select")[0].add(tmpOption);
57// }
58
59 }
60 }
61
62}); \ No newline at end of file