Fix #33
This commit is contained in:
parent
8a6e4a943c
commit
bd1d3ffca4
|
@ -204,7 +204,7 @@ var wide = {
|
||||||
tree.openFile(tree.fileTree.getNodeByTId(tId));
|
tree.openFile(tree.fileTree.getNodeByTId(tId));
|
||||||
tree.fileTree.selectNode(wide.curNode);
|
tree.fileTree.selectNode(wide.curNode);
|
||||||
$("#dialogGoFilePrompt").dialog("close");
|
$("#dialogGoFilePrompt").dialog("close");
|
||||||
wide.curEditor.focus();
|
wide.curEditor.focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#dialogGoFilePrompt").on("click", "li", function () {
|
$("#dialogGoFilePrompt").on("click", "li", function () {
|
||||||
|
@ -483,7 +483,6 @@ var wide = {
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
// reset the save state
|
// reset the save state
|
||||||
|
|
||||||
editor.doc.markClean();
|
editor.doc.markClean();
|
||||||
$(".edit-panel .tabs > div").each(function () {
|
$(".edit-panel .tabs > div").each(function () {
|
||||||
var $span = $(this).find("span:eq(0)");
|
var $span = $(this).find("span:eq(0)");
|
||||||
|
@ -508,6 +507,24 @@ var wide = {
|
||||||
if ("text/x-go" === editor.getOption("mode")) {
|
if ("text/x-go" === editor.getOption("mode")) {
|
||||||
wide.gofmt(path, wide.curEditor); // go fmt will save
|
wide.gofmt(path, wide.curEditor); // go fmt will save
|
||||||
|
|
||||||
|
// build the file at once
|
||||||
|
var request = newWideRequest();
|
||||||
|
request.file = path;
|
||||||
|
request.code = editor.getValue();
|
||||||
|
request.nextCmd = ""; // build only, no following operation
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: config.context + '/build',
|
||||||
|
data: JSON.stringify(request),
|
||||||
|
dataType: "json",
|
||||||
|
beforeSend: function (data) {
|
||||||
|
bottomGroup.resetOutput();
|
||||||
|
},
|
||||||
|
success: function (data) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue