This commit is contained in:
Van 2014-11-01 12:36:42 +08:00
parent 4e078d31d1
commit ffea905ff4
9 changed files with 71 additions and 56 deletions

View File

@ -111,5 +111,6 @@
"team": "Team", "team": "Team",
"sing_up_error": "Sign Up Error", "sing_up_error": "Sign Up Error",
"user_name_ruler": "Username only by az, AZ, 0-9, _ consisting of a length of 16", "user_name_ruler": "Username only by az, AZ, 0-9, _ consisting of a length of 16",
"password_no_match": "Password doesn't match the confirmation" "password_no_match": "Password doesn't match the confirmation",
"discard": "Discard"
} }

View File

@ -111,5 +111,6 @@
"team": "チーム", "team": "チーム",
"sing_up_error": "登録に失敗しました", "sing_up_error": "登録に失敗しました",
"user_name_ruler": "16の長さからなる_ AZ、AZ、0-9、によってユーザ名のみ", "user_name_ruler": "16の長さからなる_ AZ、AZ、0-9、によってユーザ名のみ",
"password_no_match": "一貫性のないパスワード入力" "password_no_match": "一貫性のないパスワード入力",
"discard": "あきらめる"
} }

View File

@ -111,5 +111,6 @@
"team": "团队", "team": "团队",
"sing_up_error": "注册失败", "sing_up_error": "注册失败",
"user_name_ruler": "用户名只能由 a-z, A-Z, 0-9, _ 组成长度为16", "user_name_ruler": "用户名只能由 a-z, A-Z, 0-9, _ 组成长度为16",
"password_no_match": "密码输入不一致" "password_no_match": "密码输入不一致",
"discard": "放弃"
} }

View File

@ -111,5 +111,6 @@
"team": "團隊", "team": "團隊",
"sing_up_error": "註冊失敗", "sing_up_error": "註冊失敗",
"user_name_ruler": "用戶名只能由az, AZ, 0-9, _ 組成長度為16", "user_name_ruler": "用戶名只能由az, AZ, 0-9, _ 組成長度為16",
"password_no_match": "密碼輸入不一致" "password_no_match": "密碼輸入不一致",
"discard": "放棄"
} }

View File

@ -64,7 +64,8 @@
text-align: right; text-align: right;
} }
.dialog-footer button { .dialog-footer button,
#dialogCloseEditor button {
margin: 0 5px; margin: 0 5px;
} }

View File

@ -264,11 +264,11 @@
$("." + styleClass.background).show(); $("." + styleClass.background).show();
} }
$("#" + id + "Dialog .dialog-footer button:eq(0)").focus();
if (typeof settings.afterOpen === "function") { if (typeof settings.afterOpen === "function") {
settings.afterOpen(msg); settings.afterOpen(msg);
} }
$("#" + id + "Dialog .dialog-footer button:eq(0)").focus();
}, },
_updateDialog: function (target, data) { _updateDialog: function (target, data) {
var inst = this._getInst(target); var inst = this._getInst(target);

View File

@ -4,10 +4,15 @@ var editors = {
init: function () { init: function () {
$("#dialogCloseEditor").dialog({ $("#dialogCloseEditor").dialog({
"modal": true, "modal": true,
"height": 26, "height": 66,
"width": 260, "width": 260,
"title": config.label.tip, "title": config.label.tip,
"hideFooter": true, "hideFooter": true,
"afterOpen": function (fileName) {
$("#dialogCloseEditor > div:eq(0)").html(config.label.file
+ ' <b>' + fileName + '</b>. ' + config.label.confirm_save + '?');
$("#dialogCloseEditor button:eq(0)").focus();
},
"afterInit": function () { "afterInit": function () {
$("#dialogCloseEditor button.save").click(function () { $("#dialogCloseEditor button.save").click(function () {
var i = $("#dialogCloseEditor").data("index"); var i = $("#dialogCloseEditor").data("index");
@ -60,7 +65,8 @@ var editors = {
if (editors.data[i].editor.doc.isClean()) { if (editors.data[i].editor.doc.isClean()) {
return true; return true;
} else { } else {
$("#dialogCloseEditor").dialog("open"); $("#dialogCloseEditor").dialog("open", $(".edit-panel .tabs > div[data-index="
+ editors.data[i].id + "] > span:eq(0)").text());
$("#dialogCloseEditor").data("index", i); $("#dialogCloseEditor").data("index", i);
return false; return false;
} }

View File

@ -223,9 +223,12 @@
<input placeholder="{{.i18n.file_format}}" /> <input placeholder="{{.i18n.file_format}}" />
</div> </div>
<div id="dialogCloseEditor" class="dialog-form fn-none"> <div id="dialogCloseEditor" class="dialog-form fn-none">
<button class="save">save</button> <div></div><br/>
<button class="discard">discard</button> <div class="fn-right">
<button class="cancel">cancel</button> <button class="save">{{.i18n.save}}</button>
<button class="discard">{{.i18n.discard}}</button>
<button class="cancel">{{.i18n.cancel}}</button>
</div>
</div> </div>
<script> <script>
var config = { var config = {
@ -254,6 +257,7 @@
"about": "{{.i18n.about}}", "about": "{{.i18n.about}}",
"new_version_available": "{{.i18n.new_version_available}}", "new_version_available": "{{.i18n.new_version_available}}",
"colon": "{{.i18n.colon}}", "colon": "{{.i18n.colon}}",
"file": "{{.i18n.file}}",
"uptodate": "{{.i18n.uptodate}}" "uptodate": "{{.i18n.uptodate}}"
}, },
"channel": { "channel": {