From c07a7a9d11bc8299fa9686544b18840cc8e640c2 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Mon, 23 Jul 2012 16:59:56 -0700 Subject: show design code editor - first cut Signed-off-by: Ananya Sen --- js/code-editor/code-editor-wrapper.js | 6 ++++++ .../ui/code-editor-view-options.reel/code-editor-view-options.js | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'js/code-editor') 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, { this.application.ninja.editorViewOptions.codeEditorWrapper = this; } + //TODO:add codeEditorWrapper + if(!this.application.ninja.documentBar.codeEditorWrapper){ + this.application.ninja.documentBar.codeEditorWrapper = this; + } + + editorOptions = { lineNumbers: true, 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, { this._currentDocument = value; - if(!value || this._currentDocument.currentView === "design") { + if(!value || (this._currentDocument.currentView === "design") || ((this._currentDocument.model.views.design !== null))) { this.visible = false; } else { this.visible = true; -- cgit v1.2.3