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-27 17:12:37 -0700
committerAnanya Sen2012-04-27 17:12:37 -0700
commit1314a030f5f883e2222958aa2ba1b8c031be9364 (patch)
treed6913dc0886745eee9efc7f0beda6a6507a22dec /js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js
parent7aee2bd02218d9572ac1c00f191d08efe57f5bcb (diff)
downloadninja-1314a030f5f883e2222958aa2ba1b8c031be9364.tar.gz
added key shortcuts' list dropdown in view option bar
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.js14
1 files changed, 14 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 41fd991e..6c0e3f05 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
@@ -46,6 +46,7 @@ var CodeEditorViewOptions = exports.CodeEditorViewOptions = Montage.create(Compo
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 this.themeSelect.addEventListener("change", this.handleThemeSelection.bind(this), false);
49 this.shortKeys.addEventListener("click", this.handleShortKeys.bind(this), false);
49 } 50 }
50 }, 51 },
51 52
@@ -71,6 +72,19 @@ var CodeEditorViewOptions = exports.CodeEditorViewOptions = Montage.create(Compo
71 this.application.ninja.codeEditorController.editorTheme = this.themeSelect.options[this.themeSelect.selectedIndex].value; 72 this.application.ninja.codeEditorController.editorTheme = this.themeSelect.options[this.themeSelect.selectedIndex].value;
72 this.application.ninja.codeEditorController.handleThemeSelection(); 73 this.application.ninja.codeEditorController.handleThemeSelection();
73 } 74 }
75 },
76
77 handleShortKeys:{
78 value:function(evt){
79 var list = this.shortKeys.querySelector(".list");
80 if(list && list.classList.contains("hide")){
81 list.classList.remove("hide");
82 list.classList.add("show");
83 }else if(list && list.classList.contains("show")){
84 list.classList.remove("show");
85 list.classList.add("hide");
86 }
87 }
74 } 88 }
75 89
76}); \ No newline at end of file 90}); \ No newline at end of file