folders deleted search query
This commit is contained in:
parent
894ccf09df
commit
7bc9397564
|
@ -528,10 +528,16 @@ app.controller('websiteCtrl', [
|
|||
};
|
||||
|
||||
vm.Sites.remove = function (r, opts) {
|
||||
var deletedFolder;
|
||||
if (!window.confirm("Delete files for this site?")) {
|
||||
return;
|
||||
}
|
||||
var pkg = Auth.oauth3.pkg('www@daplie.com');
|
||||
if (opts.path.includes('.')) {
|
||||
deletedFolder = false;
|
||||
} else {
|
||||
deletedFolder = true;
|
||||
}
|
||||
return pkg.remove({
|
||||
hostname: r.domain,
|
||||
domain: r.domain,
|
||||
|
@ -543,7 +549,14 @@ app.controller('websiteCtrl', [
|
|||
}).then(function (result) {
|
||||
var msg = "'"+ vm.pathRemoved + "'" + ' has been removed.';
|
||||
vm.buildNotification(result, msg);
|
||||
vm.Sites.contents(vm.copyR, vm.previousSearchQuery);
|
||||
if (deletedFolder) {
|
||||
var removeFolder = vm.previousSearchQuery.split('/');
|
||||
removeFolder.pop();
|
||||
vm.previousSearchQuery = removeFolder.join('/');
|
||||
vm.Sites.contents(vm.copyR, vm.previousSearchQuery);
|
||||
} else {
|
||||
vm.Sites.contents(vm.copyR, vm.previousSearchQuery);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue