From 8eac5582b72115969a9f915f4303535c22018033 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Wed, 2 May 2012 17:00:12 -0700 Subject: Material editor --- .../materials-library-panel.reel/materials-library-panel.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'js/panels/Materials/materials-library-panel.reel') 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 2176c6d5..205ecd90 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 @@ -51,14 +51,15 @@ exports.MaterialsLibraryPanel = Montage.create(Component, { handleNodeActivation: { value:function(obj) { - this._showMaterialPopup(obj.id); + this._showMaterialPopup({ materialId: obj.id }); } }, handleShowMaterialPopup: { enumerable: false, value: function (event) { - this._showMaterialPopup(event.detail.materialId); + //this._showMaterialPopup(event.detail.materialId); + this._showMaterialPopup(event.detail); } }, @@ -73,9 +74,9 @@ exports.MaterialsLibraryPanel = Montage.create(Component, { _showMaterialPopup: { enumerable: false, - value: function (materialID) { + value: function (materialObj) { - if(!this._materialPopup) + if(!this._materialPopup) { this._materialPopup = Popup.create(); this._materialPopup.content = this._materialInfo; @@ -84,7 +85,9 @@ exports.MaterialsLibraryPanel = Montage.create(Component, { this._materialPopup.addEventListener("show", this, false); } this._materialPopup.show(); - this._materialInfo.loadMaterials(materialID); + + materialID = materialObj.materialId; + this._materialInfo.loadMaterials(materialID, materialObj.useSelection, materialObj.whichMaterial); } }, -- cgit v1.2.3 From b7a41cbd5a30d32f524ee60e2dfdf9c65c7ec55b Mon Sep 17 00:00:00 2001 From: hwc487 Date: Tue, 12 Jun 2012 15:44:52 -0700 Subject: Disabled the add, copy, and delete buttons in the material library panel. Also removed the Custom Materials section. --- .../materials-library-panel.html | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'js/panels/Materials/materials-library-panel.reel') 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 b5d7a869..6fa54495 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 @@ -13,7 +13,8 @@ "addButton": { "prototype": "montage/ui/button.reel", "properties": { - "element": {"#": "ml_add_btn"} + "element": {"#": "ml_add_btn"}, + "enabled": false }, "listeners": [ { @@ -25,8 +26,9 @@ "copyButton": { "prototype": "montage/ui/button.reel", "properties": { - "element": {"#": "ml_copy_btn"} - }, + "element": {"#": "ml_copy_btn"}, + "enabled": false + }, "listeners": [ { "type": "action", @@ -37,8 +39,9 @@ "deleteButton": { "prototype": "montage/ui/button.reel", "properties": { - "element": {"#": "ml_delete_btn"} - }, + "element": {"#": "ml_delete_btn"}, + "enabled": false + }, "listeners": [ { "type": "action", -- cgit v1.2.3