aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormqg7342012-02-21 16:49:11 -0800
committermqg7342012-02-21 16:49:11 -0800
commitd2f4d5e5f6742d53b6324d585a700566f73c992a (patch)
tree8a3de8de6dc5ac5f6f3f0795d00a7d2d788374d7
parentabf78e2d7a97d295ce5a1c425fd359d47379137e (diff)
downloadninja-d2f4d5e5f6742d53b6324d585a700566f73c992a.tar.gz
Updated Materials Library and Materials Editor Popup to work with latest version of Montage.
We had to change our css to not use id's. Also, updated the popup to use Montage's Popup component. It looks like bump material has a bug. So loading that material results in a runtime error.
-rwxr-xr-xjs/components/textfield.reel/textfield.html2
-rwxr-xr-xjs/components/tools-properties/rect-properties.reel/rect-properties.css12
-rwxr-xr-xjs/components/tools-properties/rect-properties.reel/rect-properties.html2
-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
-rwxr-xr-xjs/panels/Materials/materials-library-panel.reel/materials-library-panel.html8
-rwxr-xr-xjs/panels/Materials/materials-library-panel.reel/materials-library-panel.js121
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.css131
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.html18
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.js47
-rwxr-xr-xjs/panels/properties/content.reel/content.js2
15 files changed, 128 insertions, 286 deletions
diff --git a/js/components/textfield.reel/textfield.html b/js/components/textfield.reel/textfield.html
index 89adf776..73defabd 100755
--- a/js/components/textfield.reel/textfield.html
+++ b/js/components/textfield.reel/textfield.html
@@ -19,6 +19,6 @@
19 </script> 19 </script>
20</head> 20</head>
21<body> 21<body>
22 <input id="textfield" class="nj-skinned" type="text"> 22 <input id="textfield" class="textfield nj-skinned" type="text">
23</body> 23</body>
24</html> \ No newline at end of file 24</html> \ No newline at end of file
diff --git a/js/components/tools-properties/rect-properties.reel/rect-properties.css b/js/components/tools-properties/rect-properties.reel/rect-properties.css
index f50a9873..6541f641 100755
--- a/js/components/tools-properties/rect-properties.reel/rect-properties.css
+++ b/js/components/tools-properties/rect-properties.reel/rect-properties.css
@@ -4,7 +4,7 @@
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. 4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */ 5 </copyright> */
6 6
7.button { 7.rectProperties .button {
8 border:none; 8 border:none;
9 cursor:default; 9 cursor:default;
10 text-align:center; 10 text-align:center;
@@ -12,28 +12,26 @@
12 opacity:0.8; 12 opacity:0.8;
13 display:table-cell; 13 display:table-cell;
14 vertical-align:middle; 14 vertical-align:middle;
15 width:100%;
16 height:100%;
17 background-color:#333333; 15 background-color:#333333;
18 color:white; 16 color:white;
19} 17}
20 18
21.button:hover 19.rectProperties .button:hover
22{ 20{
23 opacity:1; 21 opacity:1;
24} 22}
25 23
26.button:active 24.rectProperties .button:active
27{ 25{
28 outline:solid 1px black; 26 outline:solid 1px black;
29} 27}
30 28
31.button.on 29.rectProperties .button.on
32{ 30{
33 background-color: #333333; 31 background-color: #333333;
34} 32}
35 33
36.button.off 34.rectProperties .button.off
37{ 35{
38 background-color: #cccccc; 36 background-color: #cccccc;
39 color:black; 37 color:black;
diff --git a/js/components/tools-properties/rect-properties.reel/rect-properties.html b/js/components/tools-properties/rect-properties.reel/rect-properties.html
index e5c52466..214ff1d5 100755
--- a/js/components/tools-properties/rect-properties.reel/rect-properties.html
+++ b/js/components/tools-properties/rect-properties.reel/rect-properties.html
@@ -68,7 +68,7 @@
68 </head> 68 </head>
69 69
70 <body> 70 <body>
71 <div id="rectProperties"> 71 <div id="rectProperties" class="rectProperties">
72 <button id="lockButton" class="unselectable subToolButton button LockToolUp" style=" margin-left:20px"></button> 72 <button id="lockButton" class="unselectable subToolButton button LockToolUp" style=" margin-left:20px"></button>
73 <div id="TLRadiusLabel" class="unselectable subToolButton cornerRadius topLeft"></div> 73 <div id="TLRadiusLabel" class="unselectable subToolButton cornerRadius topLeft"></div>
74 <div id="TLRadiusControl" class="label"></div> 74 <div id="TLRadiusControl" class="label"></div>
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