diff options
author | Jose Antonio Marquez | 2012-02-28 13:33:45 -0800 |
---|---|---|
committer | Jose Antonio Marquez | 2012-02-28 13:33:45 -0800 |
commit | 933ed4c880128eed80bdc6372eb1dfdb23af4c37 (patch) | |
tree | 77a3d7edeefa60d9096b2b3368be11374f354b74 /js/panels/PanelBase.js | |
parent | 6af71de5b80fd531901e82b12372446b569902d8 (diff) | |
parent | 7c9291a5bab4abd849547f8878f6fb962fc88250 (diff) | |
download | ninja-933ed4c880128eed80bdc6372eb1dfdb23af4c37.tar.gz |
Merge branch 'refs/heads/NinjaInternal' into FileIO
Diffstat (limited to 'js/panels/PanelBase.js')
-rwxr-xr-x | js/panels/PanelBase.js | 49 |
1 files changed, 28 insertions, 21 deletions
diff --git a/js/panels/PanelBase.js b/js/panels/PanelBase.js index b7b6945c..473de596 100755 --- a/js/panels/PanelBase.js +++ b/js/panels/PanelBase.js | |||
@@ -32,62 +32,72 @@ 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 | } */ |
38 | this._contentHeight = this.defaultHeight; | 40 | |
39 | } | 41 | this._contentHeight = this.defaultHeight; |
40 | } | 42 | } |
41 | return this._contentHeight; | 43 | return this._contentHeight; |
42 | }, | 44 | }, |
43 | set: function(value) { | 45 | set: function(value) { |
44 | if (this.minHeight > value) value = this._minHeight; | 46 | if (this.minHeight > value) value = this._minHeight; |
45 | if (this.maxHeight != null) if(this.maxHeight < value) value = this.maxHeight; | 47 | if (this.maxHeight != null) if(this.maxHeight < value) value = this.maxHeight; |
46 | this._contentHeight = value; | 48 | this._contentHeight = value; |
47 | this.application.ninja.settings.setSetting(this.panelName, "contentHeight", value); | 49 | |
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 | // Old settings | ||
57 | /* | ||
53 | if(this.application.Ninja.SettingsManager.getSetting(this.panelName, "isPanelForceCollapsed")) { | 58 | if(this.application.Ninja.SettingsManager.getSetting(this.panelName, "isPanelForceCollapsed")) { |
54 | this._forcedCollapse = this.application.Ninja.SettingsManager.getSetting(this.panelName, "isPanelForceCollapsed"); | 59 | this._forcedCollapse = this.application.Ninja.SettingsManager.getSetting(this.panelName, "isPanelForceCollapsed"); |
55 | } else { | 60 | } */ |
56 | this._forcedCollapse = false; | 61 | this._forcedCollapse = false; |
57 | } | ||
58 | } | 62 | } |
59 | return this._forcedCollapse; | 63 | return this._forcedCollapse; |
60 | }, | 64 | }, |
61 | set: function(value) { | 65 | set: function(value) { |
62 | this._forcedCollapse = value; | 66 | this._forcedCollapse = value; |
63 | this.application.Ninja.SettingsManager.setSetting(this.panelName, "isPanelForceCollapsed", value); | 67 | |
68 | // this.application.Ninja.SettingsManager.setSetting(this.panelName, "isPanelForceCollapsed", value); | ||
64 | } | 69 | } |
65 | }, | 70 | }, |
66 | collapsed: { | 71 | collapsed: { |
67 | get: function() { | 72 | get: function() { |
68 | if(this._collapsed == null) { | 73 | if(this._collapsed == null) { |
74 | // Old settings | ||
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 | } */ |
72 | this._collapsed = false; | 79 | |
73 | } | 80 | this._collapsed = false; |
74 | } | 81 | } |
75 | return this._collapsed; | 82 | return this._collapsed; |
76 | }, | 83 | }, |
77 | set: function(value) { | 84 | set: function(value) { |
78 | this._collapsed = value; | 85 | this._collapsed = value; |
79 | this.application.ninja.settings.setSetting(this.panelName, "isPanelCollapsed", value); | 86 | |
87 | // this.application.ninja.settings.setSetting(this.panelName, "isPanelCollapsed", value); | ||
80 | } | 88 | } |
81 | }, | 89 | }, |
82 | visible: { | 90 | visible: { |
83 | get: function() { | 91 | get: function() { |
84 | 92 | ||
85 | if(this._visible === null) { | 93 | if(this._visible === null) { |
94 | /* | ||
86 | if(typeof(this.application.ninja.settings.getSetting(this.panelName, "visible")) !== "undefined") { | 95 | if(typeof(this.application.ninja.settings.getSetting(this.panelName, "visible")) !== "undefined") { |
87 | this._visible = this.application.ninja.settings.getSetting(this.panelName, "visible"); | 96 | this._visible = this.application.ninja.settings.getSetting(this.panelName, "visible"); |
88 | } else { | 97 | } */ |
89 | this._visible = true; | 98 | |
90 | } | 99 | this._visible = true; |
100 | |||
91 | } | 101 | } |
92 | 102 | ||
93 | return this._visible; | 103 | return this._visible; |
@@ -95,11 +105,8 @@ exports.PanelBase = Montage.create(Component, { | |||
95 | set: function(value) { | 105 | set: function(value) { |
96 | this._visible = value; | 106 | this._visible = value; |
97 | 107 | ||
98 | this.application.ninja.settings.setSetting(this.panelName, "visible", value); | 108 | //this.application.ninja.settings.setSetting(this.panelName, "visible", value); |
99 | 109 | ||
100 | } | 110 | } |
101 | } | 111 | } |
102 | |||
103 | // Methods exist in panel.js | ||
104 | |||
105 | }); | 112 | }); |