From 1fecd35bb703f0bd6bcc83a194822caf41c81072 Mon Sep 17 00:00:00 2001 From: ilvalle Date: Mon, 9 Dec 2013 14:38:10 +0100 Subject: [PATCH] toggleComment in admin editor --- applications/admin/views/default/edit.html | 1 + applications/admin/views/default/edit_js.html | 27 +++++++------------ 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/applications/admin/views/default/edit.html b/applications/admin/views/default/edit.html index 31f7a040..59c10af8 100644 --- a/applications/admin/views/default/edit.html +++ b/applications/admin/views/default/edit.html @@ -45,6 +45,7 @@ + diff --git a/applications/admin/views/default/edit_js.html b/applications/admin/views/default/edit_js.html index 51bd27ef..571839b8 100644 --- a/applications/admin/views/default/edit_js.html +++ b/applications/admin/views/default/edit_js.html @@ -114,6 +114,7 @@ CodeMirror.showHint(cm, CodeMirror.pythonHint); } {{pass}} + CodeMirror.defaults.extraKeys["Ctrl-/"] = "toggleComment"; store_changes_function = function(instance, changeObj) { jQuery(instance).data('saved', false); instance.off("change", store_changes_function); @@ -154,34 +155,26 @@
- {{if filetype=='html':}} + {{if filetype=='html':}}

{{=T('Key bindings for ZenCoding Plugin')}}

-
    - {{=shortcut('Ctrl+S', T('Save via Ajax'))}} - {{=shortcut('Ctrl+F11', T('Toggle Fullscreen'))}} - {{=shortcut('Shift+Esc', T('Exit Fullscreen'))}} - {{=shortcut('Ctrl-F / Cmd-F', T('Start searching'))}} - {{=shortcut('Ctrl-G / Cmd-G', T('Find Next'))}} - {{=shortcut('Shift-Ctrl-G / Shift-Cmd-G', T('Find Previous'))}} - {{=shortcut('Shift-Ctrl-F / Cmd-Option-F', T('Replace'))}} - {{=shortcut('Shift-Ctrl-R / Shift-Cmd-Option-F', T('Replace All'))}} - {{=shortcut('Tab', T('Expand Abbreviation'))}} -
- {{else:}} + {{else:}}

{{=T("Key bindings")}}

+ {{pass}}
    {{=shortcut('Ctrl+S', T('Save via Ajax'))}} {{=shortcut('Ctrl+F11', T('Toggle Fullscreen'))}} {{=shortcut('Shift+Esc', T('Exit Fullscreen'))}} - {{if filetype=='python':}} - {{=shortcut('Ctrl-Space', T('Autocomplete Python Code'))}} - {{pass}} {{=shortcut('Ctrl-F / Cmd-F', T('Start searching'))}} {{=shortcut('Ctrl-G / Cmd-G', T('Find Next'))}} {{=shortcut('Shift-Ctrl-G / Shift-Cmd-G', T('Find Previous'))}} {{=shortcut('Shift-Ctrl-F / Cmd-Option-F', T('Replace'))}} {{=shortcut('Shift-Ctrl-R / Shift-Cmd-Option-F', T('Replace All'))}} -
+ {{=shortcut('Ctrl-/ ', T('Toggle comment'))}} + {{if filetype=='html':}} + {{=shortcut('Tab', T('Expand Abbreviation'))}} + {{elif filetype=='python':}} + {{=shortcut('Ctrl-Space', T('Autocomplete Python Code'))}} {{pass}} +