aboutsummaryrefslogtreecommitdiff
path: root/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js
diff options
context:
space:
mode:
authorAnanya Sen2012-04-16 18:19:17 -0700
committerAnanya Sen2012-04-16 18:19:17 -0700
commit2449fc403e8a8a22f092c87e3268a69a2be67e43 (patch)
tree71d660356892f98ce7a694c942d3fe132f171ac1 /js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js
parentc2ec390d42945d2df1aed3f2b7ff3d1aa722fce8 (diff)
downloadninja-2449fc403e8a8a22f092c87e3268a69a2be67e43.tar.gz
Added comment and uncomment control in the editor view options
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
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