From 9c3e71de8b49dd31c171921184c9baaa7955d586 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Russo Date: Thu, 2 Aug 2012 22:06:36 -0700 Subject: Fix: CSS issue with resizer background --- js/components/layout/document-bar.reel/document-bar.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/layout/document-bar.reel/document-bar.css b/js/components/layout/document-bar.reel/document-bar.css index 5eba72e8..2c547a22 100755 --- a/js/components/layout/document-bar.reel/document-bar.css +++ b/js/components/layout/document-bar.reel/document-bar.css @@ -33,7 +33,7 @@ POSSIBILITY OF SUCH DAMAGE. background: -webkit-radial-gradient(center, ellipse cover, rgba(100, 100, 100, .9) 40%, rgba(100, 100, 100, .4) 50%, rgba(100, 100, 100, 0) 51%), -webkit-radial-gradient(center, ellipse cover, rgba(100, 100, 100, .9) 40%, rgba(100, 100, 100, .4) 50%, rgba(100, 100, 100, 0) 51%), -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgb(60, 60, 60)), color-stop(70%, rgb(30, 30, 30)), color-stop(100%, rgb(25, 25, 25))), -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgb(10, 10, 10)), color-stop(50%, rgb(20, 20, 20)), color-stop(100%, rgb(10, 10, 10))) !important; background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat !important; background-position: 49.5% center, 50.5% center, center center, left top !important; - background-size: 5px 5px, 5px 5px, 3% 100%, 100% 100%; + background-size: 5px 5px, 5px 5px, 3% 100%, 100% 100% !important; } .documentBar { -- cgit v1.2.3 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 ++-- js/document/document-html.js | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) 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); } } }, diff --git a/js/document/document-html.js b/js/document/document-html.js index f3163339..d610c69d 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js @@ -157,6 +157,14 @@ exports.HtmlDocument = Montage.create(Component, { this.model.views.design.show(); this.model.views.design.iframe.style.opacity = 0; this.model.views.design.content = this.application.ninja.ioMediator.tmplt.parseHtmlToNinjaTemplate(doc); + // + if (!template) { + if (this.model.views.design.content.body.indexOf('Ninja-Banner Dimensions@@@') !== -1) { + dimensions = (this.model.views.design.content.body.split('Ninja-Banner Dimensions@@@'))[1].split('-->')[0].split('x'); + dimensions = {width: parseInt(dimensions[0]), height: parseInt(dimensions[1])}; + template = {type: 'banner', size: dimensions}; + } + } //TODO: Improve reference (probably through binding values) this.model.views.design._webGlHelper = this.model.webGlHelper; //Rendering design view, using observers to know when template is ready -- cgit v1.2.3