Commit 55e0fc30 authored by Marcel Rieger's avatar Marcel Rieger
Browse files

Minox fixes in workspaces.js.

parent f19dcd75
...@@ -355,6 +355,11 @@ define([ ...@@ -355,6 +355,11 @@ define([
return this; return this;
}, },
checkWorkspace: function(data, callback) {
// TODO
callback(null);
},
loading: function() { loading: function() {
return !!this.varData.loadingCount; return !!this.varData.loadingCount;
}, },
...@@ -1204,8 +1209,11 @@ define([ ...@@ -1204,8 +1209,11 @@ define([
} }
// tell the server // tell the server
vispa.POST(vispa.url.dynamic("ajax/deleteworkspace"), { wid: this.getId() }) vispa.POST(vispa.url.dynamic("ajax/deleteworkspace"), { wid: this.getId() }, function(err, res) {
.done(function(res) { if (err) {
callback(err);
return
}
// remove and unset nodes that were set during setup // remove and unset nodes that were set during setup
self.nodes.$workspaceMenuEntry.remove(); self.nodes.$workspaceMenuEntry.remove();
...@@ -1215,9 +1223,8 @@ define([ ...@@ -1215,9 +1223,8 @@ define([
self.logger.info("removed"); self.logger.info("removed");
self.emit("removed"); self.emit("removed");
callback(null); callback(null);
}).fail(function(err) {
callback(err.responseText);
}); });
return this; return this;
...@@ -1552,9 +1559,13 @@ define([ ...@@ -1552,9 +1559,13 @@ define([
return; return;
// perform the request // perform the request
setCheckStatus($footer, 1); setCheckStatus($footer, 1);
vispa.workspaces.checkWorkspace(data) vispa.workspaces.checkWorkspace(data, function(err) {
.done(setCheckStatus.bind(null, $footer, 2)) if (err) {
.fail(setCheckStatus.bind(null, $footer, 3)); setCheckStatus($footer, 3);
} else {
setCheckStatus($footer, 3);
}
});
}); });
// add // add
......
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