Merge pull request #321 from ilvalle/comment
toggleComment in admin editor
This commit is contained in:
@@ -45,6 +45,7 @@
|
|||||||
<script src="{{=cm}}/addon/fold/xml-fold.js"></script>
|
<script src="{{=cm}}/addon/fold/xml-fold.js"></script>
|
||||||
<script src="{{=cm}}/addon/fold/comment-fold.js"></script>
|
<script src="{{=cm}}/addon/fold/comment-fold.js"></script>
|
||||||
<script src="{{=cm}}/addon/fold/indent-fold.js"></script>
|
<script src="{{=cm}}/addon/fold/indent-fold.js"></script>
|
||||||
|
<script src="{{=cm}}/addon/comment/comment.js"></script>
|
||||||
<link rel="stylesheet" href="{{=cm}}/addon/fold/foldgutter.css">
|
<link rel="stylesheet" href="{{=cm}}/addon/fold/foldgutter.css">
|
||||||
<script src="{{=cm}}/emmet.min.js"></script>
|
<script src="{{=cm}}/emmet.min.js"></script>
|
||||||
<script src="{{=js_url}}/ajax_editor.js"></script>
|
<script src="{{=js_url}}/ajax_editor.js"></script>
|
||||||
|
|||||||
@@ -114,6 +114,7 @@
|
|||||||
CodeMirror.showHint(cm, CodeMirror.pythonHint);
|
CodeMirror.showHint(cm, CodeMirror.pythonHint);
|
||||||
}
|
}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
|
CodeMirror.defaults.extraKeys["Ctrl-/"] = "toggleComment";
|
||||||
store_changes_function = function(instance, changeObj) {
|
store_changes_function = function(instance, changeObj) {
|
||||||
jQuery(instance).data('saved', false);
|
jQuery(instance).data('saved', false);
|
||||||
instance.off("change", store_changes_function);
|
instance.off("change", store_changes_function);
|
||||||
@@ -154,34 +155,26 @@
|
|||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="help alert alert-block alert-info">
|
<div class="help alert alert-block alert-info">
|
||||||
{{if filetype=='html':}}
|
{{if filetype=='html':}}
|
||||||
<h3>{{=T('Key bindings for ZenCoding Plugin')}}</h3>
|
<h3>{{=T('Key bindings for ZenCoding Plugin')}}</h3>
|
||||||
<ul class="keybindings unstyled">
|
{{else:}}
|
||||||
{{=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'))}}
|
|
||||||
</ul>
|
|
||||||
{{else:}}
|
|
||||||
<h3>{{=T("Key bindings")}}</h3>
|
<h3>{{=T("Key bindings")}}</h3>
|
||||||
|
{{pass}}
|
||||||
<ul class="keybindings unstyled">
|
<ul class="keybindings unstyled">
|
||||||
{{=shortcut('Ctrl+S', T('Save via Ajax'))}}
|
{{=shortcut('Ctrl+S', T('Save via Ajax'))}}
|
||||||
{{=shortcut('Ctrl+F11', T('Toggle Fullscreen'))}}
|
{{=shortcut('Ctrl+F11', T('Toggle Fullscreen'))}}
|
||||||
{{=shortcut('Shift+Esc', T('Exit 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-F / Cmd-F', T('Start searching'))}}
|
||||||
{{=shortcut('Ctrl-G / Cmd-G', T('Find Next'))}}
|
{{=shortcut('Ctrl-G / Cmd-G', T('Find Next'))}}
|
||||||
{{=shortcut('Shift-Ctrl-G / Shift-Cmd-G', T('Find Previous'))}}
|
{{=shortcut('Shift-Ctrl-G / Shift-Cmd-G', T('Find Previous'))}}
|
||||||
{{=shortcut('Shift-Ctrl-F / Cmd-Option-F', T('Replace'))}}
|
{{=shortcut('Shift-Ctrl-F / Cmd-Option-F', T('Replace'))}}
|
||||||
{{=shortcut('Shift-Ctrl-R / Shift-Cmd-Option-F', T('Replace All'))}}
|
{{=shortcut('Shift-Ctrl-R / Shift-Cmd-Option-F', T('Replace All'))}}
|
||||||
</ul>
|
{{=shortcut('Ctrl-/ ', T('Toggle comment'))}}
|
||||||
|
{{if filetype=='html':}}
|
||||||
|
{{=shortcut('Tab', T('Expand Abbreviation'))}}
|
||||||
|
{{elif filetype=='python':}}
|
||||||
|
{{=shortcut('Ctrl-Space', T('Autocomplete Python Code'))}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user