From f97080989ee988c1e613915c2d246dc17b104b3b Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 24 Feb 2012 13:27:33 -0800 Subject: clearing the old local setting and using the new version/prefix local settings. Signed-off-by: Valerio Virgillito --- js/panels/PanelBase.js | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'js/panels/PanelBase.js') 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, { contentHeight: { get: function() { if(this._contentHeight == null) { + // Old settings + /* if(this.application.ninja.settings.getSetting(this.panelName, "contentHeight")) { this._contentHeight = this.application.ninja.settings.getSetting(this.panelName, "contentHeight"); } else { this._contentHeight = this.defaultHeight; - } + }*/ + this._contentHeight = this.defaultHeight; } return this._contentHeight; }, @@ -44,50 +47,60 @@ exports.PanelBase = Montage.create(Component, { if (this.minHeight > value) value = this._minHeight; if (this.maxHeight != null) if(this.maxHeight < value) value = this.maxHeight; this._contentHeight = value; - this.application.ninja.settings.setSetting(this.panelName, "contentHeight", value); +// this.application.ninja.settings.setSetting(this.panelName, "contentHeight", value); } }, forcedCollapse: { get: function() { if(this._forcedCollapse == null) { + /* if(this.application.Ninja.SettingsManager.getSetting(this.panelName, "isPanelForceCollapsed")) { this._forcedCollapse = this.application.Ninja.SettingsManager.getSetting(this.panelName, "isPanelForceCollapsed"); } else { this._forcedCollapse = false; } + */ + this._forcedCollapse = false; } return this._forcedCollapse; }, set: function(value) { this._forcedCollapse = value; - this.application.Ninja.SettingsManager.setSetting(this.panelName, "isPanelForceCollapsed", value); + //this.application.Ninja.SettingsManager.setSetting(this.panelName, "isPanelForceCollapsed", value); } }, collapsed: { get: function() { if(this._collapsed == null) { + /* if(this.application.ninja.settings.getSetting(this.panelName, "isPanelCollapsed")) { this._collapsed = this.application.ninja.settings.getSetting(this.panelName, "isPanelCollapsed"); } else { this._collapsed = false; } + */ + this._collapsed = false; } return this._collapsed; }, set: function(value) { this._collapsed = value; - this.application.ninja.settings.setSetting(this.panelName, "isPanelCollapsed", value); + //this.application.ninja.settings.setSetting(this.panelName, "isPanelCollapsed", value); } }, visible: { get: function() { if(this._visible === null) { + /* if(typeof(this.application.ninja.settings.getSetting(this.panelName, "visible")) !== "undefined") { this._visible = this.application.ninja.settings.getSetting(this.panelName, "visible"); } else { this._visible = true; } + */ + this._visible = true; + } return this._visible; @@ -95,7 +108,7 @@ exports.PanelBase = Montage.create(Component, { set: function(value) { this._visible = value; - this.application.ninja.settings.setSetting(this.panelName, "visible", value); + //this.application.ninja.settings.setSetting(this.panelName, "visible", value); } } -- cgit v1.2.3 From 72baf1c366829ada6858097dd7553ee9988d6110 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 24 Feb 2012 14:43:51 -0800 Subject: removing the old settings class and disabling panel settings until the new panels are in Signed-off-by: Valerio Virgillito --- js/panels/PanelBase.js | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) (limited to 'js/panels/PanelBase.js') diff --git a/js/panels/PanelBase.js b/js/panels/PanelBase.js index 03dcd0ee..473de596 100755 --- a/js/panels/PanelBase.js +++ b/js/panels/PanelBase.js @@ -36,56 +36,55 @@ exports.PanelBase = Montage.create(Component, { /* if(this.application.ninja.settings.getSetting(this.panelName, "contentHeight")) { this._contentHeight = this.application.ninja.settings.getSetting(this.panelName, "contentHeight"); - } else { - this._contentHeight = this.defaultHeight; - }*/ + } */ + this._contentHeight = this.defaultHeight; } return this._contentHeight; }, set: function(value) { - if (this.minHeight > value) value = this._minHeight; - if (this.maxHeight != null) if(this.maxHeight < value) value = this.maxHeight; + if (this.minHeight > value) value = this._minHeight; + if (this.maxHeight != null) if(this.maxHeight < value) value = this.maxHeight; this._contentHeight = value; -// this.application.ninja.settings.setSetting(this.panelName, "contentHeight", value); + + // this.application.ninja.settings.setSetting(this.panelName, "contentHeight", value); } }, forcedCollapse: { get: function() { if(this._forcedCollapse == null) { + // Old settings /* if(this.application.Ninja.SettingsManager.getSetting(this.panelName, "isPanelForceCollapsed")) { this._forcedCollapse = this.application.Ninja.SettingsManager.getSetting(this.panelName, "isPanelForceCollapsed"); - } else { - this._forcedCollapse = false; - } - */ + } */ this._forcedCollapse = false; } return this._forcedCollapse; }, set: function(value) { this._forcedCollapse = value; - //this.application.Ninja.SettingsManager.setSetting(this.panelName, "isPanelForceCollapsed", value); + + // this.application.Ninja.SettingsManager.setSetting(this.panelName, "isPanelForceCollapsed", value); } }, collapsed: { get: function() { if(this._collapsed == null) { + // Old settings /* if(this.application.ninja.settings.getSetting(this.panelName, "isPanelCollapsed")) { this._collapsed = this.application.ninja.settings.getSetting(this.panelName, "isPanelCollapsed"); - } else { - this._collapsed = false; - } - */ + } */ + this._collapsed = false; } return this._collapsed; }, set: function(value) { this._collapsed = value; - //this.application.ninja.settings.setSetting(this.panelName, "isPanelCollapsed", value); + + // this.application.ninja.settings.setSetting(this.panelName, "isPanelCollapsed", value); } }, visible: { @@ -95,10 +94,8 @@ exports.PanelBase = Montage.create(Component, { /* if(typeof(this.application.ninja.settings.getSetting(this.panelName, "visible")) !== "undefined") { this._visible = this.application.ninja.settings.getSetting(this.panelName, "visible"); - } else { - this._visible = true; - } - */ + } */ + this._visible = true; } @@ -112,7 +109,4 @@ exports.PanelBase = Montage.create(Component, { } } - - // Methods exist in panel.js - }); -- cgit v1.2.3