aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/data/panels-data.js8
-rw-r--r--js/panels/Materials/materials-data.json5
-rwxr-xr-xjs/panels/Materials/materials-library-panel.reel/materials-library-panel.css18
-rwxr-xr-xjs/panels/Materials/materials-library-panel.reel/materials-library-panel.html25
-rwxr-xr-xjs/panels/Materials/materials-library-panel.reel/materials-library-panel.js109
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.css36
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.html26
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.js333
8 files changed, 301 insertions, 259 deletions
diff --git a/js/data/panels-data.js b/js/data/panels-data.js
index fd83d0c7..a1346ec4 100644
--- a/js/data/panels-data.js
+++ b/js/data/panels-data.js
@@ -39,12 +39,12 @@ exports.PanelsData = Montage.create(Montage, {
39 { 39 {
40 name: "Materials", 40 name: "Materials",
41 groups: ["default"], 41 groups: ["default"],
42 minHeight: 100, 42 minHeight: 270,
43 height: 100, 43 height: 270,
44 maxHeight: null, 44 maxHeight: null,
45 flexible: true, 45 flexible: false,
46 collapsed: true, 46 collapsed: true,
47 scrollable: true, 47 scrollable: false,
48 open: true, 48 open: true,
49 modulePath: "js/panels/Materials/materials-library-panel.reel", 49 modulePath: "js/panels/Materials/materials-library-panel.reel",
50 moduleName: "MaterialsLibraryPanel" 50 moduleName: "MaterialsLibraryPanel"
diff --git a/js/panels/Materials/materials-data.json b/js/panels/Materials/materials-data.json
index a5d8997b..fde82d3d 100644
--- a/js/panels/Materials/materials-data.json
+++ b/js/panels/Materials/materials-data.json
@@ -101,6 +101,11 @@
101 "id" : "Z-Invert" 101 "id" : "Z-Invert"
102 } 102 }
103 ] 103 ]
104 },
105 {
106 "label": "Custom Materials",
107 "children": [
108 ]
104 } 109 }
105 ] 110 ]
106} \ No newline at end of file 111} \ No newline at end of file
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 bed3acfe..b5d36108 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
@@ -15,6 +15,12 @@
15 margin: 4px 0 4px 0; 15 margin: 4px 0 4px 0;
16} 16}
17 17
18.materials_library_panel .ml_tree_holder {
19 height: 200px;
20 min-height: 200px;
21 max-height: 200px;
22 overflow-y: scroll;
23}
18 24
19.ml_buttons { 25.ml_buttons {
20 clear:both; 26 clear:both;
@@ -30,9 +36,19 @@
30 cursor: pointer; 36 cursor: pointer;
31 margin: 0 1px; 37 margin: 0 1px;
32 float: left; 38 float: left;
39 width: 40px;
40}
41
42.ml_buttons .ml_duplicate_btn {
33 width: 60px; 43 width: 60px;
34} 44}
35 45
36.ml_buttons .nj-skinned:last-child { 46.ml_buttons .ml_delete_btn {
47 width: 50px;
37 float: right; 48 float: right;
49}
50
51.ml_buttons .nj-skinned:hover,
52.ml_buttons .nj-skinned:active {
53 color: white;
38} \ No newline at end of file 54} \ 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 6fa54495..3adb2108 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,12 +10,12 @@
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": { 13 "duplicateButton": {
14 "prototype": "montage/ui/button.reel", 14 "prototype": "montage/ui/button.reel",
15 "properties": { 15 "properties": {
16 "element": {"#": "ml_add_btn"}, 16 "element": {"#": "ml_duplicate_btn"},
17 "enabled": false 17 "enabled": true
18 }, 18 },
19 "listeners": [ 19 "listeners": [
20 { 20 {
21 "type": "action", 21 "type": "action",
@@ -23,11 +23,10 @@
23 } 23 }
24 ] 24 ]
25 }, 25 },
26 "copyButton": { 26 "editButton": {
27 "prototype": "montage/ui/button.reel", 27 "prototype": "montage/ui/button.reel",
28 "properties": { 28 "properties": {
29 "element": {"#": "ml_copy_btn"}, 29 "element": {"#": "ml_edit_btn"}
30 "enabled": false
31 }, 30 },
32 "listeners": [ 31 "listeners": [
33 { 32 {
@@ -82,7 +81,9 @@
82 "prototype": "js/panels/Materials/materials-library-panel.reel[MaterialsLibraryPanels]", 81 "prototype": "js/panels/Materials/materials-library-panel.reel[MaterialsLibraryPanels]",
83 "properties": { 82 "properties": {
84 "element": {"#": "materials_library_panel"}, 83 "element": {"#": "materials_library_panel"},
85 "_materialInfo": {"@": "materialInfo"} 84 "_materialInfo": {"@": "materialInfo"},
85 "materialsController": {"@": "materialsController"},
86 "deleteButton": {"@": "deleteButton"}
86 } 87 }
87 } 88 }
88 } 89 }
@@ -92,14 +93,14 @@
92 <body> 93 <body>
93 94
94 <div data-montage-id="materials_library_panel" class="materials_library_panel"> 95 <div data-montage-id="materials_library_panel" class="materials_library_panel">
95 <section data-montage-id="ml_tree_holder" class="animationsLibrary"> 96 <section data-montage-id="ml_tree_holder" class="ml_tree_holder">
96 <div data-montage-id="materials_library_tree"></div> 97 <div data-montage-id="materials_library_tree"></div>
97 </section> 98 </section>
98 <hr /> 99 <hr />
99 <div data-montage-id="ml_buttons" class="ml_buttons"> 100 <div data-montage-id="ml_buttons" class="ml_buttons">
100 <button data-montage-id="ml_add_btn" class="nj-skinned">Add</button> 101 <button data-montage-id="ml_duplicate_btn" class="nj-skinned ml_duplicate_btn">Duplicate</button>
101 <button data-montage-id="ml_copy_btn" class="nj-skinned">Copy</button> 102 <button data-montage-id="ml_edit_btn" class="nj-skinned ml_edit_btn">Edit</button>
102 <button data-montage-id="ml_delete_btn" class="nj-skinned">Delete</button> 103 <button data-montage-id="ml_delete_btn" class="nj-skinned ml_delete_btn">Delete</button>
103 </div> 104 </div>
104 </div> 105 </div>
105 106
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 cf0d4e93..cd933ea6 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
@@ -7,14 +7,36 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
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 MaterialsData = require("js/panels/Materials/materials-data.json"), 9 MaterialsData = require("js/panels/Materials/materials-data.json"),
10 Popup = require("montage/ui/popup/popup.reel").Popup; 10 Popup = require("montage/ui/popup/popup.reel").Popup,
11 MaterialsModel = require("js/models/materials-model").MaterialsModel,
12 LeafNode = require("js/components/treeview/ninja-leaf.reel").Leaf;
11 13
12exports.MaterialsLibraryPanel = Montage.create(Component, { 14exports.MaterialsLibraryPanel = Montage.create(Component, {
13 15
16 deleteButton: {
17 value: null
18 },
19
14 materialsData: { 20 materialsData: {
15 value: null 21 value: null
16 }, 22 },
17 23
24 materialId: {
25 value: null
26 },
27
28 selectedMaterialNode: {
29 value: null
30 },
31
32 customMaterialsBranch: {
33 value: null
34 },
35
36 customMaterialsCounter: {
37