diff options
Diffstat (limited to 'js')
-rwxr-xr-x | js/controllers/local-storage-controller.js | 42 | ||||
-rwxr-xr-x | js/ninja.reel/ninja.html | 4 | ||||
-rwxr-xr-x | js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.html | 2 | ||||
-rwxr-xr-x | js/panels/Panel.reel/Panel.html | 9 | ||||
-rwxr-xr-x | js/panels/Panel.reel/Panel.js | 4 | ||||
-rwxr-xr-x | js/panels/PanelBase.js | 23 | ||||
-rwxr-xr-x | js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js | 8 | ||||
-rwxr-xr-x | js/panels/Resizer.js | 14 | ||||
-rwxr-xr-x | js/panels/Splitter.js | 4 | ||||
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html | 2 |
10 files changed, 60 insertions, 52 deletions
diff --git a/js/controllers/local-storage-controller.js b/js/controllers/local-storage-controller.js index ea763cff..1388f3e5 100755 --- a/js/controllers/local-storage-controller.js +++ b/js/controllers/local-storage-controller.js | |||
@@ -20,20 +20,25 @@ exports.LocalStorage = Montage.create( Component, { | |||
20 | 20 | ||
21 | // Redefine setItem and getItem if local storage is not available. | 21 | // Redefine setItem and getItem if local storage is not available. |
22 | if(!this.canStore) { | 22 | if(!this.canStore) { |
23 | this._getItem = function() { | 23 | this.getItem = function() { |
24 | console.log("Local Storage is not supported on your browser"); | 24 | console.log("Local Storage is not supported on your browser"); |
25 | return ""; | 25 | return ""; |
26 | }; | 26 | }; |
27 | 27 | ||
28 | this._setItem = function() { | 28 | this.setItem = function() { |
29 | console.log("Local Storage is not supported on your browser"); | 29 | console.log("Local Storage is not supported on your browser"); |
30 | return false; | 30 | return false; |
31 | } | 31 | } |
32 | } | 32 | } |
33 | |||
34 | // Temporary clear the local storage if we find the version key | ||
35 | if(window.localStorage.version) { | ||
36 | window.localStorage.clear(); | ||
37 | } | ||
33 | } | 38 | } |
34 | }, | 39 | }, |
35 | 40 | ||
36 | _getItem: { | 41 | getItem: { |
37 | value: function(key) { | 42 | value: function(key) { |
38 | var value = window.localStorage.getItem("ninja-" + key); | 43 | var value = window.localStorage.getItem("ninja-" + key); |
39 | if(value !== null) value = JSON.parse(value); | 44 | if(value !== null) value = JSON.parse(value); |
@@ -42,38 +47,11 @@ exports.LocalStorage = Montage.create( Component, { | |||
42 | } | 47 | } |
43 | }, | 48 | }, |
44 | 49 | ||
45 | _setItem: { | 50 | setItem: { |
46 | value: function(key, value) { | 51 | value: function(key, value) { |
47 | window.localStorage.setItem("ninja-" + key, JSON.stringify(value)); | 52 | window.localStorage.setItem("ninja-" + key, JSON.stringify(value)); |
48 | } | ||
49 | }, | ||
50 | |||
51 | getItem: { | ||
52 | value: function(item) { | ||
53 | var item; | ||
54 | 53 | ||
55 | if (window.localStorage) { | 54 | return value; |
56 | item = window.localStorage.getItem(item); | ||
57 | if(item !== null) return JSON.parse(item) | ||
58 | return null; | ||
59 | } else { | ||
60 | alert("Local Storage is not supported on your browser"); | ||
61 | return null; | ||
62 | } | ||
63 | |||
64 | } | ||
65 | }, | ||
66 | |||
67 | setItem: { | ||
68 | value: function(item, value) { | ||
69 | if (window.localStorage) { | ||
70 | window.localStorage.setItem(item, JSON.stringify(value)); | ||
71 | return true; | ||
72 | } else { | ||
73 | alert("Local Storage is not supported on your browser"); | ||
74 | return false; | ||
75 | } | ||
76 | } | 55 | } |
77 | } | 56 | } |
78 | |||
79 | }); \ No newline at end of file | 57 | }); \ No newline at end of file |
diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html index 9cf27504..953e560c 100755 --- a/js/ninja.reel/ninja.html +++ b/js/ninja.reel/ninja.html | |||
@@ -374,7 +374,7 @@ | |||
374 | </section> | 374 | </section> |
375 | </section> | 375 | </section> |
376 | 376 | ||
377 | <section id="timelineResizer" class="timelineResizer resizeBar"></section> | 377 | <section data-montage-id="timelineResizer" class="timelineResizer resizeBar"></section> |
378 | <section id="breadCrumbTrail"> | 378 | <section id="breadCrumbTrail"> |
379 | <div id="breadCrumbComponent"></div> | 379 | <div id="breadCrumbComponent"></div> |
380 | </section> | 380 | </section> |
@@ -386,7 +386,7 @@ | |||
386 | </section> | 386 | </section> |
387 | </section> | 387 | </section> |
388 | 388 | ||
389 | <section id="rightPanelResizer" class="rightPanelResizer resizeBar"></section> | 389 | <section data-montage-id="rightPanelResizer" class="rightPanelResizer resizeBar"></section> |
390 | 390 | ||
391 | <section id="rightPanelContainer" class="panelContainer"> | 391 | <section id="rightPanelContainer" class="panelContainer"> |
392 | <section id="rightPanelContent"> | 392 | <section id="rightPanelContent"> |
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..46c8fb91 100755 --- a/js/panels/Panel.reel/Panel.html +++ b/js/panels/Panel.reel/Panel.html | |||
@@ -15,6 +15,13 @@ | |||
15 | "element": {"#": "resizeBar"}, | 15 | "element": {"#": "resizeBar"}, |
16 | "panel": {"#": "panel"}, | 16 | "panel": {"#": "panel"}, |
17 | "isVertical": true | 17 | "isVertical": true |
18 | }, | ||
19 | "bindings": { | ||
20 | "ownerId": { | ||
21 | "boundObject": {"@": "owner"}, | ||
22 | "boundObjectPropertyPath": "panelBase.panelName", | ||
23 | "oneway": true | ||
24 | } | ||
18 | } | 25 | } |
19 | }, | 26 | }, |
20 | 27 | ||
@@ -55,7 +62,7 @@ | |||
55 | </div> | 62 | </div> |
56 | </div> | 63 | </div> |
57 | </div> | 64 | </div> |
58 | <div id="resizeBar" class="resizeBar"></div> | 65 | <div data-montage-id="resizeBar" class="resizeBar"></div> |
59 | </article> | 66 | </article> |
60 | 67 | ||
61 | </body> | 68 | </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..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.Se |