From c80e7df1702dff09b5cc8447ab0619747fed2024 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Fri, 11 May 2012 15:03:10 -0700 Subject: created the initial environment requirements for workspace to be manipulated. Signed-off-by: Armen Kesablyan --- js/panels/Panel.reel/Panel.js | 10 +++++++++ js/panels/PanelContainer.reel/PanelContainer.html | 20 ++++++++++++++++- js/panels/PanelContainer.reel/PanelContainer.js | 16 ++++++++++++++ js/panels/binding.reel/binding.css | 0 js/panels/binding.reel/binding.html | 27 +++++++++++++++++++++++ js/panels/binding.reel/binding.js | 11 +++++++++ js/panels/objects.reel/objects.css | 0 js/panels/objects.reel/objects.html | 27 +++++++++++++++++++++++ js/panels/objects.reel/objects.js | 7 ++++++ 9 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 js/panels/binding.reel/binding.css create mode 100644 js/panels/binding.reel/binding.html create mode 100644 js/panels/binding.reel/binding.js create mode 100644 js/panels/objects.reel/objects.css create mode 100644 js/panels/objects.reel/objects.html create mode 100644 js/panels/objects.reel/objects.js (limited to 'js/panels') diff --git a/js/panels/Panel.reel/Panel.js b/js/panels/Panel.reel/Panel.js index 613bef4b..bd9b4e2f 100755 --- a/js/panels/Panel.reel/Panel.js +++ b/js/panels/Panel.reel/Panel.js @@ -13,6 +13,10 @@ exports.Panel = Montage.create(Component, { value: "Panel" }, + groups: { + value: [] + }, + _collapsed: { value: false }, @@ -119,6 +123,12 @@ exports.Panel = Montage.create(Component, { this.application.ninja.colorController.colorView = this.application.ninja.colorController.colorPanelBase.create(); } + if(this.groups) { + this.groups.forEach(function(className) { + this.element.classList.add(className); + }.bind(this)); + } + if(this.modulePath && this.moduleName) { // Load the slot content var that = this; diff --git a/js/panels/PanelContainer.reel/PanelContainer.html b/js/panels/PanelContainer.reel/PanelContainer.html index ccefd3ae..f1d1a855 100755 --- a/js/panels/PanelContainer.reel/PanelContainer.html +++ b/js/panels/PanelContainer.reel/PanelContainer.html @@ -62,6 +62,20 @@ } }, + "panel_7": { + "prototype": "js/panels/Panel.reel", + "properties": { + "element": {"#": "panel_7"} + } + }, + + "panel_8": { + "prototype": "js/panels/Panel.reel", + "properties": { + "element": {"#": "panel_8"} + } + }, + "owner": { "prototype": "js/panels/PanelContainer.reel", "properties": { @@ -73,7 +87,9 @@ "panel_3": {"@": "panel_3"}, "panel_4": {"@": "panel_4"}, "panel_5": {"@": "panel_5"}, - "panel_6": {"@": "panel_6"} + "panel_6": {"@": "panel_6"}, + "panel_7": {"@": "panel_7"}, + "panel_8": {"@": "panel_8"} }, "listeners": [ { @@ -104,6 +120,8 @@
+
+
diff --git a/js/panels/PanelContainer.reel/PanelContainer.js b/js/panels/PanelContainer.reel/PanelContainer.js index 8d1d6a5e..044fd598 100755 --- a/js/panels/PanelContainer.reel/PanelContainer.js +++ b/js/panels/PanelContainer.reel/PanelContainer.js @@ -21,6 +21,18 @@ exports.PanelContainer = Montage.create(Component, { value: [] }, + panelsAvailable: { + value: function() { + var pAvail = []; + this.panels.forEach(function(obj) { + if (window.getComputedStyle(obj.element).display !== "none") { + pAvail.push(obj); + } + }); + return pAvail; + } + }, + currentPanelState: { value: {} }, @@ -49,6 +61,8 @@ exports.PanelContainer = Montage.create(Component, { this['panel_'+i].modulePath = p.modulePath; this['panel_'+i].moduleName = p.moduleName; this['panel_'+i].disabled = true; + this['panel_'+i].groups = p.groups; + this.currentPanelState[p.name] = {}; this.currentPanelState.version = "1.0"; @@ -144,6 +158,7 @@ exports.PanelContainer = Montage.create(Component, { _setPanelsSizes: { value: function(panelActivated) { + this.panelsAvailable(); var len = this.panels.length, setLocked = true; for(var i = 0; i < len; i++) { @@ -160,6 +175,7 @@ exports.PanelContainer = Montage.create(Component, { _redrawPanels: { value: function(panelActivated, unlockPanels) { var maxHeight = this.element.offsetHeight, setLocked = true; + var availablePanels = this.panelsAvailable(); var len = this.panels.length; if(unlockPanels === true) { diff --git a/js/panels/binding.reel/binding.css b/js/panels/binding.reel/binding.css new file mode 100644 index 00000000..e69de29b diff --git a/js/panels/binding.reel/binding.html b/js/panels/binding.reel/binding.html new file mode 100644 index 00000000..50e839ab --- /dev/null +++ b/js/panels/binding.reel/binding.html @@ -0,0 +1,27 @@ + + + + + + + + + +
+
+ + \ No newline at end of file diff --git a/js/panels/binding.reel/binding.js b/js/panels/binding.reel/binding.js new file mode 100644 index 00000000..e9676c4d --- /dev/null +++ b/js/panels/binding.reel/binding.js @@ -0,0 +1,11 @@ +var Montage = require("montage/core/core").Montage, + PanelBase = require("js/panels/panelbase").PanelBase; +//////////////////////////////////////////////////////////////////////// +//Exporting as ColorPanel +exports.BindingPanel = Montage.create(PanelBase, { + //////////////////////////////////////////////////////////////////// + //Panel Configuration + panelName: { + value: "Color" + } +}); \ No newline at end of file diff --git a/js/panels/objects.reel/objects.css b/js/panels/objects.reel/objects.css new file mode 100644 index 00000000..e69de29b diff --git a/js/panels/objects.reel/objects.html b/js/panels/objects.reel/objects.html new file mode 100644 index 00000000..b21097e7 --- /dev/null +++ b/js/panels/objects.reel/objects.html @@ -0,0 +1,27 @@ + + + + + + + + + +
+
+ + \ No newline at end of file diff --git a/js/panels/objects.reel/objects.js b/js/panels/objects.reel/objects.js new file mode 100644 index 00000000..c1451cc0 --- /dev/null +++ b/js/panels/objects.reel/objects.js @@ -0,0 +1,7 @@ +var Montage = require("montage/core/core").Montage, + PanelBase = require("js/panels/panelbase").PanelBase; +//////////////////////////////////////////////////////////////////////// +//Exporting as ColorPanel +exports.ObjectsPanel = Montage.create(PanelBase, { + +}); \ No newline at end of file -- cgit v1.2.3