aboutsummaryrefslogtreecommitdiff
path: root/js/panels/PanelContainer.reel/PanelContainer.js
diff options
context:
space:
mode:
authorArmen Kesablyan2012-06-11 11:17:41 -0700
committerArmen Kesablyan2012-06-11 11:17:41 -0700
commit278769df00ced8620fd73371e38fe2e43f07ca3b (patch)
treedeb505c8a66b660eee1f17a2c6c4c575c7939f6f /js/panels/PanelContainer.reel/PanelContainer.js
parent555fd6efa605b937800b3979a4c68fa7eb8666ae (diff)
parent0f040acabfb7a4bf3138debec5aff869487ceb11 (diff)
downloadninja-278769df00ced8620fd73371e38fe2e43f07ca3b.tar.gz
Merge branch 'refs/heads/master' into binding
Conflicts: js/document/models/html.js js/document/views/design.js js/ninja.reel/ninja.js Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/panels/PanelContainer.reel/PanelContainer.js')
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.js41
1 files changed, 18 insertions, 23 deletions
diff --git a/js/panels/PanelContainer.reel/PanelContainer.js b/js/panels/PanelContainer.reel/PanelContainer.js
index b4f77317..82069146 100755
--- a/js/panels/PanelContainer.reel/PanelContainer.js
+++ b/js/panels/PanelContainer.reel/PanelContainer.js
@@ -16,7 +16,24 @@ exports.PanelContainer = Montage.create(Component, {
16 value: null 16 value: null
17 }, 17 },
18 18
19 // This will hold the current loaded panels. 19 _currentDocument: {
20 value : null,
21 enumerable : false
22 },
23
24 currentDocument : {
25 get : function() {
26 return this._currentDocument;
27 },
28 set : function(value) {
29 if (value === this._currentDocument) {
30 return;
31 }
32
33 this._currentDocument = value;
34 }
35 },
36
20 panels: { 37 panels: {
21 value: [] 38 value: []
22 }, 39 },
@@ -78,10 +95,6 @@ exports.PanelContainer = Montage.create(Component, {
78 } 95 }
79 96
80 this.application.localStorage.setItem("panels", this.currentPanelState); 97 this.application.localStorage.setItem("panels", this.currentPanelState);
81
82
83 this.eventManager.addEventListener( "onOpenDocument", this, false);
84 this.eventManager.addEventListener( "closeDocument", this, false);
85 } 98 }
86 }, 99 },
87 100
@@ -103,24 +116,6 @@ exports.PanelContainer = Montage.create(Component, {
103 } 116 }
104 }, 117 },
105 118
106 handleOnOpenDocument: {
107 value: function(){
108 this.panels.forEach(function(obj) {
109 obj.disabled = false;
110 });
111 }
112 },
113
114 handleCloseDocument: {
115 value: function(){
116 if(!this.application.ninja.documentController.activeDocument) {
117 this.panels.forEach(function(obj) {
118 obj.disabled = true;
119 });
120 }
121 }
122 },
123
124 handleDropped: { 119 handleDropped: {
125 value: function(e) { 120 value: function(e) {
126 var draggedIndex, droppedIndex = 0, len = this.panels.length; 121 var draggedIndex, droppedIndex = 0, len = this.panels.length;