aboutsummaryrefslogtreecommitdiff
path: root/js/components/ui
diff options
context:
space:
mode:
Diffstat (limited to 'js/components/ui')
-rwxr-xr-xjs/components/ui/color-chip.reel/color-chip.js20
-rwxr-xr-xjs/components/ui/file-input.reel/file-input.html6
-rwxr-xr-xjs/components/ui/file-input.reel/file-input.js2
-rwxr-xr-xjs/components/ui/input-group.reel/input-group.html10
-rwxr-xr-xjs/components/ui/property-control.reel/property-control.html6
-rwxr-xr-xjs/components/ui/property-control.reel/property-control.js27
6 files changed, 40 insertions, 31 deletions
diff --git a/js/components/ui/color-chip.reel/color-chip.js b/js/components/ui/color-chip.reel/color-chip.js
index e51bdd8a..ed1ac27a 100755
--- a/js/components/ui/color-chip.reel/color-chip.js
+++ b/js/components/ui/color-chip.reel/color-chip.js
@@ -29,12 +29,20 @@ var ColorChip = exports.ColorChip = Montage.create(Component, {
29 value: 20 29 value: 20
30 }, 30 },
31 31
32 initialColor: { 32 color: {
33 value: false 33 value: {r:0, g:0, b:0, a:1, css:'rgb(0,0,0)', mode:'rgb'}
34 }, 34 },
35 35
36 changeDelegate: { 36 changeDelegate: {
37 value: null 37 value: function(event) {
38 this.color = event._event.color;
39
40 var evt = document.createEvent("CustomEvent");
41 evt.initEvent("change", true, true);
42 evt.type = "change";
43
44 this.dispatchEvent(evt);
45 }
38 }, 46 },
39 47
40 prepareForDraw: { 48 prepareForDraw: {
@@ -60,10 +68,10 @@ var ColorChip = exports.ColorChip = Montage.create(Component, {
60 value: function(evt) { 68 value: function(evt) {
61 if(this.chip) { 69 if(this.chip) {
62 // This is a single chip - Not related to the color panel -- Set the initial color if found 70 // This is a single chip - Not related to the color panel -- Set the initial color if found
63 var mode = "rgb", r = 0, g = 0, b = 0, a = 1, css = "rgb(255,0,0)"; 71 var mode = "rgb", r = 0, g = 0, b = 0, a = 1, css = "rgb(0,0,0)";
64 72
65 if(this.initialColor) { 73 if(this.color) {
66 var colorObj = this.application.ninja.colorController.getColorObjFromCss(this.initialColor); 74 var colorObj = this.application.ninja.colorController.getColorObjFromCss(this.color.css);
67 mode = colorObj.mode; 75 mode = colorObj.mode;
68 r = colorObj.value.r; 76 r = colorObj.value.r;
69 g = colorObj.value.g; 77 g = colorObj.value.g;
diff --git a/js/components/ui/file-input.reel/file-input.html b/js/components/ui/file-input.reel/file-input.html
index 5cdd8f9e..2a8546a5 100755
--- a/js/components/ui/file-input.reel/file-input.html
+++ b/js/components/ui/file-input.reel/file-input.html
@@ -11,7 +11,7 @@
11 <script type="text/montage-serialization"> 11 <script type="text/montage-serialization">
12 { 12 {
13 "owner": { 13 "owner": {
14 "module": "js/components/ui/file-input", 14 "module": "js/components/ui/file-input.reel",
15 "name": "FileInput", 15 "name": "FileInput",
16 "properties": { 16 "properties": {
17 "element": {"#": "fileInput"}, 17 "element": {"#": "fileInput"},
@@ -23,8 +23,8 @@
23 </script> 23 </script>
24</head> 24</head>
25<body> 25<body>
26 <div id="fileInput"> 26 <div id="fileInput" class="fileInput">
27 <input id="fileInputTextField" class="file-path" type="text" /> 27 <input id="fileInputTextField" class="file-path nj-skinned" type="text" />
28 <input id="fileInputControl" class="browse-button" type="file" /> 28 <input id="fileInputControl" class="browse-button" type="file" />
29 </div> 29 </div>
30</body> 30</body>
diff --git a/js/components/ui/file-input.reel/file-input.js b/js/components/ui/file-input.reel/file-input.js
index 2ea38162..b57f7c21 100755
--- a/js/components/ui/file-input.reel/file-input.js
+++ b/js/components/ui/file-input.reel/file-input.js
@@ -5,7 +5,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
5</copyright> */ 5</copyright> */
6 6
7var Montage = require("montage/core/core").Montage, 7var Montage = require("montage/core/core").Montage,
8Component = require("montage/ui/component").Component; 8 Component = require("montage/ui/component").Component;
9 9
10var FileInput = exports.FileInput = Montage.create(Component, { 10var FileInput = exports.FileInput = Montage.create(Component, {
11 11
diff --git a/js/components/ui/input-group.reel/input-group.html b/js/components/ui/input-group.reel/input-group.html
index c99e29d6..0050b8cb 100755
--- a/js/components/ui/input-group.reel/input-group.html
+++ b/js/components/ui/input-group.reel/input-group.html
@@ -11,7 +11,7 @@
11 <script type="text/montage-serialization"> 11 <script type="text/montage-serialization">
12 { 12 {
13 "eventDelegator": { 13 "eventDelegator": {
14 "module": "montage/event/action-event-listener", 14 "module": "montage/core/event/action-event-listener",
15 "name": "ActionEventListener", 15 "name": "ActionEventListener",
16 "properties": { 16 "properties": {
17 "handler": {"@": "owner"}, 17 "handler": {"@": "owner"},
@@ -19,7 +19,7 @@
19 } 19 }
20 }, 20 },
21 "propControl1": { 21 "propControl1": {
22 "module": "js/components/ui/property-control", 22 "module": "js/components/ui/property-control.reel",
23 "name": "PropertyControl", 23 "name": "PropertyControl",
24 "properties": { 24 "properties": {
25 "element": {"#": "inputPair"} 25 "element": {"#": "inputPair"}
@@ -44,7 +44,7 @@
44 ] 44 ]
45 }, 45 },
46 "propList": { 46 "propList": {
47 "module": "montage/ui/repetition", 47 "module": "montage/ui/repetition.reel",
48 "name": "Repetition", 48 "name": "Repetition",
49 "properties": { 49 "properties": {
50 "element": {"#": "inputList"} 50 "element": {"#": "inputList"}
@@ -58,7 +58,7 @@
58 } 58 }
59 }, 59 },
60 "owner": { 60 "owner": {
61 "module": "js/components/ui/input-group", 61 "module": "js/components/ui/input-group.reel",
62 "name": "InputGroup", 62 "name": "InputGroup",
63 "properties": { 63 "properties": {
64 "element": {"#": "inputRow"}, 64 "element": {"#": "inputRow"},
@@ -69,7 +69,7 @@
69 </script> 69 </script>
70</head> 70</head>
71<body> 71<body>
72 <div id="inputRow" style="-webkit-user-select: none;"> 72 <div id="inputRow" class="inputRow" style="-webkit-user-select: none;">
73 <div id="inputList"> 73 <div id="inputList">
74 <div id="inputPair"></div> 74 <div id="inputPair"></div>
75 </div> 75 </div>
diff --git a/js/components/ui/property-control.reel/property-control.html b/js/components/ui/property-control.reel/property-control.html
index 2e7c7b53..43e8e67f 100755
--- a/js/components/ui/property-control.reel/property-control.html
+++ b/js/components/ui/property-control.reel/property-control.html
@@ -11,14 +11,14 @@
11 <script type="text/montage-serialization"> 11 <script type="text/montage-serialization">
12 { 12 {
13 "substitution1": { 13 "substitution1": {
14 "module": "montage/ui/substitution", 14 "module": "montage/ui/substitution.reel",
15 "name": "Substitution", 15 "name": "Substitution",
16 "properties": { 16 "properties": {
17 "element": {"#": "propController"} 17 "element": {"#": "propController"}
18 } 18 }
19 }, 19 },
20 "owner": { 20 "owner": {
21 "module": "js/components/ui/property-control", 21 "module": "js/components/ui/property-control.reel",
22 "name": "PropertyControl", 22 "name": "PropertyControl",
23 "properties": { 23 "properties": {
24 "element": {"#": "propControl"}, 24 "element": {"#": "propControl"},
@@ -30,7 +30,7 @@
30 </script> 30 </script>
31</head> 31</head>
32<body> 32<body>
33 <div id="propControl"> 33 <div id="propControl" class="propControl">
34 <div id="propLabel" class="prop-label"></div> 34 <div id="propLabel" class="prop-label"></div>
35 <div id="propController" class="prop-controller"> 35 <div id="propController" class="prop-controller">
36 <div id="subDummy"></div> 36 <div id="subDummy"></div>
diff --git a/js/components/ui/property-control.reel/property-control.js b/js/components/ui/property-control.reel/property-control.js
index 586d2e9a..58b1be9f 100755
--- a/js/components/ui/property-control.reel/property-control.js
+++ b/js/components/ui/property-control.reel/property-control.js
@@ -6,16 +6,16 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
6 6
7var Montage = require("montage/core/core").Montage, 7var Montage = require("montage/core/core").Montage,
8 Component = require("montage/ui/component").Component, 8 Component = require("montage/ui/component").Component,
9 HotText = require("js/components/hottext").HotText, 9 HotText = require("js/components/hottext.reel").HotText,
10 HotTextUnit = require("js/components/hottextunit").HotTextUnit, 10 HotTextUnit = require("js/components/hottextunit.reel").HotTextUnit,
11 Slider = require("js/components/slider").Slider, 11 Slider = require("js/components/slider.reel").Slider,
12 Button = require("js/components/button").Button, 12 Button = require("js/components/button.reel").Button,
13 Checkbox = require("js/components/checkbox").Checkbox, 13 Checkbox = require("js/components/checkbox.reel").Checkbox,
14 Combobox = require("js/components/combobox").Combobox, 14 Combobox = require("js/components/combobox.reel").Combobox,
15 TextField = require("js/components/TextField").TextField, 15 TextField = require("js/components/TextField.reel").TextField,
16 ColorChip = require("js/components/ui/color-chip").ColorChip, 16 ColorChip = require("js/components/ui/color-chip.reel").ColorChip,
17 FileInput = require("js/components/ui/file-input").FileInput, 17 FileInput = require("js/components/ui/file-input.reel").FileInput,
18 InputGroup = require("js/components/ui/input-group").InputGroup; 18 InputGroup = require("js/components/ui/input-group.reel").InputGroup;
19 19
20var PropertyControl = exports.PropertyControl = Montage.create(Component, { 20var PropertyControl = exports.PropertyControl = Montage.create(Component, {
21 21
@@ -134,7 +134,7 @@ var PropertyControl = exports.PropertyControl = Montage.create(Component, {