aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xjs/controllers/document-controller.js9
-rwxr-xr-xjs/panels/properties.reel/properties.js5
2 files changed, 9 insertions, 5 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 }
diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js
index d9dca538..b21014c1 100755
--- a/js/panels/properties.reel/properties.js
+++ b/js/panels/properties.reel/properties.js
@@ -73,8 +73,9 @@ exports.Properties = Montage.create(Component, {
73 73
74 this.eventManager.addEventListener( "elementChange", this, false); 74 this.eventManager.addEventListener( "elementChange", this, false);
75 75
76 // For now always assume that the stage is selected by default 76 // For now always assume that the stage is selected by default when opening the old template
77 if(this.application.ninja.selectedElements.length === 0) { 77 // TODO: Remove marker for old template: NINJA-STAGE-REWORK
78 if(this.application.ninja.selectedElements.length === 0 && this.application.ninja.currentDocument.documentRoot.nodeName.toLowerCase() !== "body") {
78 this.displayStageProperties(); 79 this.displayStageProperties();
79 } 80 }
80 } 81 }