diff options
author | Ananya Sen | 2012-05-21 16:42:26 -0700 |
---|---|---|
committer | Ananya Sen | 2012-05-21 16:42:26 -0700 |
commit | 2cc8e58f6bb9f64a7473e62aecd013fa55167231 (patch) | |
tree | 4969012e500a27c72cf59c0a631990c6b9a1c333 /js/document/views | |
parent | c3c2ffc8d057660b7c42b45442885cd0d2d598bc (diff) | |
download | ninja-2cc8e58f6bb9f64a7473e62aecd013fa55167231.tar.gz |
- added opening multiple code and design view documents
- switching between multiple code and design view documents
- Note: closing of documents, when multiple documents are open, is not yet implemented
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/document/views')
-rwxr-xr-x | js/document/views/code.js | 54 |
1 files changed, 14 insertions, 40 deletions
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 | }); |