aboutsummaryrefslogtreecommitdiff
path: root/js/document
diff options
context:
space:
mode:
Diffstat (limited to 'js/document')
-rwxr-xr-xjs/document/models/text.js4
-rwxr-xr-xjs/document/views/code.js54
2 files changed, 16 insertions, 42 deletions
diff --git a/js/document/models/text.js b/js/document/models/text.js
index fe02953c..d1252b7d 100755
--- a/js/document/models/text.js
+++ b/js/document/models/text.js
@@ -60,8 +60,8 @@ exports.TextDocumentModel = Montage.create(BaseDocumentModel, {
60 } 60 }
61 // 61 //
62 this.parentContainer.removeChild(this.views.code.textViewContainer); 62 this.parentContainer.removeChild(this.views.code.textViewContainer);
63 this.views.code.restoreAllPanels(); 63 this.application.ninja.stage.showCodeViewBar(false);
64 this.views.code.showCodeViewBar(false); 64 this.application.ninja.stage.restoreAllPanels();
65 this.views.code = null; 65 this.views.code = null;
66 66
67 // 67 //
diff --git a/js/document/views/code.js b/js/document/views/code.js
index 711479a8..66d1c702 100755
--- a/js/document/views/code.js
+++ b/js/document/views/code.js
@@ -140,56 +140,30 @@ var CodeDocumentView = exports.CodeDocumentView = Montage.create(BaseDocumentVie
140 }, 140 },
141 //////////////////////////////////////////////////////////////////// 141 ////////////////////////////////////////////////////////////////////
142 // 142 //
143 143 show: {
144 showRulers:{ 144 value: function (callback) {
145 value:function(){ 145 this.textViewContainer.style.display = "block";
146 this.application.ninja.rulerTop.style.display = "block"; 146 //
147 this.application.ninja.rulerLeft.style.display = "block"; 147 if (callback) callback();
148 }
149 },
150 hideRulers:{
151 value:function(){
152 this.application.ninja.rulerTop.style.display = "none";
153 this.application.ninja.rulerLeft.style.display = "none";
154 }
155 },
156 showCodeViewBar:{
157 value:function(isCodeView){
158 if(isCodeView === true) {
159 this.application.ninja.editorViewOptions.element.style.display = "block";
160 this.application.ninja.documentBar.element.style.display = "none";
161 } else {
162 this.application.ninja.documentBar.element.style.display = "block";
163 this.application.ninja.editorViewOptions.element.style.display = "none";
164 }
165 }
166 },
167
168 collapseAllPanels:{
169 value:function(){
170 this.application.ninja.panelSplitter.collapse();
171 this.application.ninja.timelineSplitter.collapse();
172 this.application.ninja.toolsSplitter.collapse();
173 this.application.ninja.optionsSplitter.collapse();
174 } 148 }
175 }, 149 },
176 restoreAllPanels:{ 150 ////////////////////////////////////////////////////////////////////
177 value:function(){ 151 //
178 this.application.ninja.panelSplitter.restore(); 152 hide: {
179 this.application.ninja.timelineSplitter.restore(); 153 value: function (callback) {
180 this.application.ninja.toolsSplitter.restore(); 154 this.textViewContainer.style.display = "none";
181 this.application.ninja.optionsSplitter.restore(); 155 //
156 if (callback) callback();
182 } 157 }
183 }, 158 },
184 159 ////////////////////////////////////////////////////////////////////
160 //
185 applyTheme:{ 161 applyTheme:{
186 value:function(themeClass){ 162 value:function(themeClass){
187 //Todo: change for bucket structure of documents 163 //Todo: change for bucket structure of documents
188 this.textViewContainer.className = "codeViewContainer "+themeClass; 164 this.textViewContainer.className = "codeViewContainer "+themeClass;
189 } 165 }
190 } 166 }
191
192
193//////////////////////////////////////////////////////////////////////// 167////////////////////////////////////////////////////////////////////////
194//////////////////////////////////////////////////////////////////////// 168////////////////////////////////////////////////////////////////////////
195}); 169});