From 3f8f224170937d498d3a03c706494408a6b4bf1d Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Mon, 23 Apr 2012 13:47:35 -0700 Subject: Temporary fix for the PI and Stage when opening the new template. Signed-off-by: Valerio Virgillito --- js/controllers/document-controller.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'js/controllers') diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index a7aa0de6..4be0767a 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js @@ -473,7 +473,6 @@ var DocumentController = exports.DocumentController = Montage.create(Component, // Event Detail: Contains the current ActiveDocument _onOpenDocument: { value: function(doc){ - this.webTemplate = false; this.application.ninja.currentDocument = doc; this._hideCurrentDocument(); this.application.ninja.stage.stageView.hideOtherDocuments(doc.uuid); @@ -482,7 +481,11 @@ var DocumentController = exports.DocumentController = Montage.create(Component, this.activeDocument = doc; - this._showCurrentDocument(); + if(!this.webTemplate) { + this._showCurrentDocument(); + } + + this.webTemplate = false; NJevent("onOpenDocument", doc); } @@ -578,7 +581,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component, this.application.ninja.stage.stageView.showRulers(); }else{ //hide the iframe when switching to code view - document.getElementById("iframeContainer").style.display="none"; + document.getElementById("iframeContainer").style.display = "none"; } } } -- cgit v1.2.3