Commit d4a32bcc authored by Martin Urban's avatar Martin Urban
Browse files

File: Remove complete list without looping

parent 1d8b995e
......@@ -131,6 +131,7 @@ class FSAjaxController(AbstractController):
self.release_session()
fs = self.get('fs')
self.release_database()
path = json.loads(path)
# 'path' can be a unicode/string or list of unicodes/strings
# so convert it with the convert function
fs.remove(path)
......
......@@ -150,7 +150,6 @@ var FileBaseActions = Class.extend({
var dfd = self.FileBase.instance.POST("/ajax/fs/paste", {
"path": this.FileBase.workflow.path,
// "paths": JSON.stringify(paths),
"paths": JSON.stringify(paths),
"cut": cut
});
......@@ -186,15 +185,13 @@ var FileBaseActions = Class.extend({
_remove: function() {
var self = this;
$.each(self.entries, function(index, path) {
var dfd = self.FileBase.instance.GET("/ajax/fs/remove", {
"path": path
});
dfd.done(function(response) {
self.FileBase.updateView();
});
var dfd = self.FileBase.instance.GET("/ajax/fs/remove", {
"path": JSON.stringify(self.entries)
});
dfd.done(function(response) {
self.FileBase.updateView();
this.entries = {};
});
this.entries = {};
},
download: function() {
......
Markdown is supported
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