parent
c208c63a1e
commit
a323e3a4b8
|
@ -183,7 +183,8 @@ var editors = {
|
||||||
|
|
||||||
if (editors.data.length === 0) { // 起始页可能存在,所以用编辑器数据判断
|
if (editors.data.length === 0) { // 起始页可能存在,所以用编辑器数据判断
|
||||||
menu.disabled(['save-all', 'build', 'run', 'go-test', 'go-get', 'go-install',
|
menu.disabled(['save-all', 'build', 'run', 'go-test', 'go-get', 'go-install',
|
||||||
'find', 'find-next', 'find-previous', 'replace', 'replace-all']);
|
'find', 'find-next', 'find-previous', 'replace', 'replace-all',
|
||||||
|
'format', 'autocomplete', 'jump-to-decl', 'expr-info', 'find-usages', 'toggle-comment']);
|
||||||
$(".toolbars").hide();
|
$(".toolbars").hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -572,7 +573,8 @@ var editors = {
|
||||||
});
|
});
|
||||||
|
|
||||||
menu.undisabled(['save-all', 'close-all', 'build', 'run', 'go-test', 'go-get', 'go-install',
|
menu.undisabled(['save-all', 'close-all', 'build', 'run', 'go-test', 'go-get', 'go-install',
|
||||||
'find', 'find-next', 'find-previous', 'replace', 'replace-all']);
|
'find', 'find-next', 'find-previous', 'replace', 'replace-all',
|
||||||
|
'format', 'autocomplete', 'jump-to-decl', 'expr-info', 'find-usages', 'toggle-comment']);
|
||||||
|
|
||||||
var textArea = document.getElementById("editor" + id);
|
var textArea = document.getElementById("editor" + id);
|
||||||
textArea.value = data.content;
|
textArea.value = data.content;
|
||||||
|
@ -594,6 +596,7 @@ var editors = {
|
||||||
extraKeys: {
|
extraKeys: {
|
||||||
"Ctrl-\\": "autocompleteAnyWord",
|
"Ctrl-\\": "autocompleteAnyWord",
|
||||||
".": "autocompleteAfterDot",
|
".": "autocompleteAfterDot",
|
||||||
|
"Ctrl-/": 'toggleComment',
|
||||||
"Ctrl-I": "exprInfo",
|
"Ctrl-I": "exprInfo",
|
||||||
"Ctrl-L": "gotoLine",
|
"Ctrl-L": "gotoLine",
|
||||||
"Ctrl-E": "deleteLine",
|
"Ctrl-E": "deleteLine",
|
||||||
|
|
|
@ -109,25 +109,37 @@
|
||||||
<span>{{.i18n.source}}</span>
|
<span>{{.i18n.source}}</span>
|
||||||
<div class="frame">
|
<div class="frame">
|
||||||
<ul>
|
<ul>
|
||||||
<li onclick="alert('Dev In Progress')">
|
<li class="format disabled"
|
||||||
|
onclick="if (!$(this).hasClass('disabled')){wide.fmt(editors.getCurrentPath(), wide.curEditor)}">
|
||||||
<span>{{.i18n.format}}</span>
|
<span>{{.i18n.format}}</span>
|
||||||
|
<span class="fn-right ft-small">Ctrl-Shift-F</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="hr"></li>
|
<li class="hr"></li>
|
||||||
<li onclick="alert('Dev In Progress')">
|
<li class="autocomplete disabled"
|
||||||
|
onclick="if (!$(this).hasClass('disabled')){wide.curEditor.execCommand('autocompleteAnyWord')}">
|
||||||
<span>{{.i18n.autocomplete}}</span>
|
<span>{{.i18n.autocomplete}}</span>
|
||||||
|
<span class="fn-right ft-small">Ctrl-\</span>
|
||||||
</li>
|
</li>
|
||||||
<li onclick="alert('Dev In Progress')">
|
<li class="jump-to-decl disabled"
|
||||||
|
onclick="if (!$(this).hasClass('disabled')){wide.curEditor.execCommand('jumpToDecl')}">
|
||||||
<span>{{.i18n.jump_to_decl}}</span>
|
<span>{{.i18n.jump_to_decl}}</span>
|
||||||
|
<span class="fn-right ft-small">Ctrl-B</span>
|
||||||
</li>
|
</li>
|
||||||
<li onclick="alert('Dev In Progress')">
|
<li class="expr-info disabled"
|
||||||
|
onclick="if (!$(this).hasClass('disabled')){wide.curEditor.execCommand('exprInfo')}">
|
||||||
<span>{{.i18n.show_expr_info}}</span>
|
<span>{{.i18n.show_expr_info}}</span>
|
||||||
|
<span class="fn-right ft-small">Ctrl-I</span>
|
||||||
</li>
|
</li>
|
||||||
<li onclick="alert('Dev In Progress')">
|
<li class="find-usages disabled"
|
||||||
|
onclick="if (!$(this).hasClass('disabled')){wide.curEditor.execCommand('findUsages')}">
|
||||||
<span>{{.i18n.find_usages}}</span>
|
<span>{{.i18n.find_usages}}</span>
|
||||||
|
<span class="fn-right ft-small">Alt-F7</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="hr"></li>
|
<li class="hr"></li>
|
||||||
<li onclick="alert('Dev In Progress')">
|
<li class="toggle-comment disabled"
|
||||||
|
onclick="if (!$(this).hasClass('disabled')){wide.curEditor.execCommand('toggleComment')}">
|
||||||
<span>{{.i18n.toggle_comment}}</span>
|
<span>{{.i18n.toggle_comment}}</span>
|
||||||
|
<span class="fn-right ft-small">Ctrl-/</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -146,19 +158,19 @@
|
||||||
<span class="fn-right ft-small">Ctrl-F</span>
|
<span class="fn-right ft-small">Ctrl-F</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="hr"></li>
|
<li class="hr"></li>
|
||||||
<li class="find" onclick="alert('Dev In Progress')">
|
<li class="find disabled" onclick="alert('Dev In Progress')">
|
||||||
<span>{{.i18n.find}}</span>
|
<span>{{.i18n.find}}</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="find-next" onclick="alert('Dev In Progress')">
|
<li class="find-next disabled" onclick="alert('Dev In Progress')">
|
||||||
<span>{{.i18n.find_next}}</span>
|
<span>{{.i18n.find_next}}</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="find-previous" onclick="alert('Dev In Progress')">
|
<li class="find-previous disabled" onclick="alert('Dev In Progress')">
|
||||||
<span>{{.i18n.find_previous}}</span>
|
<span>{{.i18n.find_previous}}</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="replace" onclick="alert('Dev In Progress')">
|
<li class="replace disabled" onclick="alert('Dev In Progress')">
|
||||||
<span>{{.i18n.replace}}</span>
|
<span>{{.i18n.replace}}</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="replace-all" onclick="alert('Dev In Progress')">
|
<li class="replace-all disabled" onclick="alert('Dev In Progress')">
|
||||||
<span>{{.i18n.replace_all}}</span>
|
<span>{{.i18n.replace_all}}</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -503,6 +515,7 @@
|
||||||
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/fold/markdown-fold.js"></script>
|
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/fold/markdown-fold.js"></script>
|
||||||
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/fold/comment-fold.js"></script>
|
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/fold/comment-fold.js"></script>
|
||||||
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/mode/loadmode.js"></script>
|
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/mode/loadmode.js"></script>
|
||||||
|
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/comment/comment.js"></script>
|
||||||
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-{{.codeMirrorVer}}/mode/meta.js"></script>
|
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-{{.codeMirrorVer}}/mode/meta.js"></script>
|
||||||
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-{{.codeMirrorVer}}/mode/go/go.js"></script>
|
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-{{.codeMirrorVer}}/mode/go/go.js"></script>
|
||||||
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-{{.codeMirrorVer}}/mode/xml/xml.js"></script>
|
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-{{.codeMirrorVer}}/mode/xml/xml.js"></script>
|
||||||
|
|
Loading…
Reference in New Issue