diff --git a/js/controllers/website-controller.js b/js/controllers/website-controller.js index a840e96..2583a75 100644 --- a/js/controllers/website-controller.js +++ b/js/controllers/website-controller.js @@ -233,7 +233,9 @@ app.controller('websiteCtrl', [ } opts.progress.uploadTotal = 0; vm.buildNotification(result, msg); - vm.Sites.contents(vm.copyR, vm.previousSearchQuery); + vm.cleanArrays(); + vm.Sites.allContents(vm.copyR); + // vm.Sites.contents(vm.copyR, vm.previousSearchQuery); }); }; @@ -529,6 +531,7 @@ app.controller('websiteCtrl', [ }; vm.triggerDeleteFolder = function (path, r) { + vm.deletedFolder = true; path = cleanPathQuery(path); var opts = { path: path @@ -559,9 +562,13 @@ app.controller('websiteCtrl', [ var msg = "'"+ vm.pathRemoved + "'" + ' has been removed.'; vm.buildNotification(result, msg); if (deletedFolder) { - vm.Sites.contents(vm.copyR, vm.previousSearchQuery); + vm.cleanArrays(); + vm.Sites.allContents(vm.copyR); + // vm.Sites.contents(vm.copyR, vm.previousSearchQuery); } else { - vm.Sites.contents(vm.copyR, vm.previousSearchQuery); + vm.cleanArrays(); + vm.Sites.allContents(vm.copyR); + // vm.Sites.contents(vm.copyR, vm.previousSearchQuery); } }); }; @@ -618,6 +625,7 @@ app.controller('websiteCtrl', [ vm.count = 0; vm.isRoot = true; + vm.deletedFolder = false; vm.Sites.upload = function (r) { var pkg = Auth.oauth3.pkg('www@daplie.com'); //analyzeFile(r.newFile, r);