aboutsummaryrefslogtreecommitdiff
path: root/js/panels/PanelBase.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/PanelBase.js')
-rwxr-xr-xjs/panels/PanelBase.js40
1 files changed, 17 insertions, 23 deletions
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, {
36 /* 36 /*
37 if(this.application.ninja.settings.getSetting(this.panelName, "contentHeight")) { 37 if(this.application.ninja.settings.getSetting(this.panelName, "contentHeight")) {
38 this._contentHeight = this.application.ninja.settings.getSetting(this.panelName, "contentHeight"); 38 this._contentHeight = this.application.ninja.settings.getSetting(this.panelName, "contentHeight");
39 } else { 39 } */
40 this._contentHeight = this.defaultHeight; 40
41 }*/
42 this._contentHeight = this.defaultHeight; 41 this._contentHeight = this.defaultHeight;
43 } 42 }
44 return this._contentHeight; 43 return this._contentHeight;
45 }, 44 },
46 set: function(value) { 45 set: function(value) {
47 if (this.minHeight > value) value = this._minHeight; 46 if (this.minHeight > value) value = this._minHeight;
48 if (this.maxHeight != null) if(this.maxHeight < value) value = this.maxHeight; 47 if (this.maxHeight != null) if(this.maxHeight < value) value = this.maxHeight;
49 this._contentHeight = value; 48 this._contentHeight = value;
50// this.application.ninja.settings.setSetting(this.panelName, "contentHeight", value); 49
50 // this.application.ninja.settings.setSetting(this.panelName, "contentHeight", value);
51 } 51 }
52 }, 52 },
53 forcedCollapse: { 53 forcedCollapse: {
54 get: function() { 54 get: function() {
55 if(this._forcedCollapse == null) { 55 if(this._forcedCollapse == null) {
56 // Old settings
56 /* 57 /*
57 if(this.application.Ninja.SettingsManager.getSetting(this.panelName, "isPanelForceCollapsed")) { 58 if(this.application.Ninja.SettingsManager.getSetting(this.panelName, "isPanelForceCollapsed")) {
58 this._forcedCollapse = this.application.Ninja.SettingsManager.getSetting(this.panelName, "isPanelForceCollapsed"); 59 this._forcedCollapse = this.application.Ninja.SettingsManager.getSetting(this.panelName, "isPanelForceCollapsed");
59 } else { 60 } */
60 this._forcedCollapse = false;
61 }
62 */
63 this._forcedCollapse = false; 61 this._forcedCollapse = false;
64 } 62 }
65 return this._forcedCollapse; 63 return this._forcedCollapse;
66 }, 64 },
67 set: function(value) { 65 set: function(value) {
68 this._forcedCollapse = value; 66 this._forcedCollapse = value;
69 //this.application.Ninja.SettingsManager.setSetting(this.panelName, "isPanelForceCollapsed", value); 67
68 // this.application.Ninja.SettingsManager.setSetting(this.panelName, "isPanelForceCollapsed", value);
70 } 69 }
71 }, 70 },
72 collapsed: { 71 collapsed: {
73 get: function() { 72 get: function() {
74 if(this._collapsed == null) { 73 if(this._collapsed == null) {
74 // Old settings
75 /* 75 /*
76 if(this.application.ninja.settings.getSetting(this.panelName, "isPanelCollapsed")) { 76 if(this.application.ninja.settings.getSetting(this.panelName, "isPanelCollapsed")) {
77 this._collapsed = this.application.ninja.settings.getSetting(this.panelName, "isPanelCollapsed"); 77 this._collapsed = this.application.ninja.settings.getSetting(this.panelName, "isPanelCollapsed");
78 } else { 78 } */
79 this._collapsed = false; 79
80 }
81 */
82 this._collapsed = false; 80 this._collapsed = false;
83 } 81 }
84 return this._collapsed; 82 return this._collapsed;
85 }, 83 },
86 set: function(value) { 84 set: function(value) {
87 this._collapsed = value; 85 this._collapsed = value;
88 //this.application.ninja.settings.setSetting(this.panelName, "isPanelCollapsed", value); 86
87 // this.application.ninja.settings.setSetting(this.panelName, "isPanelCollapsed", value);
89 } 88 }
90 }, 89 },
91 visible: { 90 visible: {
@@ -95,10 +94,8 @@ exports.PanelBase = Montage.create(Component, {
95 /* 94 /*
96 if(typeof(this.application.ninja.settings.getSetting(this.panelName, "visible")) !== "undefined") { 95 if(typeof(this.application.ninja.settings.getSetting(this.panelName, "visible")) !== "undefined") {
97 this._visible = this.application.ninja.settings.getSetting(this.panelName, "visible"); 96 this._visible = this.application.ninja.settings.getSetting(this.panelName, "visible");
98 } else { 97 } */
99 this._visible = true; 98
100 }
101 */
102 this._visible = true; 99 this._visible = true;
103 100
104 } 101 }
@@ -112,7 +109,4 @@ exports.PanelBase = Montage.create(Component, {
112 109
113 } 110 }
114 } 111 }
115
116 // Methods exist in panel.js
117
118}); 112});