This commit is contained in:
Van 2014-11-14 15:03:30 +08:00
parent 6a5d86fea9
commit da10a8e395
6 changed files with 41 additions and 8 deletions

View File

@ -97,3 +97,18 @@
width: 100%; width: 100%;
margin: 2px auto; margin: 2px auto;
} }
#dialogGoFilePrompt > ul {
height: 260px;
overflow: auto;
margin-top: 5px;
}
#dialogGoFilePrompt li {
}
#dialogGoFilePrompt li.selected,
#dialogGoFilePrompt li:hover {
}

View File

@ -45,6 +45,7 @@
border-width: 0; border-width: 0;
color: #fff; color: #fff;
height: 18px; height: 18px;
opacity: 1;
} }
.ztree li a:hover { .ztree li a:hover {

View File

@ -761,9 +761,6 @@ var editors = {
cm.setSelection(CodeMirror.Pos(from.line + 1, from.ch), cm.setSelection(CodeMirror.Pos(from.line + 1, from.ch),
CodeMirror.Pos(to.line + 1, to.ch)); CodeMirror.Pos(to.line + 1, to.ch));
},
"Shift-Alt-O": function () {
$("#dialogGoFilePrompt").dialog("open");
} }
} }
}); });

View File

@ -79,6 +79,13 @@ var hotkeys = {
shiftKey: false, shiftKey: false,
which: 81 which: 81
}, },
// Shift+Alt+O 跳转到文件
goFile: {
ctrlKey: false,
altKey: true,
shiftKey: true,
which: 79
},
// F6 构建并运行 // F6 构建并运行
buildRun: { buildRun: {
ctrlKey: false, ctrlKey: false,
@ -361,6 +368,13 @@ var hotkeys = {
return; return;
} }
if (event.ctrlKey === hotKeys.goFile.ctrlKey
&& event.altKey === hotKeys.goFile.altKey
&& event.shiftKey === hotKeys.goFile.shiftKey
&& event.which === hotKeys.goFile.which) { // Shift+Alt+O 跳转到文件
$("#dialogGoFilePrompt").dialog("open");
}
}); });
}, },
init: function () { init: function () {

View File

@ -309,7 +309,12 @@ var wide = {
return; return;
} }
console.log(data); var goFileHTML = '';
for (var i = 0, max = data.founds.length; i < max; i++) {
goFileHTML += '<li>' + data.founds[i].path + '</li>';
}
$("#dialogGoFilePrompt > ul").html(goFileHTML);
} }
}); });
} }

View File

@ -246,6 +246,7 @@
</div> </div>
<div id="dialogGoFilePrompt" class="dialog-prompt fn-none"> <div id="dialogGoFilePrompt" class="dialog-prompt fn-none">
<input/> <input/>
<ul></ul>
</div> </div>
<div id="dialogSearchForm" class="dialog-form fn-none"> <div id="dialogSearchForm" class="dialog-form fn-none">
<input placeholder="{{.i18n.keyword}}" /> <input placeholder="{{.i18n.keyword}}" />