aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Materials
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Materials')
-rwxr-xr-xjs/panels/Materials/materials-library-panel.reel/materials-library-panel.css8
-rwxr-xr-xjs/panels/Materials/materials-library-panel.reel/materials-library-panel.html42
-rwxr-xr-xjs/panels/Materials/materials-library-panel.reel/materials-library-panel.js21
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.html8
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.js5
5 files changed, 50 insertions, 34 deletions
<
diff --git a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.css b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.css
index 07488da1..fe88ebf6 100755
--- a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.css
+++ b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.css
@@ -23,7 +23,7 @@
23 width: 97%; 23 width: 97%;
24} 24}
25 25
26#ml_buttons button { 26#ml_buttons .nj-skinned{
27 height: 22px; 27 height: 22px;
28 overflow: hidden; 28 overflow: hidden;
29 display: block; 29 display: block;
@@ -31,17 +31,17 @@
31 margin: 0px 1px; 31 margin: 0px 1px;
32} 32}
33 33
34#materialsLibraryPanel-ml_add_btn { 34#ml_add_btn {
35 float: left; 35 float: left;
36 width: 60px; 36 width: 60px;
37} 37}
38 38
39#materialsLibraryPanel-ml_copy_btn { 39#ml_copy_btn {
40 float: left; 40 float: left;
41 width: 60px; 41 width: 60px;
42} 42}
43 43
44#materialsLibraryPanel-ml_delete_btn { 44#ml_delete_btn {
45 float: right; 45 float: right;
46 width: 60px; 46 width: 60px;
47} \ No newline at end of file 47} \ No newline at end of file
diff --git a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html
index 6ba4ac75..fe17d0f8 100755
--- a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html
+++ b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html
@@ -10,6 +10,42 @@
10 <link rel="stylesheet" type="text/css" href="materials-library-panel.css"> 10 <link rel="stylesheet" type="text/css" href="materials-library-panel.css">
11 <script type="text/montage-serialization"> 11 <script type="text/montage-serialization">
12 { 12 {
13 "addButton": {
14 "prototype": "montage/ui/button.reel",
15 "properties": {
16 "element": {"#": "ml_add_btn"}
17 },
18 "listeners": [
19 {
20 "type": "action",
21 "listener": {"@": "owner"}
22 }
23 ]
24 },
25 "copyButton": {
26 "prototype": "montage/ui/button.reel",
27 "properties": {
28 "element": {"#": "ml_copy_btn"}
29 },
30 "listeners": [
31 {
32 "type": "action",
33 "listener": {"@": "owner"}
34 }
35 ]
36 },
37 "deleteButton": {
38 "prototype": "montage/ui/button.reel",
39 "properties": {
40 "element": {"#": "ml_delete_btn"}
41 },
42 "listeners": [
43 {
44 "type": "action",
45 "listener": {"@": "owner"}
46 }
47 ]
48 },
13 "materialInfo": { 49 "materialInfo": {
14 "module": "js/panels/Materials/materials-popup.reel", 50 "module": "js/panels/Materials/materials-popup.reel",
15 "name": "MaterialsPopup" 51 "name": "MaterialsPopup"
@@ -34,9 +70,9 @@
34 </div> 70 </div>
35 <hr /> 71 <hr />
36 <div id="ml_buttons"> 72 <div id="ml_buttons">
37 <button id="ml_add_btn">Add</button> 73 <button id="ml_add_btn" class="nj-skinned">Add</button>
38 <button id="ml_copy_btn">Copy</button> 74 <button id="ml_copy_btn" class="nj-skinned">Copy</button>
39 <button id="ml_delete_btn">Delete</button> 75 <button id="ml_delete_btn" class="nj-skinned">Delete</button>
40 </div> 76 </div>
41 </div> 77 </div>
42 78
diff --git a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js
index b16c4376..bb550598 100755
--- a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js
+++ b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js
@@ -5,7 +5,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
5</copyright> */ 5</copyright> */
6 6
7var Tree = require("js/components/tree.reel").Tree, 7var Tree = require("js/components/tree.reel").Tree,
8 Button = require("js/components/button.reel").Button,
9 MaterialsPopup = require("js/panels/Materials/materials-popup.reel").MaterialsPopup, 8 MaterialsPopup = require("js/panels/Materials/materials-popup.reel").MaterialsPopup,
10 PopupMananger = require("js/components/popup-manager.reel").PopupMananger, 9 PopupMananger = require("js/components/popup-manager.reel").PopupMananger,
11 Popup = require("montage/ui/popup/popup.reel").Popup; 10 Popup = require("montage/ui/popup/popup.reel").Popup;
@@ -27,24 +26,6 @@ exports.MaterialsLibraryPanel = (require("montage/core/core").Montage).create(re
27 materialsTree.needsDraw = true; 26 materialsTree.needsDraw = true;
28 27
29 materialsTree.addEventListener("change", this, true); 28 materialsTree.addEventListener("change", this, true);
30
31 var addButton = Button.create();
32 addButton.element = document.getElementById("ml_add_btn");
33 addButton.label = "Add";
34 addButton.needsDraw = true;
35 addButton.addEventListener("action", this, true);
36
37 var copyButton = Button.create();
38 copyButton.element = document.getElementById("ml_copy_btn");
39 copyButton.label = "Copy";
40 copyButton.needsDraw = true;
41 copyButton.addEventListener("action", this, true);
42
43 var deleteButton = Button.create();
44 deleteButton.element = document.getElementById("ml_delete_btn");
45 deleteButton.label = "Delete";
46 deleteButton.needsDraw = true;
47 deleteButton.addEventListener("action", this, true);
48 } 29 }
49 }, 30 },
50 31
@@ -73,7 +54,7 @@ exports.MaterialsLibraryPanel = (require("montage/core/core").Montage).create(re
73 } 54 }
74 }, 55 },
75 56
76 captureAction: { 57 handleAction: {
77 value:function(event) { 58 value:function(event) {
78 switch(event._currentTarget.label) 59 switch(event._currentTarget.label)
79 { 60 {
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