Commit 57465114 authored by ThorbenQuast's avatar ThorbenQuast
Browse files

code editor: refresh preview after successful poll

parent f0db6c0b
......@@ -249,7 +249,6 @@ var CodeEditor = Emitter.extend({
if (res.success) {
self.executed = true;
self.poll();
self.view.preview.refresh();
} else
self.view.alert("There's already a running job!");
self.view.ui.toggleExeButtons();
......@@ -269,8 +268,10 @@ var CodeEditor = Emitter.extend({
self.view.GET("poll", function(res) {
if (res.success) {
self.executed = false;
if (res.data)
if (res.data) {
self.appendOutput(res.data);
self.view.preview.refresh();
}
} else
self.poll();
self.view.ui.toggleExeButtons();
......
......@@ -84,19 +84,13 @@ var CodeEditorPreview = Emitter.extend({
setTimeout(self.startInterval.bind(self), 500);
};
if (this.inputFocused) {
done();
return this;
}
var path = this.pathInput.val();
/*
if (!path && this.editor.path) {
var parts = this.editor.path.split("/");
parts.pop();
path = parts.join("/");
}*/
if (path == null) {
done();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment