From fb64b8bedc3cbc510e718dbaec7462b7d111e068 Mon Sep 17 00:00:00 2001 From: Jon Lambson Date: Thu, 5 Oct 2017 17:39:18 -0600 Subject: [PATCH 1/2] typo --- js/controllers/website-controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/controllers/website-controller.js b/js/controllers/website-controller.js index 47d8cf9..cf987fa 100644 --- a/js/controllers/website-controller.js +++ b/js/controllers/website-controller.js @@ -728,7 +728,7 @@ app.controller('websiteCtrl', [ vm.websiteTiles = true; vm.showBackBtn = true; vm.displayFileTree = true; - if (vm.currentFolder === undefined) { + if (vm.currentFolder === undefined || vm.currentFolder === 'hidden' || vm.currentFolder === 'root') { vm.currentFolder = 'All Folders/Files'; } break; From aa72c44bdb5f701094705914c2f5b4119c417109 Mon Sep 17 00:00:00 2001 From: Jon Lambson Date: Fri, 6 Oct 2017 12:02:03 -0600 Subject: [PATCH 2/2] fixing some upload weirdness --- js/controllers/website-controller.js | 12 +++++++----- templates/website.html | 3 ++- templates/widgets/filetree.html | 6 +++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/js/controllers/website-controller.js b/js/controllers/website-controller.js index cf987fa..03954a4 100644 --- a/js/controllers/website-controller.js +++ b/js/controllers/website-controller.js @@ -229,6 +229,7 @@ app.controller('websiteCtrl', [ var msg = vm.newFileUploaded + " has been uploaded" opts.progress.uploadTotal = 0; vm.buildNotification(result, msg); + vm.cleanPath(); // window.alert(JSON.stringify(result)); }); }; @@ -338,16 +339,15 @@ app.controller('websiteCtrl', [ }; vm.Sites.setUpload = function (r) { console.log("Hey! At least it can tell if there's a change!"); - if (r.newFile === undefined) { r.newFile = vm.newFile; } analyzeFile(r.newFile, r); vm.showCompleteFileUploadBtn = true; console.log(r); - }; vm.Sites.upload = function (r) { + r.uploadPath = undefined; if (r.uploadPath === undefined) { r.uploadPath = vm.autoPopulateWebPath; } @@ -394,9 +394,7 @@ app.controller('websiteCtrl', [ vm.deleteFilesFrom = function (r, path, opts) { var confirmMessage; - // vm.autoPopulateWebPath; opts = {}; - if (path === undefined) { confirmMessage = "Delete all files for this site?"; opts.path = '/'; @@ -423,6 +421,7 @@ app.controller('websiteCtrl', [ if (!window.confirm(confirmMessage)) { return; } + vm.Sites.remove(r, opts); }; @@ -496,6 +495,10 @@ app.controller('websiteCtrl', [ vm.cleanPath = function () { vm.savedPath = vm.autoPopulateWebPath; vm.autoPopulateWebPath = ''; + vm.hideFolderInput = ''; + vm.showUploadFilesContainer = false; + vm.showCompleteFileUploadBtn = false; + vm.showUploadFolderContainer = false; }; vm.showUploadButton = true; @@ -504,7 +507,6 @@ app.controller('websiteCtrl', [ if (vm.savedPath === undefined) { vm.savedPath = '/'; } - // vm.savedPath; vm.hideFolderInput = 'hidden'; vm.showFileUploadBtn = true; r.uploadPath = vm.savedPath + vm.autoPopulateWebPath; diff --git a/templates/website.html b/templates/website.html index e418804..0a4eefa 100644 --- a/templates/website.html +++ b/templates/website.html @@ -119,6 +119,7 @@
+
(pending)
@@ -182,7 +183,7 @@
- +

Delete

diff --git a/templates/widgets/filetree.html b/templates/widgets/filetree.html index be64038..90a843b 100644 --- a/templates/widgets/filetree.html +++ b/templates/widgets/filetree.html @@ -1,7 +1,7 @@
@@ -14,7 +14,7 @@
  • - +