diff options
-rwxr-xr-x | js/components/layout/bread-crumb.reel/bread-crumb.js | 1 | ||||
-rwxr-xr-x | js/document/document-html.js | 24 | ||||
-rwxr-xr-x | js/document/models/base.js | 8 | ||||
-rwxr-xr-x | js/stage/stage.reel/stage.js | 14 |
4 files changed, 36 insertions, 11 deletions
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index 597577f1..cf7b0685 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js | |||
@@ -81,7 +81,6 @@ exports.Breadcrumb = Montage.create(Component, { | |||
81 | 81 | ||
82 | // This is always the top container which is now hardcoded to body | 82 | // This is always the top container which is now hardcoded to body |
83 | this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); | 83 | this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); |
84 | console.log("this works!"); | ||
85 | } | 84 | } |
86 | 85 | ||
87 | } | 86 | } |
diff --git a/js/document/document-html.js b/js/document/document-html.js index d9789cd2..89717dd6 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js | |||
@@ -32,7 +32,7 @@ exports.HtmlDocument = Montage.create(Component, { | |||
32 | }, | 32 | }, |
33 | 33 | ||
34 | exclusionList: { | 34 | exclusionList: { |
35 | value: ["HTML"] | 35 | value: ["HTML", "BODY"] |
36 | }, | 36 | }, |
37 | 37 | ||
38 | // Getters for the model. | 38 | // Getters for the model. |
@@ -46,6 +46,24 @@ exports.HtmlDocument = Montage.create(Component, { | |||
46 | } | 46 | } |
47 | }, | 47 | }, |
48 | 48 | ||
49 | isActive: { | ||
50 | get: function() { | ||
51 | return this.model._isActive; | ||
52 | }, | ||
53 | set: function(value) { | ||
54 | this.model._isActive = value; | ||
55 | } | ||
56 | }, | ||
57 | |||
58 | needsSave: { | ||
59 | get: function() { | ||
60 | return this.model._needsSave; | ||
61 | }, | ||
62 | set: function(value) { | ||
63 | this.model._needsSave = value; | ||
64 | } | ||
65 | }, | ||
66 | |||
49 | // View Properties | 67 | // View Properties |
50 | // TODO: Move those into a view object - for now dump it here | 68 | // TODO: Move those into a view object - for now dump it here |
51 | iframe: { | 69 | iframe: { |
@@ -57,6 +75,10 @@ exports.HtmlDocument = Montage.create(Component, { | |||
57 | return this._uuid; | 75 | return this._uuid; |
58 | } | 76 | } |
59 | }, | 77 | }, |
78 | |||
79 | currentView: { | ||
80 | value: "design" | ||
81 | }, | ||
60 | //////////////////////////////////////////////////////////////////// | 82 | //////////////////////////////////////////////////////////////////// |
61 | //////////////////////////////////////////////////////////////////// | 83 | //////////////////////////////////////////////////////////////////// |
62 | init: { | 84 | init: { |
diff --git a/js/document/models/base.js b/js/document/models/base.js index 8925fc40..f237e793 100755 --- a/js/document/models/base.js +++ b/js/document/models/base.js | |||
@@ -25,6 +25,14 @@ exports.BaseDocumentModel = Montage.create(Montage, { | |||
25 | _name: { | 25 | _name: { |
26 | value: null | 26 | value: null |
27 | }, | 27 | }, |
28 | |||
29 | _isActive: { | ||
30 | value: null | ||
31 | }, | ||
32 | |||
33 | _needsSave: { | ||
34 | value: null | ||
35 | }, | ||
28 | //////////////////////////////////////////////////////////////////// | 36 | //////////////////////////////////////////////////////////////////// |
29 | // | 37 | // |
30 | njdata: { | 38 | njdata: { |
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index fb7abf48..1ea14d64 100755 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js | |||
@@ -224,14 +224,6 @@ exports.Stage = Montage.create(Component, { | |||
224 | // Event details will contain the active document prior to opening a new one | 224 | // Event details will contain the active document prior to opening a new one |
225 | handleOpenDocument: { | 225 | handleOpenDocument: { |
226 | value: function(evt) { | 226 | value: function(evt) { |
227 | |||
228 | var prevActiveDocument = evt.detail; | ||
229 | // Hide current document is one is open | ||
230 | if(prevActiveDocument) { | ||
231 | prevActiveDocument.container.style["display"] = "none"; | ||
232 | if(prevActiveDocument.documentType === "htm" || prevActiveDocument.documentType === "html") this.hideCanvas(true); | ||
233 | } | ||
234 | |||
235 | this.hideCanvas(false); | 227 | this.hideCanvas(false); |
236 | 228 | ||
237 | // Recalculate the canvas sizes because of splitter resizing | 229 | // Recalculate the canvas sizes because of splitter resizing |
@@ -254,7 +246,11 @@ exports.Stage = Montage.create(Component, { | |||
254 | 246 | ||
255 | // Hardcode this value so that it does not fail for the new stage architecture | 247 | // Hardcode this value so that it does not fail for the new stage architecture |
256 | // TODO: Remove marker for old template: NINJA-STAGE-REWORK | 248 | // TODO: Remove marker for old template: NINJA-STAGE-REWORK |
257 | this.userContentBorder = 1; //parseInt(this._documentRoot.elementModel.controller.getProperty(this._documentRoot, "border")); | 249 | if(this.application.ninja.currentDocument.documentRoot.id === "UserContent") { |
250 | this.userContentBorder = 1; //parseInt(this._documentRoot.elementModel.controller.getProperty(this._documentRoot, "border")); | ||
251 | } else { | ||
252 | this.userContentBorder = 0; | ||
253 | } | ||
258 | 254 | ||
259 | this._userContentLeft = this._documentOffsetLeft - this._scrollLeft + this._userContentBorder; | 255 | this._userContentLeft = this._documentOffsetLeft - this._scrollLeft + this._userContentBorder; |
260 | this._userContentTop = this._documentOffsetTop - this._scrollTop + this._userContentBorder; | 256 | this._userContentTop = this._documentOffsetTop - this._scrollTop + this._userContentBorder; |