From d1a606282983db163498b9b91ba554731a330c98 Mon Sep 17 00:00:00 2001 From: Van Date: Fri, 14 Nov 2014 17:22:57 +0800 Subject: [PATCH] preference --- i18n/en_US.json | 3 ++- i18n/ja_JP.json | 3 ++- i18n/zh_CN.json | 3 ++- i18n/zh_TW.json | 3 ++- static/js/wide.js | 19 ++++++++++++++++++- views/index.html | 7 ++++++- views/preference.html | 1 + 7 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 views/preference.html diff --git a/i18n/en_US.json b/i18n/en_US.json index cdbbbdc..5f88168 100644 --- a/i18n/en_US.json +++ b/i18n/en_US.json @@ -122,5 +122,6 @@ "discard": "Discard", "close": "Close", "close_other": "Close Other", - "clear": "Clear" + "clear": "Clear", + "perference": "Perference" } \ No newline at end of file diff --git a/i18n/ja_JP.json b/i18n/ja_JP.json index 96039a7..f86b1dc 100644 --- a/i18n/ja_JP.json +++ b/i18n/ja_JP.json @@ -122,5 +122,6 @@ "discard": "あきらめる", "close": "クローズ", "close_other": "閉じるその他", - "clear": "空の" + "clear": "空の", + "perference": "偏好设定" } diff --git a/i18n/zh_CN.json b/i18n/zh_CN.json index 223dee5..140baa5 100644 --- a/i18n/zh_CN.json +++ b/i18n/zh_CN.json @@ -122,5 +122,6 @@ "discard": "放弃", "close": "关闭", "close_other": "关闭其它", - "clear": "清空" + "clear": "清空", + "perference": "偏好设定" } \ No newline at end of file diff --git a/i18n/zh_TW.json b/i18n/zh_TW.json index 77be426..83006a6 100644 --- a/i18n/zh_TW.json +++ b/i18n/zh_TW.json @@ -122,5 +122,6 @@ "discard": "放棄", "close": "關閉", "close_other": "關閉其它", - "clear": "清空" + "clear": "清空", + "perference": "偏好設定" } \ No newline at end of file diff --git a/static/js/wide.js b/static/js/wide.js index 95e9dc1..32ebc05 100644 --- a/static/js/wide.js +++ b/static/js/wide.js @@ -299,8 +299,11 @@ var wide = { var name = $("#dialogGoFilePrompt > input").val(); var request = newWideRequest(); - request.path = wide.curNode.path; + request.path = ''; request.name = '*' + name + '*'; + if (wide.curNode) { + request.path = wide.curNode.path; + } $.ajax({ 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 () { var mainH = $(window).height() - $(".menu").height() - $(".footer").height(), bottomH = Math.floor(mainH * 0.3); diff --git a/views/index.html b/views/index.html index 673ecc6..2fcbaf4 100644 --- a/views/index.html +++ b/views/index.html @@ -37,6 +37,9 @@
  • {{.i18n.close_all_files}}
  • +
  • + {{.i18n.perference}} +
  • {{.i18n.exit}} @@ -232,6 +235,7 @@
    +
    @@ -290,7 +294,8 @@ "new_version_available": "{{.i18n.new_version_available}}", "colon": "{{.i18n.colon}}", "file": "{{.i18n.file}}", - "uptodate": "{{.i18n.uptodate}}" + "uptodate": "{{.i18n.uptodate}}", + "perference": "{{.i18n.perference}}" }, "channel": { "editor": '{{.conf.EditorChannel}}', diff --git a/views/preference.html b/views/preference.html new file mode 100644 index 0000000..167d16b --- /dev/null +++ b/views/preference.html @@ -0,0 +1 @@ +perference \ No newline at end of file