diff options
author | Ananya Sen | 2012-07-25 12:26:20 -0700 |
---|---|---|
committer | Ananya Sen | 2012-07-25 12:26:20 -0700 |
commit | 7fa0c53c14e9029d2e3960cc81edf91592fd1768 (patch) | |
tree | db4449120f73539dc647fd5d331c0af7a5a50336 /js/code-editor | |
parent | bb2f1d0e9a559f44348e95ad726801a5031aea3a (diff) | |
download | ninja-7fa0c53c14e9029d2e3960cc81edf91592fd1768.tar.gz |
added save for code view, fixed code view editor bug, reuse code editor options component in document bar
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Conflicts:
js/document/views/design-code.js
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/code-editor')
-rw-r--r-- | js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js b/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js index e2632d35..5ad36db5 100644 --- a/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js +++ b/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js | |||
@@ -51,10 +51,18 @@ exports.CodeEditorViewOptions = Montage.create(Component, { | |||
51 | 51 | ||
52 | this._currentDocument = value; | 52 | this._currentDocument = value; |
53 | 53 | ||
54 | if(!value || (this._currentDocument.currentView === "design") || ((this._currentDocument.model.views.design !== null))) { | 54 | if(!value || (this._currentDocument.currentView === "design")) { |
55 | this.visible = false; | 55 | this.visible = false; |
56 | } else { | 56 | } else if(this._currentDocument.currentView === "code") { |
57 | this.visible = true; | 57 | |
58 | if(this._currentDocument.model.views.design){//code view of design document | ||
59 | this.application.ninja.editorViewOptions.visible = false; | ||
60 | this.application.ninja.documentBar.codeEditorControls.visible = true; | ||
61 | }else if(!this._currentDocument.model.views.design){//code view for text document | ||
62 | this.application.ninja.editorViewOptions.visible = true; | ||
63 | this.application.ninja.documentBar.codeEditorControls.visible = false; | ||
64 | } | ||
65 | |||
58 | this.autocomplete = !this.codeCompletionSupport[this._currentDocument.model.file.extension]; | 66 | this.autocomplete = !this.codeCompletionSupport[this._currentDocument.model.file.extension]; |
59 | this._currentDocument.model.views.code.editor.automaticCodeHint = this.codeCompleteCheck.checked; | 67 | this._currentDocument.model.views.code.editor.automaticCodeHint = this.codeCompleteCheck.checked; |
60 | } | 68 | } |
@@ -200,6 +208,11 @@ exports.CodeEditorViewOptions = Montage.create(Component, { | |||
200 | } else { | 208 | } else { |
201 | this.autoCompleteLabel.classList.remove("disabled"); | 209 | this.autoCompleteLabel.classList.remove("disabled"); |
202 | } | 210 | } |
211 | |||
212 | //hide the zoom hottext if it is code view of a design file | ||
213 | if (this._currentDocument && this._currentDocument.model && this._currentDocument.model.views.design){ | ||
214 | this.zoomHottext.element.style.display = "none"; | ||
215 | } | ||
203 | } | 216 | } |
204 | }, | 217 | }, |
205 | 218 | ||