From c00ba985a16ca0a229089243c6e04280cbff758c Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Mon, 6 Aug 2012 10:29:47 -0700 Subject: Fix: Added support for code/design view switching for banner templates Fixed a bug with toggling views on banner templates, I was not handling meta data correctly nor parsing the document between the switching. This is a temp fix, should be better implement when dynamic sizing is added to the templates. --- js/components/layout/document-bar.reel/document-bar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/document-bar.reel/document-bar.js b/js/components/layout/document-bar.reel/document-bar.js index 098e9e68..88c4a24b 100755 --- a/js/components/layout/document-bar.reel/document-bar.js +++ b/js/components/layout/document-bar.reel/document-bar.js @@ -246,7 +246,7 @@ exports.DocumentBar = Montage.create(Component, { file: this._currentDocument.model.file, webgl: this._currentDocument.model.webGlHelper.glData, styles: this._currentDocument.model.getStyleSheets(), - template: this._currentDocument.fileTemplate, + template: this._currentDocument.model.fileTemplate, document: this._currentDocument.model.views.design.iframe.contentWindow.document, head: this._currentDocument.model.views.design.iframe.contentWindow.document.head, body: this._currentDocument.model.views.design.iframe.contentWindow.document.body, @@ -256,7 +256,7 @@ exports.DocumentBar = Montage.create(Component, { doc = this._currentDocument.model.views.code.textArea.value; } //Reloading the document from changes made - this._currentDocument.reloadView(view, this.fileTemplate, doc); + this._currentDocument.reloadView(view, doc.template, doc); } } }, -- cgit v1.2.3