aboutsummaryrefslogtreecommitdiff
path: root/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js')
-rw-r--r--js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js14
1 files changed, 11 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 a381ae2a..0625dad9 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
@@ -45,24 +45,32 @@ var CodeEditorViewOptions = exports.CodeEditorViewOptions = Montage.create(Compo
45 this.format.addEventListener("click", this.handleFormat.bind(this), false); 45 this.format.addEventListener("click", this.handleFormat.bind(this), false);
46 this.comment.addEventListener("click", this.handleComment.bind(this), false); 46 this.comment.addEventListener("click", this.handleComment.bind(this), false);
47 this.uncomment.addEventListener("click", this.handleUncomment.bind(this), false); 47 this.uncomment.addEventListener("click", this.handleUncomment.bind(this), false);
48 this.themeSelect.addEventListener("change", this.handleThemeSelection.bind(this), false);
48 } 49 }
49 }, 50 },
50 51
51 handleFormat:{ 52 handleFormat:{
52 value: function(){ 53 value: function(evt){
53 this.application.ninja.codeEditorController.autoFormatSelection(); 54 this.application.ninja.codeEditorController.autoFormatSelection();
54 } 55 }
55 }, 56 },
56 handleComment:{ 57 handleComment:{
57 value: function(){ 58 value: function(evt){
58 this.application.ninja.codeEditorController.commentSelection(true); 59 this.application.ninja.codeEditorController.commentSelection(true);
59 } 60 }
60 }, 61 },
61 62
62 handleUncomment:{ 63 handleUncomment:{
63 value: function(){ 64 value: function(evt){
64 this.application.ninja.codeEditorController.commentSelection(false); 65 this.application.ninja.codeEditorController.commentSelection(false);
65 } 66 }
67 },
68
69 handleThemeSelection:{
70 value: function(evt){
71 var theme = this.themeSelect.options[this.themeSelect.selectedIndex].value;
72 this.application.ninja.codeEditorController.handleThemeSelection(theme);
73 }
66 } 74 }
67 75
68}); \ No newline at end of file 76}); \ No newline at end of file