aboutsummaryrefslogtreecommitdiff
path: root/js/stage
diff options
context:
space:
mode:
authorAnanya Sen2012-04-13 16:51:50 -0700
committerAnanya Sen2012-04-13 16:51:50 -0700
commitc2ec390d42945d2df1aed3f2b7ff3d1aa722fce8 (patch)
treecaff16a00963bbaef55830b406d7da212f4f74d7 /js/stage
parent6ffda1a7ebe18adb518eb24a612df22305b050a6 (diff)
downloadninja-c2ec390d42945d2df1aed3f2b7ff3d1aa722fce8.tar.gz
- code editor view options bar
- Checkbox for user to toggle between manually triggered autocomplete and automatic autocomplete - font zoom hottext Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/stage')
-rwxr-xr-xjs/stage/stage-view.reel/stage-view.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/js/stage/stage-view.reel/stage-view.js b/js/stage/stage-view.reel/stage-view.js
index bfbee2b6..c06ad988 100755
--- a/js/stage/stage-view.reel/stage-view.js
+++ b/js/stage/stage-view.reel/stage-view.js
@@ -94,6 +94,10 @@ exports.StageView = Montage.create(Component, {
94 doc.editor = this.application.ninja.codeEditorController.createEditor(doc, type); 94 doc.editor = this.application.ninja.codeEditorController.createEditor(doc, type);
95 doc.editor.hline = doc.editor.setLineClass(0, "activeline"); 95 doc.editor.hline = doc.editor.setLineClass(0, "activeline");
96 96
97 this.showCodeViewBar(true);
98
99 this.application.ninja.codeEditorController.handleCodeCompletionSupport(type);
100
97 this.application.ninja.stage._scrollFlag = false; // TODO HACK to prevent type error on Hide/Show Iframe 101 this.application.ninja.stage._scrollFlag = false; // TODO HACK to prevent type error on Hide/Show Iframe
98 this.application.ninja.documentController.activeDocument = doc; 102 this.application.ninja.documentController.activeDocument = doc;
99 this.application.ninja.stage.hideCanvas(true); 103 this.application.ninja.stage.hideCanvas(true);
@@ -112,6 +116,11 @@ exports.StageView = Montage.create(Component, {
112 116
113 if(this.application.ninja.documentController.activeDocument.currentView === "design") { 117 if(this.application.ninja.documentController.activeDocument.currentView === "design") {
114 this.application.ninja.currentDocument = this.application.ninja.documentController.activeDocument; 118 this.application.ninja.currentDocument = this.application.ninja.documentController.activeDocument;
119
120 this.showCodeViewBar(false);
121 }else{
122 this.showCodeViewBar(true);
123 this.application.ninja.codeEditorController.handleCodeCompletionSupport(this.application.ninja.documentController.activeDocument.editor.getOption("mode"));
115 } 124 }
116 125
117 this.application.ninja.stage._scrollFlag = false; // TODO HACK to prevent type error on Hide/Show Iframe 126 this.application.ninja.stage._scrollFlag = false; // TODO HACK to prevent type error on Hide/Show Iframe
@@ -162,5 +171,16 @@ exports.StageView = Montage.create(Component, {
162 this.application.ninja.rulerTop.style.display = "none"; 171 this.application.ninja.rulerTop.style.display = "none";
163 this.application.ninja.rulerLeft.style.display = "none"; 172 this.application.ninja.rulerLeft.style.display = "none";
164 } 173 }
174 },
175 showCodeViewBar:{
176 value:function(isCodeView){
177 if(isCodeView === true) {
178 this.application.ninja.editorViewOptions.element.style.display = "block";
179 this.application.ninja.documentBar.element.style.display = "none";
180 }else{
181 this.application.ninja.documentBar.element.style.display = "block";
182 this.application.ninja.editorViewOptions.element.style.display = "none";
183 }
184 }
165 } 185 }
166}); \ No newline at end of file 186}); \ No newline at end of file