aboutsummaryrefslogtreecommitdiff
path: root/js/panels/PanelBase.js
diff options
context:
space:
mode:
authorAnanya Sen2012-02-29 14:53:13 -0800
committerAnanya Sen2012-02-29 14:53:13 -0800
commit5d4f1aad01737695238582c704e6d4f2c3a2f317 (patch)
treebf202a3432e3cfa928a57ee80d54af91b9e2509a /js/panels/PanelBase.js
parentccedeef38d6eb2e55d1782b82401828f3c99dd9c (diff)
parent551e1f2be11e9e6ab7af17816396b88aafd57dff (diff)
downloadninja-5d4f1aad01737695238582c704e6d4f2c3a2f317.tar.gz
Merge branch 'refs/heads/ninja-internal-master' into FileIO
Diffstat (limited to 'js/panels/PanelBase.js')
-rwxr-xr-xjs/panels/PanelBase.js49
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});