diff options
author | Pierre Frisch | 2011-12-22 07:25:50 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-01-27 11:18:17 -0800 |
commit | b89a7ee8b956c96a1dcee995ea840feddc5d4b27 (patch) | |
tree | 0f3136ab0ecdbbbed6a83576581af0a53124d6f1 /js/panels/properties/sections/custom-rows/color-select.reel/color-select.js | |
parent | 2401f05d1f4b94d45e4568b81fc73e67b969d980 (diff) | |
download | ninja-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/color-select.js')
-rw-r--r-- | js/panels/properties/sections/custom-rows/color-select.reel/color-select.js | 62 |
1 files changed, 62 insertions, 0 deletions
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> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No 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 | |||
7 | var Montage = require("montage/core/core").Montage; | ||
8 | var Component = require("montage/ui/component").Component; | ||
9 | |||
10 | exports.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 | ||