aboutsummaryrefslogtreecommitdiff
path: root/js/components/ui
diff options
context:
space:
mode:
authorKruti Shah2012-05-31 10:44:45 -0700
committerKruti Shah2012-05-31 10:44:45 -0700
commitc350cc1c060fdf17357ddadce024267943784593 (patch)
tree453f86e88f1ee1dfda6fb4b7cc7b17e306e39536 /js/components/ui
parentfdc4f5c7f81ae3b9adeca2232e60268b4be594a2 (diff)
parent121d0e616f48aa7cd048763554089c20a1883d7a (diff)
downloadninja-c350cc1c060fdf17357ddadce024267943784593.tar.gz
Merge branch 'refs/heads/TimelineUberjd' into TimelineUber
Conflicts: js/panels/Timeline/Layer.reel/Layer.js Signed-off-by: Kruti Shah <kruti.shah@motorola.com>
Diffstat (limited to 'js/components/ui')
-rwxr-xr-xjs/components/ui/color-chip.reel/color-chip.css10
-rwxr-xr-xjs/components/ui/color-chip.reel/color-chip.js13
-rwxr-xr-xjs/components/ui/file-input.reel/file-input.js2
-rwxr-xr-xjs/components/ui/input-group.reel/input-group.html3
-rw-r--r--js/components/ui/label-checkbox.reel/label-checkbox.css9
-rwxr-xr-xjs/components/ui/label-checkbox.reel/label-checkbox.html54
-rwxr-xr-xjs/components/ui/label-checkbox.reel/label-checkbox.js87
-rwxr-xr-xjs/components/ui/property-control.reel/property-control.js14
8 files changed, 175 insertions, 17 deletions
diff --git a/js/components/ui/color-chip.reel/color-chip.css b/js/components/ui/color-chip.reel/color-chip.css
index da75c41e..7c7135a2 100755
--- a/js/components/ui/color-chip.reel/color-chip.css
+++ b/js/components/ui/color-chip.reel/color-chip.css
@@ -19,13 +19,3 @@
19 padding: 0; 19 padding: 0;
20 background: none; 20 background: none;
21} 21}
22
23.colortoolbar .chipContainer {
24 margin: 1px 1px 1px 1px !important;
25 width: 40px !important;
26 height: 20px !important;
27 border: 0;
28 padding: 0;
29 background-image: url(../../../../images/colorpanel/transparent.png) !important;
30 background-repeat: repeat !important;
31} \ No newline at end of file
diff --git a/js/components/ui/color-chip.reel/color-chip.js b/js/components/ui/color-chip.reel/color-chip.js
index 4e64b2e8..630dcd4b 100755
--- a/js/components/ui/color-chip.reel/color-chip.js
+++ b/js/components/ui/color-chip.reel/color-chip.js
@@ -33,6 +33,11 @@ var ColorChip = exports.ColorChip = Montage.create(Component, {
33 value: {r:0, g:0, b:0, a:1, css:'rgb(0,0,0)', mode:'rgb'} 33 value: {r:0, g:0, b:0, a:1, css:'rgb(0,0,0)', mode:'rgb'}
34 }, 34 },
35 35
36 chipBtn: {
37 serializable: true,
38 value: null
39 },
40
36 changeDelegate: { 41 changeDelegate: {
37 value: function(event) { 42 value: function(event) {
38 this.color = event._event.color; 43 this.color = event._event.color;
@@ -60,7 +65,7 @@ var ColorChip = exports.ColorChip = Montage.create(Component, {
60 this.icon.style.display = "none"; 65 this.icon.style.display = "none";
61 } 66 }
62 67
63 this.chipBtn.props = {side: 'right', align: 'top', wheel: true, palette: true, gradient: true, image: true, offset: this.offset}; 68 this.chipBtn.props = {side: 'right', align: 'top', wheel: true, palette: true, gradient: true, image: true, nocolor: true, offset: this.offset};
64 this.application.ninja.colorController.addButton(this.mode, this.chipBtn); 69 this.application.ninja.colorController.addButton(this.mode, this.chipBtn);
65 70
66 } 71 }
@@ -80,9 +85,13 @@ var ColorChip = exports.ColorChip = Montage.create(Component, {
80 b = colorObj.value.b; 85 b = colorObj.value.b;
81 a = colorObj.value.a; 86 a = colorObj.value.a;
82 css = colorObj.css; 87 css = colorObj.css;
88 this.chipBtn.color(mode, {wasSetByCode: true, type: 'change', color: {r: r, g: g, b: b}, css: css});
89 } else {
90 mode = "nocolor";
91 this.chipBtn.color(mode, null);
92
83 } 93 }
84 94
85 this.chipBtn.color(mode, {wasSetByCode: true, type: 'change', color: {r: r, g: g, b: b}, css: css});
86 this.chipBtn.addEventListener("change", this, false); 95 this.chipBtn.addEventListener("change", this, false);
87 } 96 }
88 } 97 }
diff --git a/js/components/ui/file-input.reel/file-input.js b/js/components/ui/file-input.reel/file-input.js
index b57f7c21..584380ec 100755
--- a/js/components/ui/file-input.reel/file-input.js
+++ b/js/components/ui/file-input.reel/file-input.js
@@ -38,7 +38,7 @@ var FileInput = exports.FileInput = Montage.create(Component, {
38 { 38 {
39 value:function(event) 39 value:function(event)
40 { 40 {
41 if(event.currentTarget.id === "fileInputControl") 41 if(event.currentTarget.type === "file")
42 { 42 {
43 this.filePath = this.inputField.value; 43 this.filePath = this.inputField.value;
44 } 44 }
diff --git a/js/components/ui/input-group.reel/input-group.html b/js/components/ui/input-group.reel/input-group.html
index ba85c089..7da4a855 100755
--- a/js/components/ui/input-group.reel/input-group.html
+++ b/js/components/ui/input-group.reel/input-group.html
@@ -25,7 +25,8 @@
25 "bindings": { 25 "bindings": {
26 "data": { 26 "data": {
27 "boundObject": {"@": "propList"}, 27 "boundObject": {"@": "propList"},
28 "boundObjectPropertyPath": "objectAtCurrentIteration" 28 "boundObjectPropertyPath": "objectAtCurrentIteration",
29 "oneway": true
29 } 30 }
30 }, 31 },
31 "listeners": [ 32 "listeners": [
diff --git a/js/components/ui/label-checkbox.reel/label-checkbox.css b/js/components/ui/label-checkbox.reel/label-checkbox.css
new file mode 100644
index 00000000..6eb75a0e
--- /dev/null
+++ b/js/components/ui/label-checkbox.reel/label-checkbox.css
@@ -0,0 +1,9 @@
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.label-checkbox {
8 display: inline-block;
9} \ No newline at end of file
diff --git a/js/components/ui/label-checkbox.reel/label-checkbox.html b/js/components/ui/label-checkbox.reel/label-checkbox.html
new file mode 100755
index 00000000..0efc7ae0
--- /dev/null
+++ b/js/components/ui/label-checkbox.reel/label-checkbox.html
@@ -0,0 +1,54 @@
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>
8<head>
9 <link rel="stylesheet" href="label-checkbox.css" />
10 <script type="text/montage-serialization">
11 {
12 "owner": {
13 "prototype": "js/components/ui/label-checkbox.reel",
14 "properties": {
15 "element": {"#": "labelCheckbox"},
16
17 "_checkbox": {"@": "checkbox"},
18 "_labelText": {"@": "labelText"}
19 }
20 },
21
22 "checkbox": {
23 "prototype": "montage/ui/checkbox.reel",
24 "properties": {
25 "element": {"#": "checkbox"},
26 "checked": false
27 },
28 "listeners": [
29 {
30 "type": "action",
31 "listener": {"@": "owner"},
32 "capture": false
33 }
34 ]
35 },
36
37 "labelText": {
38 "prototype": "montage/ui/dynamic-text.reel",
39 "properties": {
40 "element": {"#": "label"}
41 }
42 }
43 }
44 </script>
45</head>
46<body>
47 <!--<span data-montage-id="labelCheckbox" class="labelCheckbox">-->
48 <label data-montage-id="labelCheckbox" class="label-checkbox">
49 <input data-montage-id="checkbox" class="nj-skinned" type="checkbox">
50 <span data-montage-id="label" class="checkbox-label"></span>
51 </label>
52 <!--</span>-->
53</body>
54</html> \ No newline at end of file
diff --git a/js/components/ui/label-checkbox.reel/label-checkbox.js b/js/components/ui/label-checkbox.reel/label-checkbox.js
new file mode 100755
index 00000000..21b72cb5
--- /dev/null
+++ b/js/components/ui/label-checkbox.reel/label-checkbox.js
@@ -0,0 +1,87 @@
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.LabelCheckbox = Montage.create(Component, {
11
12 _label: {
13 value: ""
14 },
15
16 label: {
17 get: function() {
18 return this._label;
19 },
20 set: function(value) {
21 if(this._label !== value) {
22 this._label = value;
23 this.needsDraw = true;
24 }
25 }
26 },
27
28 _checked: {
29 value: false
30 },
31
32 checked: {
33 serializable: true,
34 get: function() {
35 return this._checked;
36 },
37 set: function(value) {
38 if(this._checked !== value) {
39 this._checked = value;
40 this.needsDraw = true;
41 }
42 }