diff options
Diffstat (limited to 'js/controllers')
-rwxr-xr-x | js/controllers/document-controller.js | 9 |
1 files changed, 6 insertions, 3 deletions
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, | |||
473 | // Event Detail: Contains the current ActiveDocument | 473 | // Event Detail: Contains the current ActiveDocument |
474 | _onOpenDocument: { | 474 | _onOpenDocument: { |
475 | value: function(doc){ | 475 | value: function(doc){ |
476 | this.webTemplate = false; | ||
477 | this.application.ninja.currentDocument = doc; | 476 | this.application.ninja.currentDocument = doc; |
478 | this._hideCurrentDocument(); | 477 | this._hideCurrentDocument(); |
479 | this.application.ninja.stage.stageView.hideOtherDocuments(doc.uuid); | 478 | this.application.ninja.stage.stageView.hideOtherDocuments(doc.uuid); |
@@ -482,7 +481,11 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
482 | 481 | ||
483 | this.activeDocument = doc; | 482 | this.activeDocument = doc; |
484 | 483 | ||
485 | this._showCurrentDocument(); | 484 | if(!this.webTemplate) { |
485 | this._showCurrentDocument(); | ||
486 | } | ||
487 | |||
488 | this.webTemplate = false; | ||
486 | 489 | ||
487 | NJevent("onOpenDocument", doc); | 490 | NJevent("onOpenDocument", doc); |
488 | } | 491 | } |
@@ -578,7 +581,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
578 | this.application.ninja.stage.stageView.showRulers(); | 581 | this.application.ninja.stage.stageView.showRulers(); |
579 | }else{ | 582 | }else{ |
580 | //hide the iframe when switching to code view | 583 | //hide the iframe when switching to code view |
581 | document.getElementById("iframeContainer").style.display="none"; | 584 | document.getElementById("iframeContainer").style.display = "none"; |
582 | } | 585 | } |
583 | } | 586 | } |
584 | } | 587 | } |