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",
"sing_up_error": "Sign Up Error",
"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": "チーム",
"sing_up_error": "登録に失敗しました",
"user_name_ruler": "16の長さからなる_ AZ、AZ、0-9、によってユーザ名のみ",
"password_no_match": "一貫性のないパスワード入力"
"password_no_match": "一貫性のないパスワード入力",
"discard": "あきらめる"
}

View File

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

View File

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

View File

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

View File

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

View File

@ -4,10 +4,15 @@ var editors = {
init: function () {
$("#dialogCloseEditor").dialog({
"modal": true,
"height": 26,
"height": 66,
"width": 260,
"title": config.label.tip,
"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 () {
$("#dialogCloseEditor button.save").click(function () {
var i = $("#dialogCloseEditor").data("index");
@ -60,7 +65,8 @@ var editors = {
if (editors.data[i].editor.doc.isClean()) {
return true;
} 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);
return false;
}

View File

@ -695,7 +695,7 @@ var wide = {
if (curEditor.doc.isClean()) { // 没有修改过,不需要保存
return false;
}
var mode = curEditor.getOption("mode");
var cursor = curEditor.getCursor();

View File

@ -223,54 +223,58 @@
<input placeholder="{{.i18n.file_format}}" />
</div>
<div id="dialogCloseEditor" class="dialog-form fn-none">
<button class="save">save</button>
<button class="discard">discard</button>
<button class="cancel">cancel</button>
<div></div><br/>
<div class="fn-right">
<button class="save">{{.i18n.save}}</button>
<button class="discard">{{.i18n.discard}}</button>
<button class="cancel">{{.i18n.cancel}}</button>
</div>
</div>
<script>
var config = {
"pathSeparator": '{{.pathSeparator}}',
"latestSessionContent": {{.latestSessionContent}},
"label": {
"restore_editor": "{{.i18n.restore_editor}}",
"max_editor": "{{.i18n.max_editor}}",
"delete": "{{.i18n.delete}}",
"cancel": "{{.i18n.cancel}}",
"goto_line": "{{.i18n.goto_line}}",
"go": "{{.i18n.go}}",
"create": "{{.i18n.create}}",
"create_file": "{{.i18n.create_file}}",
"create_dir": "{{.i18n.create_dir}}",
"tip": "{{.i18n.tip}}",
"confirm": "{{.i18n.confirm}}",
"build_n_run": "{{.i18n.build_n_run}}",
"stop": "{{.i18n.stop}}",
"find_usages": "{{.i18n.find_usages}}",
"search_text": "{{.i18n.search_text}}",
"search": "{{.i18n.search}}",
"start_page": "{{.i18n.start_page}}",
"confirm_save": "{{.i18n.confirm_save}}",
"community": "{{.i18n.community}}",
"about": "{{.i18n.about}}",
"new_version_available": "{{.i18n.new_version_available}}",
"colon": "{{.i18n.colon}}",
"uptodate": "{{.i18n.uptodate}}"
},
"channel": {
"editor": '{{.conf.EditorChannel}}',
"shell": '{{.conf.ShellChannel}}',
"output": '{{.conf.OutputChannel}}',
"session": '{{.conf.SessionChannel}}'
},
"wideSessionId": '{{.session.Id}}'
};
// 发往 Wide 的所有 AJAX 请求需要使用该函数创建请求参数.
function newWideRequest() {
var ret = {
sid: config.wideSessionId
};
return ret;
}
var config = {
"pathSeparator": '{{.pathSeparator}}',
"latestSessionContent": {{.latestSessionContent}},
"label": {
"restore_editor": "{{.i18n.restore_editor}}",
"max_editor": "{{.i18n.max_editor}}",
"delete": "{{.i18n.delete}}",
"cancel": "{{.i18n.cancel}}",
"goto_line": "{{.i18n.goto_line}}",
"go": "{{.i18n.go}}",
"create": "{{.i18n.create}}",
"create_file": "{{.i18n.create_file}}",
"create_dir": "{{.i18n.create_dir}}",
"tip": "{{.i18n.tip}}",
"confirm": "{{.i18n.confirm}}",
"build_n_run": "{{.i18n.build_n_run}}",
"stop": "{{.i18n.stop}}",
"find_usages": "{{.i18n.find_usages}}",
"search_text": "{{.i18n.search_text}}",
"search": "{{.i18n.search}}",
"start_page": "{{.i18n.start_page}}",
"confirm_save": "{{.i18n.confirm_save}}",
"community": "{{.i18n.community}}",
"about": "{{.i18n.about}}",
"new_version_available": "{{.i18n.new_version_available}}",
"colon": "{{.i18n.colon}}",
"file": "{{.i18n.file}}",
"uptodate": "{{.i18n.uptodate}}"
},
"channel": {
"editor": '{{.conf.EditorChannel}}',
"shell": '{{.conf.ShellChannel}}',
"output": '{{.conf.OutputChannel}}',
"session": '{{.conf.SessionChannel}}'
},
"wideSessionId": '{{.session.Id}}'
};
// 发往 Wide 的所有 AJAX 请求需要使用该函数创建请求参数.
function newWideRequest() {
var ret = {
sid: config.wideSessionId
};
return ret;
}
</script>
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/jquery-2.1.1.min.js"></script>