From ea4385add0e9087487ccded929c2d6674d326db8 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Wed, 18 Apr 2012 00:29:52 -0700 Subject: - collapse panels for code view, restore for design view - apply theme selection to all code view documents Signed-off-by: Ananya Sen --- js/controllers/code-editor-controller.js | 18 ++++++++++++------ js/controllers/document-controller.js | 1 + 2 files changed, 13 insertions(+), 6 deletions(-) (limited to 'js/controllers') diff --git a/js/controllers/code-editor-controller.js b/js/controllers/code-editor-controller.js index cf0503a0..2302730c 100644 --- a/js/controllers/code-editor-controller.js +++ b/js/controllers/code-editor-controller.js @@ -33,9 +33,16 @@ var CodeEditorController = exports.CodeEditorController = Montage.create(Compone automaticCodeComplete:{ get: function(){return this._automaticCodeComplete;}, - set: function(value){ - //console.log("$$$ automaticCodeComplete setter : "+value); - this._automaticCodeComplete = value;} + set: function(value){this._automaticCodeComplete = value;} + }, + + _editorTheme: { + value:"default" + }, + + editorTheme:{ + get: function(){return this._editorTheme;}, + set: function(value){this._editorTheme = value;} }, originalEditorFont:{ @@ -189,9 +196,8 @@ var CodeEditorController = exports.CodeEditorController = Montage.create(Compone }, handleThemeSelection:{ - value: function(theme){ - this.application.ninja.documentController.activeDocument.editor.setOption("theme", theme); + value: function(){ + this.application.ninja.documentController.activeDocument.editor.setOption("theme", this.editorTheme); } } - }); \ No newline at end of file diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 079eb754..0d9b37ed 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js @@ -434,6 +434,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component, // appDelegateModule.MyAppDelegate.onSetActiveDocument(); this.application.ninja.stage.stageView.showCodeViewBar(false); + this.application.ninja.stage.stageView.restoreAllPanels(); } }, -- cgit v1.2.3