diff options
author | Valerio Virgillito | 2012-02-24 13:27:33 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-24 13:27:33 -0800 |
commit | f97080989ee988c1e613915c2d246dc17b104b3b (patch) | |
tree | e8632f5a4537a93263658341cf5941b1baff5ca1 /js/panels/PanelBase.js | |
parent | 2b672f6508a849b8023b0bc114ad15e9ddca5adc (diff) | |
download | ninja-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/PanelBase.js')
-rwxr-xr-x | js/panels/PanelBase.js | 23 |
1 files changed, 18 insertions, 5 deletions
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 | } |