diff options
author | Jonathan Duran | 2012-02-27 11:22:51 -0800 |
---|---|---|
committer | Jonathan Duran | 2012-02-27 11:22:51 -0800 |
commit | ab10898c78f2bd5d765d9c915848ed8c8e08c5a3 (patch) | |
tree | b1ebb87e9c101c558108e1cec043d64a03cc50a1 /js/panels | |
parent | fb8aacbadba8dffb9619eb16e4626c197dc9264d (diff) | |
parent | da60be29baab67440535b6b2b71fe7de989dfed0 (diff) | |
download | ninja-ab10898c78f2bd5d765d9c915848ed8c8e08c5a3.tar.gz |
Merge branch 'refs/heads/integration-candidate' into Timeline
Diffstat (limited to 'js/panels')
-rwxr-xr-x | js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.html | 2 | ||||
-rwxr-xr-x | js/panels/Panel.reel/Panel.html | 12 | ||||
-rwxr-xr-x | js/panels/Panel.reel/Panel.js | 4 | ||||
-rwxr-xr-x | js/panels/PanelBase.js | 49 | ||||
-rwxr-xr-x | js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js | 12 | ||||
-rwxr-xr-x | js/panels/Resizer.js | 78 | ||||
-rwxr-xr-x | js/panels/Splitter.js | 22 | ||||
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html | 2 | ||||
-rw-r--r-- | js/panels/presets/content.reel/content.js | 4 |
9 files changed, 118 insertions, 67 deletions
diff --git a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.html b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.html index db630934..98b2b61d 100755 --- a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.html +++ b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.html | |||
@@ -53,7 +53,7 @@ | |||
53 | <div id="nj-css-stylesheet-toolbar" class="nj-css-toolbar"> | 53 | <div id="nj-css-stylesheet-toolbar" class="nj-css-toolbar"> |
54 | <a href="#" id="nj-css-add-stylesheet" title="Add Stylesheet">Add Rule</a> | 54 | <a href="#" id="nj-css-add-stylesheet" title="Add Stylesheet">Add Rule</a> |
55 | </div> | 55 | </div> |
56 | <div id="subPanelResizer" class="resizer"></div> | 56 | <div data-montage-id="subPanelResizer" class="resizer"></div> |
57 | <!-- Style Rule list subsection --> | 57 | <!-- Style Rule list subsection --> |
58 | <h2 id="nj-css-styles-header" class="nj-section-header"> | 58 | <h2 id="nj-css-styles-header" class="nj-section-header"> |
59 | <div id="nj-css-styles-arrow" class="panelDisclosureIcon"></div> | 59 | <div id="nj-css-styles-arrow" class="panelDisclosureIcon"></div> |
diff --git a/js/panels/Panel.reel/Panel.html b/js/panels/Panel.reel/Panel.html index dc76d871..7556952c 100755 --- a/js/panels/Panel.reel/Panel.html +++ b/js/panels/Panel.reel/Panel.html | |||
@@ -14,7 +14,15 @@ | |||
14 | "properties": { | 14 | "properties": { |
15 | "element": {"#": "resizeBar"}, | 15 | "element": {"#": "resizeBar"}, |
16 | "panel": {"#": "panel"}, | 16 | "panel": {"#": "panel"}, |
17 | "isVertical": true | 17 | "isVertical": true, |
18 | "willSave": false | ||
19 | }, | ||
20 | "bindings": { | ||
21 | "ownerId": { | ||
22 | "boundObject": {"@": "owner"}, | ||
23 | "boundObjectPropertyPath": "panelBase.panelName", | ||
24 | "oneway": true | ||
25 | } | ||
18 | } | 26 | } |
19 | }, | 27 | }, |
20 | 28 | ||
@@ -55,7 +63,7 @@ | |||
55 | </div> | 63 | </div> |
56 | </div> | 64 | </div> |
57 | </div> | 65 | </div> |
58 | <div id="resizeBar" class="resizeBar"></div> | 66 | <div data-montage-id="resizeBar" class="resizeBar"></div> |
59 | </article> | 67 | </article> |
60 | 68 | ||
61 | </body> | 69 | </body> |
diff --git a/js/panels/Panel.reel/Panel.js b/js/panels/Panel.reel/Panel.js index efa287c5..c8dd0456 100755 --- a/js/panels/Panel.reel/Panel.js +++ b/js/panels/Panel.reel/Panel.js | |||
@@ -188,6 +188,8 @@ exports.Panel = Montage.create(Component, { | |||
188 | //Resized Event | 188 | //Resized Event |
189 | if(typeof this.resizer.value == "number") this.panelBase.contentHeight = this.resizer.value; | 189 | if(typeof this.resizer.value == "number") this.panelBase.contentHeight = this.resizer.value; |
190 | this.resizer.element.addEventListener("mouseup",this.resized.bind(this),false); | 190 | this.resizer.element.addEventListener("mouseup",this.resized.bind(this),false); |
191 | |||
192 | this.panelContent.content = this.panelBase.content; | ||
191 | } | 193 | } |
192 | } | 194 | } |
193 | }, | 195 | }, |
@@ -226,7 +228,7 @@ exports.Panel = Montage.create(Component, { | |||
226 | else pContentDiv.style.overflow = "hidden"; | 228 | else pContentDiv.style.overflow = "hidden"; |
227 | this.element.getElementsByClassName("panelTitle")[0].innerHTML = this.panelBase.panelName; | 229 | this.element.getElementsByClassName("panelTitle")[0].innerHTML = this.panelBase.panelName; |
228 | //pContentDiv.appendChild(this.panelBase.content); | 230 | //pContentDiv.appendChild(this.panelBase.content); |
229 | this.panelContent.content = this.panelBase.content; | 231 | //this.panelContent.content = this.panelBase.content; |
230 | 232 | ||
231 | } | 233 | } |
232 | } | 234 | } |
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 | }); |
diff --git a/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js b/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js index b8223471..3cbd4369 100755 --- a/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js +++ b/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js | |||
@@ -63,14 +63,19 @@ exports.PanelContainer = Montage.create(Component, { | |||
63 | value: function() { | 63 | value: function() { |
64 | //Panels Loading | 64 | //Panels Loading |
65 | this.lastOffset = this.element.offsetHeight; | 65 | this.lastOffset = this.element.offsetHeight; |
66 | |||
67 | /* Old Settings | ||
66 | if( this.application.ninja.settings.getSetting(this.element.id, "panelOrder") != null) { | 68 | if( this.application.ninja.settings.getSetting(this.element.id, "panelOrder") != null) { |
67 | this.initPanelOrder = this.application.ninja.settings.getSetting(this.element.id, "panelOrder") | 69 | this.initPanelOrder = this.application.ninja.settings.getSetting(this.element.id, "panelOrder") |
68 | } | 70 | } |
71 | */ | ||
72 | |||
69 | // if Panels already loaded no need to load again. | 73 | // if Panels already loaded no need to load again. |
70 | for(var i = 0; i < this.initPanelOrder.length; i++) { | 74 | for(var i = 0; i < this.initPanelOrder.length; i++) { |
71 | this.addPanel(eval(this.initPanelOrder[i])); |