diff options
author | Jose Antonio Marquez | 2012-03-21 09:51:50 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-03-21 09:51:50 -0700 |
commit | b1ba63e509f77b14c05b89ea193f4d706a28ac9b (patch) | |
tree | b6c35ce69c667f3ee8c16cc5e9a86021a4646288 /js/panels/Materials/materials-popup.reel | |
parent | 415bab69cca4e8511144407b67bec80f2ba95422 (diff) | |
parent | 9facfb41b0b0f9fab9ddc9c8473af1d1d7e1ff18 (diff) | |
download | ninja-b1ba63e509f77b14c05b89ea193f4d706a28ac9b.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into Document
Diffstat (limited to 'js/panels/Materials/materials-popup.reel')
-rwxr-xr-x | js/panels/Materials/materials-popup.reel/materials-popup.html | 8 | ||||
-rwxr-xr-x | js/panels/Materials/materials-popup.reel/materials-popup.js | 11 |
2 files changed, 11 insertions, 8 deletions
diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.html b/js/panels/Materials/materials-popup.reel/materials-popup.html index de4f98c1..34f68554 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.html +++ b/js/panels/Materials/materials-popup.reel/materials-popup.html | |||
@@ -14,7 +14,7 @@ | |||
14 | <script type="text/montage-serialization"> | 14 | <script type="text/montage-serialization"> |
15 | { | 15 | { |
16 | "okButton": { | 16 | "okButton": { |
17 | "module": "js/components/button.reel", | 17 | "module": "montage/ui/button.reel", |
18 | "name": "Button", | 18 | "name": "Button", |
19 | "properties": { | 19 | "properties": { |
20 | "element": {"#": "mp_ok_btn"}, | 20 | "element": {"#": "mp_ok_btn"}, |
@@ -22,7 +22,7 @@ | |||
22 | } | 22 | } |
23 | }, | 23 | }, |
24 | "cancelButton": { | 24 | "cancelButton": { |
25 | "module": "js/components/button.reel", | 25 | "module": "montage/ui/button.reel", |
26 | "name": "Button", | 26 | "name": "Button", |
27 | "properties": { | 27 | "properties": { |
28 | "element": {"#": "mp_cancel_btn"}, | 28 | "element": {"#": "mp_cancel_btn"}, |
@@ -111,8 +111,8 @@ | |||
111 | <hr /> | 111 | <hr /> |
112 | 112 | ||
113 | <div id="mp_buttons" class="mp_buttons"> | 113 | <div id="mp_buttons" class="mp_buttons"> |
114 | <button id="mp_cancel_btn" class="mp_cancel_btn"></button> | 114 | <button id="mp_cancel_btn" class="mp_cancel_btn nj-skinned"></button> |
115 | <button id="mp_ok_btn" class="mp_ok_btn"></button> | 115 | <button id="mp_ok_btn" class="mp_ok_btn nj-skinned"></button> |
116 | </div> | 116 | </div> |
117 | 117 | ||
118 | </div> | 118 | </div> |
diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js index c57bb2d7..b44761bc 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.js +++ b/js/panels/Materials/materials-popup.reel/materials-popup.js | |||
@@ -5,9 +5,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
5 | </copyright> */ | 5 | </copyright> */ |
6 | 6 | ||
7 | var Montage = require("montage/core/core").Montage, | 7 | var Montage = require("montage/core/core").Montage, |
8 | Component = require("montage/ui/component").Component; | 8 | Component = require("montage/ui/component").Component, |
9 | var Button = require("js/components/button.reel").Button; | 9 | MaterialsModel = require("js/models/materials-model").MaterialsModel; |
10 | var MaterialsModel = require("js/models/materials-model").MaterialsModel; | ||
11 | 10 | ||
12 | //////////////////////////////////////////////////////////////////////// | 11 | //////////////////////////////////////////////////////////////////////// |
13 | //Exporting as MaterialsPopup | 12 | //Exporting as MaterialsPopup |
@@ -215,7 +214,11 @@ exports.MaterialsPopup = Montage.create(Component, { | |||
215 | enumerable: true, | 214 | enumerable: true, |
216 | value: function(materialID) | 215 | value: function(materialID) |
217 | { | 216 | { |
218 | this._materialName = materialID; | 217 | // Note that setting Array.length = 0 will empty arrays, |
218 | // which is fine if you use getMaterialData to get a new array, but not for the | ||
219 | // dummyData arrays. | ||
220 | this._materialsData.length = 0; | ||
221 | this._materialName = materialID; | ||
219 | if( | 222 | if( |
220 | (materialID === "UberMaterial") || | 223 | (materialID === "UberMaterial") || |
221 | (materialID === "FlatMaterial") || | 224 | (materialID === "FlatMaterial") || |