aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAnanya Sen2012-02-10 11:04:42 -0800
committerAnanya Sen2012-02-10 11:04:42 -0800
commit8c40940f030adb74f534c3c5ad8d845e41f09b30 (patch)
tree477ee2ae9ff0c81f269da4b34e03f2983f1edae1 /js
parent1cd0642cd26f8ae5afadea4918110bdd9f7e89b3 (diff)
downloadninja-8c40940f030adb74f534c3c5ad8d845e41f09b30.tar.gz
hide iframeContainer if we want to open code view as the first document after ninja launches
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js')
-rwxr-xr-xjs/io/document/document-controller.js9
-rwxr-xr-xjs/stage/stage-view.reel/stage-view.js2
2 files changed, 8 insertions, 3 deletions
diff --git a/js/io/document/document-controller.js b/js/io/document/document-controller.js
index 14231c64..c2a2dab6 100755
--- a/js/io/document/document-controller.js
+++ b/js/io/document/document-controller.js
@@ -68,13 +68,13 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
68 this.eventManager.addEventListener("recordStyleChanged", this, false); 68 this.eventManager.addEventListener("recordStyleChanged", this, false);
69 69
70 // Temporary testing opening a new file after Ninja has loaded 70 // Temporary testing opening a new file after Ninja has loaded
71 //this.eventManager.addEventListener("executeNewProject", this, false); 71 this.eventManager.addEventListener("executeNewProject", this, false);
72 } 72 }
73 }, 73 },
74 74
75 handleAppLoaded: { 75 handleAppLoaded: {
76 value: function() { 76 value: function() {
77 this.openDocument({"type": "html"}); 77 //this.openDocument({"type": "html"});
78 } 78 }
79 }, 79 },
80 80
@@ -402,7 +402,10 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
402 this.application.ninja.stage.restoreScroll(); 402 this.application.ninja.stage.restoreScroll();
403 this.application.ninja.stage.hideCanvas(false); 403 this.application.ninja.stage.hideCanvas(false);
404 this.application.ninja.stage.stageView.showRulers(); 404 this.application.ninja.stage.stageView.showRulers();
405 } 405 }else{
406 //hide the iframe when switching to code view
407 document.getElementById("iframeContainer").style.display="none";
408 }
406 } 409 }
407 } 410 }
408 }, 411 },
diff --git a/js/stage/stage-view.reel/stage-view.js b/js/stage/stage-view.reel/stage-view.js
index 1e85b4fd..31ace49c 100755
--- a/js/stage/stage-view.reel/stage-view.js
+++ b/js/stage/stage-view.reel/stage-view.js
@@ -113,6 +113,8 @@ exports.StageView = Montage.create(Component, {
113 this.application.ninja.stage._scrollFlag = false; // TODO HACK to prevent type error on Hide/Show Iframe 113 this.application.ninja.stage._scrollFlag = false; // TODO HACK to prevent type error on Hide/Show Iframe
114 this.application.ninja.documentController.activeDocument = doc; 114 this.application.ninja.documentController.activeDocument = doc;
115 this.application.ninja.stage.hideCanvas(true); 115 this.application.ninja.stage.hideCanvas(true);
116
117 document.getElementById("iframeContainer").style.display="none";//hide the iframe when switching to code view
116 } 118 }
117 }, 119 },
118 120