This commit is contained in:
Liang Ding 2014-11-14 11:42:20 +08:00
parent 2fcff8d4f2
commit c6f8ab342d
7 changed files with 46 additions and 1 deletions

View File

@ -40,6 +40,7 @@
"notification_3": "Not found [ide_stub], thereby [Jump to Decl], [Find Usages] will not work",
"notification_4": "Server Internal Error",
"goto_line": "Goto Line",
"goto_file": "Goto File",
"go": "Go",
"tip": "Tip",
"confirm": "Confirm",

View File

@ -40,6 +40,7 @@
"notification_3": "[ide_stub] が見つかりません。[Jump to Decl]、[Find Usages] は動作しません。",
"notification_4": "内部サーバーエラー",
"goto_line": "指定行にジャンプ",
"goto_file": "ファイルをオープンする",
"go": "Go",
"tip": "ヒント",
"confirm": "確認",

View File

@ -40,6 +40,7 @@
"notification_3": "没有检查到 ide_stub这将会导致 [跳转到声明]、[查找使用] 失效",
"notification_4": "服务器内部错误",
"goto_line": "跳转到行",
"goto_file": "打开文件",
"go": "跳转",
"tip": "提示",
"confirm": "确定",

View File

@ -40,6 +40,7 @@
"notification_3": "没有檢查到 ide_stub這將會導致 [跳轉到聲明]、[查找使用] 失效",
"notification_4": "服務器內部錯誤",
"goto_line": "跳轉到行",
"goto_file": "打開文件",
"go": "跳到",
"tip": "提示",
"confirm": "確定",

View File

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

View File

@ -281,6 +281,40 @@ var wide = {
}
});
$("#dialogGoFilePrompt").dialog({
"modal": true,
"height": 300,
"width": 660,
"title": config.label.goto_file,
"okText": config.label.go,
"cancelText": config.label.cancel,
"afterOpen": function () {
$("#dialogGoFilePrompt > input").val('').focus();
$("#dialogGoFilePrompt").closest(".dialog-main").find(".dialog-footer > button:eq(0)").prop("disabled", true);
},
"ok": function () {
var name = $("#dialogGoFilePrompt > input").val();
var request = newWideRequest();
request.path = wide.curNode.path;
request.name = '*' + name + '*';
$.ajax({
type: 'POST',
url: '/file/find/name',
data: JSON.stringify(request),
dataType: "json",
success: function (data) {
if (!data.succ) {
return;
}
console.log(data);
}
});
}
});
$("#dialogGoLinePrompt").dialog({
"modal": true,
"height": 52,

View File

@ -244,6 +244,9 @@
<div id="dialogGoLinePrompt" class="dialog-prompt fn-none">
<input/>
</div>
<div id="dialogGoFilePrompt" class="dialog-prompt fn-none">
<input/>
</div>
<div id="dialogSearchForm" class="dialog-form fn-none">
<input placeholder="{{.i18n.keyword}}" />
<input placeholder="{{.i18n.file_format}}" />
@ -267,6 +270,7 @@
"rename": "{{.i18n.rename}}",
"cancel": "{{.i18n.cancel}}",
"goto_line": "{{.i18n.goto_line}}",
"goto_file": "{{.i18n.goto_file}}",
"go": "{{.i18n.go}}",
"create": "{{.i18n.create}}",
"create_file": "{{.i18n.create_file}}",