diff --git a/js/controllers/website-controller.js b/js/controllers/website-controller.js index 85fcdac..e2cbfff 100644 --- a/js/controllers/website-controller.js +++ b/js/controllers/website-controller.js @@ -228,7 +228,12 @@ app.controller('websiteCtrl', [ , strip: opts.stripZip , path: opts.uploadPath }).then(function (result) { - var msg = vm.newFileUploaded + " has been uploaded" + debugger; + if (result.data.error) { + var msg = vm.newFileUploaded + " has encountered an error. " + result.data.error.message + '.'; + } else { + var msg = vm.newFileUploaded + " has been uploaded"; + } opts.progress.uploadTotal = 0; vm.buildNotification(result, msg); // window.alert(JSON.stringify(result)); @@ -341,6 +346,9 @@ 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); console.log(r); }; @@ -533,7 +541,6 @@ app.controller('websiteCtrl', [ vm.breadcrumbsPath = vm.strictPath.split('/'); vm.breadcrumbsPath.pop(); vm.breadcrumbsPath.push(vm.folderName); - debugger; } else { r.folderName = vm.breadcrumbsPath + vm.folderName; } @@ -550,7 +557,7 @@ app.controller('websiteCtrl', [ var pkg = Auth.oauth3.pkg('www@daplie.com'); //analyzeFile(r.newFile, r); if (r.folderName !== '' && r.folderName !== undefined) { - r.uploadPath = r.folderName + '/'; + r.uploadPath = r.folderName; debugger; } else { if (!Array.isArray(vm.breadcrumbsPath)) { diff --git a/templates/partials/menu.html b/templates/partials/menu.html index cd61a4a..bae2bf8 100644 --- a/templates/partials/menu.html +++ b/templates/partials/menu.html @@ -1,64 +1,62 @@
diff --git a/templates/website.html b/templates/website.html index 31517a4..f3e81b7 100644 --- a/templates/website.html +++ b/templates/website.html @@ -1,7 +1,7 @@