aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
authorValerio Virgillito2012-02-24 13:27:33 -0800
committerValerio Virgillito2012-02-24 13:27:33 -0800
commitf97080989ee988c1e613915c2d246dc17b104b3b (patch)
treee8632f5a4537a93263658341cf5941b1baff5ca1 /js/panels
parent2b672f6508a849b8023b0bc114ad15e9ddca5adc (diff)
downloadninja-f97080989ee988c1e613915c2d246dc17b104b3b.tar.gz
clearing the old local setting and using the new version/prefix local settings.
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/panels')
-rwxr-xr-xjs/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.html2
-rwxr-xr-xjs/panels/Panel.reel/Panel.html9
-rwxr-xr-xjs/panels/Panel.reel/Panel.js4
-rwxr-xr-xjs/panels/PanelBase.js23
-rwxr-xr-xjs/panels/PanelContainer/PanelContainer.reel/PanelContainer.js8
-rwxr-xr-xjs/panels/Resizer.js14
-rwxr-xr-xjs/panels/Splitter.js4
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html2
8 files changed, 48 insertions, 18 deletions
diff --git a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.html b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.html
index db630934..98b2b61d 100755
--- a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.html
+++ b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.html
@@ -53,7 +53,7 @@
53 <div id="nj-css-stylesheet-toolbar" class="nj-css-toolbar"> 53 <div id="nj-css-stylesheet-toolbar" class="nj-css-toolbar">
54 <a href="#" id="nj-css-add-stylesheet" title="Add Stylesheet">Add Rule</a> 54 <a href="#" id="nj-css-add-stylesheet" title="Add Stylesheet">Add Rule</a>
55 </div> 55 </div>
56 <div id="subPanelResizer" class="resizer"></div> 56 <div data-montage-id="subPanelResizer" class="resizer"></div>
57 <!-- Style Rule list subsection --> 57 <!-- Style Rule list subsection -->
58 <h2 id="nj-css-styles-header" class="nj-section-header"> 58 <h2 id="nj-css-styles-header" class="nj-section-header">
59 <div id="nj-css-styles-arrow" class="panelDisclosureIcon"></div> 59 <div id="nj-css-styles-arrow" class="panelDisclosureIcon"></div>
diff --git a/js/panels/Panel.reel/Panel.html b/js/panels/Panel.reel/Panel.html
index dc76d871..46c8fb91 100755
--- a/js/panels/Panel.reel/Panel.html
+++ b/js/panels/Panel.reel/Panel.html
@@ -15,6 +15,13 @@
15 "element": {"#": "resizeBar"}, 15 "element": {"#": "resizeBar"},
16 "panel": {"#": "panel"}, 16 "panel": {"#": "panel"},
17 "isVertical": true 17 "isVertical": true
18 },
19 "bindings": {
20 "ownerId": {
21 "boundObject": {"@": "owner"},
22 "boundObjectPropertyPath": "panelBase.panelName",
23 "oneway": true
24 }
18 } 25 }
19 }, 26 },
20 27
@@ -55,7 +62,7 @@
55 </div> 62 </div>
56 </div> 63 </div>
57 </div> 64 </div>
58 <div id="resizeBar" class="resizeBar"></div> 65 <div data-montage-id="resizeBar" class="resizeBar"></div>
59</article> 66</article>
60 67
61</body> 68</body>
diff --git a/js/panels/Panel.reel/Panel.js b/js/panels/Panel.reel/Panel.js
index efa287c5..c8dd0456 100755
--- a/js/panels/Panel.reel/Panel.js
+++ b/js/panels/Panel.reel/Panel.js
@@ -188,6 +188,8 @@ exports.Panel = Montage.create(Component, {
188 //Resized Event 188 //Resized Event
189 if(typeof this.resizer.value == "number") this.panelBase.contentHeight = this.resizer.value; 189 if(typeof this.resizer.value == "number") this.panelBase.contentHeight = this.resizer.value;
190 this.resizer.element.addEventListener("mouseup",this.resized.bind(this),false); 190 this.resizer.element.addEventListener("mouseup",this.resized.bind(this),false);
191
192 this.panelContent.content = this.panelBase.content;
191 } 193 }
192 } 194 }
193 }, 195 },
@@ -226,7 +228,7 @@ exports.Panel = Montage.create(Component, {
226 else pContentDiv.style.overflow = "hidden"; 228 else pContentDiv.style.overflow = "hidden";
227 this.element.getElementsByClassName("panelTitle")[0].innerHTML = this.panelBase.panelName; 229 this.element.getElementsByClassName("panelTitle")[0].innerHTML = this.panelBase.panelName;
228 //pContentDiv.appendChild(this.panelBase.content); 230 //pContentDiv.appendChild(this.panelBase.content);
229 this.panelContent.content = this.panelBase.content; 231 //this.panelContent.content = this.panelBase.content;
230 232
231 } 233 }
232 } 234 }
diff --git a/js/panels/PanelBase.js b/js/panels/PanelBase.js
index b7b6945c..03dcd0ee 100755
--- a/js/panels/PanelBase.js
+++ b/js/panels/PanelBase.js
@@ -32,11 +32,14 @@ exports.PanelBase = Montage.create(Component, {
32 contentHeight: { 32 contentHeight: {
33 get: function() { 33 get: function() {
34 if(this._contentHeight == null) { 34 if(this._contentHeight == null) {
35 // Old settings
36 /*
35 if(this.application.ninja.settings.getSetting(this.panelName, "contentHeight")) { 37 if(this.application.ninja.settings.getSetting(this.panelName, "contentHeight")) {
36 this._contentHeight = this.application.ninja.settings.getSetting(this.panelName, "contentHeight"); 38 this._contentHeight = this.application.ninja.settings.getSetting(this.panelName, "contentHeight");
37 } else { 39 } else {
38 this._contentHeight = this.defaultHeight; 40 this._contentHeight = this.defaultHeight;
39 } 41 }*/
42 this._contentHeight = this.defaultHeight;
40 } 43 }
41 return this._contentHeight; 44 return this._contentHeight;
42 }, 45 },
@@ -44,50 +47,60 @@ exports.PanelBase = Montage.create(Component, {
44 if (this.minHeight > value) value = this._minHeight; 47 if (this.minHeight > value) value = this._minHeight;
45 if (this.maxHeight != null) if(this.maxHeight < value) value = this.maxHeight; 48 if (this.maxHeight != null) if(this.maxHeight < value) value = this.maxHeight;
46 this._contentHeight = value; 49 this._contentHeight = value;
47 this.application.ninja.settings.setSetting(this.panelName, "contentHeight", value); 50// this.application.ninja.settings.setSetting(this.panelName, "contentHeight", value);
48 } 51 }
49 }, 52 },
50 forcedCollapse: { 53 forcedCollapse: {
51 get: function() { 54 get: function() {
52 if(this._forcedCollapse == null) { 55 if(this._forcedCollapse == null) {
56 /*
53 if(this.application.Ninja.SettingsManager.getSetting(this.panelName, "isPanelForceCollapsed")) { 57 if(this.application.Ninja.SettingsManager.getSetting(this.panelName, "isPanelForceCollapsed")) {
54 this._forcedCollapse = this.application.Ninja.SettingsManager.getSetting(this.panelName, "isPanelForceCollapsed"); 58 this._forcedCollapse = this.application.Ninja.SettingsManager.getSetting(this.panelName, "isPanelForceCollapsed");
55 } else { 59 } else {
56 this._forcedCollapse = false; 60 this._forcedCollapse = false;
57 } 61 }
62 */
63 this._forcedCollapse = false;
58 } 64 }
59 return this._forcedCollapse; 65 return this._forcedCollapse;
60 }, 66 },
61 set: function(value) { 67 set: function(value) {
62 this._forcedCollapse = value; 68 this._forcedCollapse = value;
63 this.application.Ninja.SettingsManager.setSetting(this.panelName, "isPanelForceCollapsed", value); 69 //this.application.Ninja.SettingsManager.setSetting(this.panelName, "isPanelForceCollapsed", value);
64 } 70 }
65 }, 71 },
66 collapsed: { 72 collapsed: {
67 get: function() { 73 get: function() {
68 if(this._collapsed == null) { 74 if(this._collapsed == null) {
75 /*
69 if(this.application.ninja.settings.getSetting(this.panelName, "isPanelCollapsed")) { 76 if(this.application.ninja.settings.getSetting(this.panelName, "isPanelCollapsed")) {
70 this._collapsed = this.application.ninja.settings.getSetting(this.panelName, "isPanelCollapsed"); 77 this._collapsed = this.application.ninja.settings.getSetting(this.panelName, "isPanelCollapsed");
71 } else { 78 } else {
72 this._collapsed = false; 79 this._collapsed = false;
73 } 80 }
81 */
82 this._collapsed = false;
74 } 83 }
75 return this._collapsed; 84 return this._collapsed;
76 }, 85 },
77 set: function(value) { 86 set: function(value) {
78 this._collapsed = value; 87 this._collapsed = value;
79 this.application.ninja.settings.setSetting(this.panelName, "isPanelCollapsed", value); 88 //this.application.ninja.settings.setSetting(this.panelName, "isPanelCollapsed", value);
80 } 89 }
81 }, 90 },
82 visible: { 91 visible: {
83 get: function() { 92 get: function() {
84 93
85 if(this._visible === null) { 94 if(this._visible === null) {
95 /*
86 if(typeof(this.application.ninja.settings.getSetting(this.panelName, "visible")) !== "undefined") { 96 if(typeof(this.application.ninja.settings.getSetting(this.panelName, "visible")) !== "undefined") {
87 this._visible = this.application.ninja.settings.getSetting(this.panelName, "visible"); 97 this._visible = this.application.ninja.settings.getSetting(this.panelName, "visible");
88 } else { 98 } else {
89 this._visible = true; 99 this._visible = true;
90 } 100 }
101 */
102 this._visible = true;
103
91 } 104 }
92 105
93 return this._visible; 106 return this._visible;
@@ -95,7 +108,7 @@ exports.PanelBase = Montage.create(Component, {
95 set: function(value) { 108 set: function(value) {
96 this._visible = value; 109 this._visible = value;
97 110
98 this.application.ninja.settings.setSetting(this.panelName, "visible", value); 111 //this.application.ninja.settings.setSetting(this.panelName, "visible", value);
99 112
100 } 113 }
101 } 114 }
diff --git a/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js b/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js
index b8223471..bdd112c6 100755
--- a/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js
+++ b/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js
@@ -63,14 +63,16 @@ exports.PanelContainer = Montage.create(Component, {
63 value: function() { 63 value: function() {
64 //Panels Loading 64 //Panels Loading
65 this.lastOffset = this.element.offsetHeight; 65 this.lastOffset = this.element.offsetHeight;
66 /*
66 if( this.application.ninja.settings.getSetting(this.element.id, "panelOrder") != null) { 67 if( this.application.ninja.settings.getSetting(this.element.id, "panelOrder") != null) {
67 this.initPanelOrder = this.application.ninja.settings.getSetting(this.element.id, "panelOrder") 68 this.initPanelOrder = this.application.ninja.settings.getSetting(this.element.id, "panelOrder")
68 } 69 }
70 */
69 // if Panels already loaded no need to load again. 71 // if Panels already loaded no need to load again.
70 for(var i = 0; i < this.initPanelOrder.length; i++) { 72 for(var i = 0; i < this.initPanelOrder.length; i++) {
71 this.addPanel(eval(this.initPanelOrder[i])); 73 this.addPanel(eval(this.initPanelOrder[i]));
72 this.panelOrder.push(this.initPanelOrder[i]); 74 this.panelOrder.push(this.initPanelOrder[i]);
73 this.application.ninja.settings.setSetting(this.element.id, "panelOrder", this.panelOrder); 75// this.application.ninja.settings.setSetting(this.element.id, "panelOrder", this.panelOrder);
74 } 76 }
75 77