aboutsummaryrefslogtreecommitdiff
path: root/js/code-editor
diff options
context:
space:
mode:
authorJose Antonio Marquez Russo2012-07-23 18:36:23 -0700
committerJose Antonio Marquez Russo2012-07-23 18:36:23 -0700
commit9c74db91b9f0c755eb8e8c36d5270b7db90c8ff7 (patch)
tree610434d27d3f75d5115628cb1d59422e9fb5a197 /js/code-editor
parent5d35e4bb5d59c994a5ffb6064eec774aea76ba64 (diff)
parent48d9ed19573a07c68da305d14ca6ab3a04d31d64 (diff)
downloadninja-9c74db91b9f0c755eb8e8c36d5270b7db90c8ff7.tar.gz
Merge pull request #44 from ananyasen/Document
first cut to show code editor for design document
Diffstat (limited to 'js/code-editor')
-rw-r--r--js/code-editor/code-editor-wrapper.js6
-rw-r--r--js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js2
2 files changed, 7 insertions, 1 deletions
diff --git a/js/code-editor/code-editor-wrapper.js b/js/code-editor/code-editor-wrapper.js
index 57fe4d3a..65f42db2 100644
--- a/js/code-editor/code-editor-wrapper.js
+++ b/js/code-editor/code-editor-wrapper.js
@@ -131,6 +131,12 @@ exports.CodeEditorWrapper = Montage.create(Component, {
131 this.application.ninja.editorViewOptions.codeEditorWrapper = this; 131 this.application.ninja.editorViewOptions.codeEditorWrapper = this;
132 } 132 }
133 133
134 //TODO:add codeEditorWrapper
135 if(!this.application.ninja.documentBar.codeEditorWrapper){
136 this.application.ninja.documentBar.codeEditorWrapper = this;
137 }
138
139
134 editorOptions = { 140 editorOptions = {
135 lineNumbers: true, 141 lineNumbers: true,
136 matchBrackets:true, 142 matchBrackets:true,
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 9344d34c..e2632d35 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,7 +51,7 @@ exports.CodeEditorViewOptions = Montage.create(Component, {
51 51
52 this._currentDocument = value; 52 this._currentDocument = value;
53 53
54 if(!value || this._currentDocument.currentView === "design") { 54 if(!value || (this._currentDocument.currentView === "design") || ((this._currentDocument.model.views.design !== null))) {
55 this.visible = false; 55 this.visible = false;
56 } else { 56 } else {
57 this.visible = true; 57 this.visible = true;