diff options
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.js | 14 |
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 |