This commit is contained in:
Liang Ding 2014-11-02 10:58:13 +08:00
parent b7634fa4a5
commit 91a8fdf871
3 changed files with 13 additions and 16 deletions

View File

@ -20,7 +20,7 @@
"Locale": "en_US",
"GoFormat": "gofmt",
"FontFamily": "Helvetica",
"FontSize": "inherit",
"FontSize": "13px",
"Editor": {
"FontFamily": "Consolas, 'Courier New', monospace",
"FontSize": "inherit"

View File

@ -714,17 +714,14 @@ var wide = {
switch (mode) {
case "text/x-go":
$.ajax({
async: false, // 同步执行
type: 'POST',
url: '/go/fmt',
data: JSON.stringify(request),
dataType: "json",
success: function (data) {
if (data.succ) {
curEditor.setValue(data.code);
curEditor.setCursor(cursor);
curEditor.scrollTo(null, scrollInfo.top);
return;
formatted = data.code;
}
}
});
@ -750,16 +747,16 @@ var wide = {
curEditor.scrollTo(null, scrollInfo.top);
wide._save();
}
// 清除未保存状态
curEditor.doc.markClean();
$(".edit-panel .tabs > div").each(function () {
var $span = $(this).find("span:eq(0)");
if ($span.attr("title") === path) {
$span.removeClass("changed");
}
});
// 清除未保存状态
curEditor.doc.markClean();
$(".edit-panel .tabs > div").each(function () {
var $span = $(this).find("span:eq(0)");
if ($span.attr("title") === path) {
$span.removeClass("changed");
}
});
}
},
openAbout: function () {
$("#dialogAbout").dialog("open");

View File

@ -2,7 +2,7 @@ body,
input,
button {
font-family: Helvetica;
font-size: inherit;
font-size: 13px;
}
.edit-exprinfo,