preference

This commit is contained in:
Van 2014-11-14 17:22:57 +08:00
parent 5ab014d8c0
commit d1a6062829
7 changed files with 33 additions and 6 deletions

View File

@ -122,5 +122,6 @@
"discard": "Discard", "discard": "Discard",
"close": "Close", "close": "Close",
"close_other": "Close Other", "close_other": "Close Other",
"clear": "Clear" "clear": "Clear",
"perference": "Perference"
} }

View File

@ -122,5 +122,6 @@
"discard": "あきらめる", "discard": "あきらめる",
"close": "クローズ", "close": "クローズ",
"close_other": "閉じるその他", "close_other": "閉じるその他",
"clear": "空の" "clear": "空の",
"perference": "偏好设定"
} }

View File

@ -122,5 +122,6 @@
"discard": "放弃", "discard": "放弃",
"close": "关闭", "close": "关闭",
"close_other": "关闭其它", "close_other": "关闭其它",
"clear": "清空" "clear": "清空",
"perference": "偏好设定"
} }

View File

@ -122,5 +122,6 @@
"discard": "放棄", "discard": "放棄",
"close": "關閉", "close": "關閉",
"close_other": "關閉其它", "close_other": "關閉其它",
"clear": "清空" "clear": "清空",
"perference": "偏好設定"
} }

View File

@ -299,8 +299,11 @@ var wide = {
var name = $("#dialogGoFilePrompt > input").val(); var name = $("#dialogGoFilePrompt > input").val();
var request = newWideRequest(); var request = newWideRequest();
request.path = wide.curNode.path; request.path = '';
request.name = '*' + name + '*'; request.name = '*' + name + '*';
if (wide.curNode) {
request.path = wide.curNode.path;
}
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
@ -448,6 +451,20 @@ var wide = {
}); });
}); });
}, },
openPreference:function () {
$("#dialogPreference").dialog("open");
},
_initPreference: function () {
$("#dialogPreference").load('/preference', function () {
$("#dialogPreference").dialog({
"modal": true,
"height": 460,
"width": 800,
"title": config.label.perference,
"hideFooter": true
});
});
},
_initLayout: function () { _initLayout: function () {
var mainH = $(window).height() - $(".menu").height() - $(".footer").height(), var mainH = $(window).height() - $(".menu").height() - $(".footer").height(),
bottomH = Math.floor(mainH * 0.3); bottomH = Math.floor(mainH * 0.3);

View File

@ -37,6 +37,9 @@
<li class="close-all" onclick="wide.closeAllFiles()"> <li class="close-all" onclick="wide.closeAllFiles()">
<span>{{.i18n.close_all_files}}</span> <span>{{.i18n.close_all_files}}</span>
</li> </li>
<li class="close-all" onclick="wide.openPreference()">
<span>{{.i18n.perference}}</span>
</li>
<li class="hr"></li> <li class="hr"></li>
<li onclick="wide.exit()"> <li onclick="wide.exit()">
<span>{{.i18n.exit}}</span> <span>{{.i18n.exit}}</span>
@ -232,6 +235,7 @@
</div> </div>
<div id="dialogAlert" class="fn-none"></div> <div id="dialogAlert" class="fn-none"></div>
<div id="dialogAbout" class="fn-none"></div> <div id="dialogAbout" class="fn-none"></div>
<div id="dialogPreference" class="fn-none"></div>
<div id="dialogNewFilePrompt" class="dialog-prompt fn-none"> <div id="dialogNewFilePrompt" class="dialog-prompt fn-none">
<input/> <input/>
</div> </div>
@ -290,7 +294,8 @@
"new_version_available": "{{.i18n.new_version_available}}", "new_version_available": "{{.i18n.new_version_available}}",
"colon": "{{.i18n.colon}}", "colon": "{{.i18n.colon}}",
"file": "{{.i18n.file}}", "file": "{{.i18n.file}}",
"uptodate": "{{.i18n.uptodate}}" "uptodate": "{{.i18n.uptodate}}",
"perference": "{{.i18n.perference}}"
}, },
"channel": { "channel": {
"editor": '{{.conf.EditorChannel}}', "editor": '{{.conf.EditorChannel}}',

1
views/preference.html Normal file
View File

@ -0,0 +1 @@
perference