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.js20
1 files changed, 20 insertions, 0 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 a1ff8547..a381ae2a 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
@@ -42,7 +42,27 @@ var CodeEditorViewOptions = exports.CodeEditorViewOptions = Montage.create(Compo
42 didDraw: { 42 didDraw: {
43 enumerable: false, 43 enumerable: false,
44 value: function() { 44 value: function() {
45 this.format.addEventListener("click", this.handleFormat.bind(this), false);
46 this.comment.addEventListener("click", this.handleComment.bind(this), false);
47 this.uncomment.addEventListener("click", this.handleUncomment.bind(this), false);
48 }
49 },
50
51 handleFormat:{
52 value: function(){
53 this.application.ninja.codeEditorController.autoFormatSelection();
54 }
55 },
56 handleComment:{
57 value: function(){
58 this.application.ninja.codeEditorController.commentSelection(true);
59 }
60 },
45 61
62 handleUncomment:{
63 value: function(){
64 this.application.ninja.codeEditorController.commentSelection(false);
46 } 65 }
47 } 66 }
67
48}); \ No newline at end of file 68}); \ No newline at end of file