preference tip 多语言修改

This commit is contained in:
Van 2014-12-09 15:07:26 +08:00
parent ed40c5b5f6
commit 41ba5a2d1a
1 changed files with 6 additions and 6 deletions

View File

@ -310,12 +310,17 @@ var menu = {
if (emptys.length === 0) { if (emptys.length === 0) {
$("#dialogPreference").find(".tip").html(""); $("#dialogPreference").find(".tip").html("");
$okBtn.prop("disabled", false);
} else { } else {
for (var i = 0, max = emptys.length; i < max; i++) { for (var i = 0, max = emptys.length; i < max; i++) {
emptysTip += '[' + emptys[i].closest('div').data("index") + '] -> [' + emptys[i].attr("name") var tabIndex = emptys[i].closest('div').data("index"),
text = $.trim(emptys[i].parent().text());
emptysTip += '[' + $("#dialogPreference .tabs > div[data-index=" + tabIndex + "]").text()
+ '] -> [' + text.substr(0, text.length - 1)
+ ']: ' + config.label.no_empty + "<br/>"; + ']: ' + config.label.no_empty + "<br/>";
} }
$("#dialogPreference").find(".tip").html(emptysTip); $("#dialogPreference").find(".tip").html(emptysTip);
$okBtn.prop("disabled", true);
} }
}); });
@ -363,11 +368,6 @@ var menu = {
$editorTheme = $dialogPreference.find("select[name=editorTheme]"), $editorTheme = $dialogPreference.find("select[name=editorTheme]"),
$editorTabSize = $dialogPreference.find("input[name=editorTabSize]"); $editorTabSize = $dialogPreference.find("input[name=editorTabSize]");
if ($.trim($email.val()) === "") {
$dialogPreference.find(".tip").html("[user] -> [email]: " + config.label.no_empty);
return false;
}
$.extend(request, { $.extend(request, {
"fontFamily": $fontFamily.val(), "fontFamily": $fontFamily.val(),
"fontSize": $fontSize.val(), "fontSize": $fontSize.val(),