diff --git a/js/controllers/website-controller.js b/js/controllers/website-controller.js index 4d8160c..3f61081 100644 --- a/js/controllers/website-controller.js +++ b/js/controllers/website-controller.js @@ -246,7 +246,7 @@ app.controller('websiteCtrl', [ var sub; var sld; var tld; - + debugger; /* //vm.unlock('webpreneur'); if (!vm.currentFiles || !vm.currentFiles.length) { @@ -356,6 +356,7 @@ app.controller('websiteCtrl', [ vm.Sites.allContents = function (r) { vm.copyR = r; vm.strictPath = r.shareAccess.path; + var pkg = Auth.oauth3.pkg('www@daplie.com'); return pkg.contents({ hostname: r.domain, @@ -382,6 +383,7 @@ app.controller('websiteCtrl', [ } }); vm.displaySpinner = 'hidden'; + vm.currentFolder = vm.breadcrumbs[vm.breadcrumbs.length - 1]; }); }; @@ -443,6 +445,7 @@ app.controller('websiteCtrl', [ crumbsCleanUp(dir); vm.Sites.contents(vm.copyR, vm.breadcrumbsPath.join('/')); } + vm.currentFolder = vm.breadcrumbs[vm.breadcrumbs.length - 1]; }; vm.getDirectories = function (dir) { @@ -461,6 +464,7 @@ app.controller('websiteCtrl', [ vm.breadcrumbsPath.unshift(''); vm.Sites.contents(vm.copyR, vm.breadcrumbsPath.join('/')); } + vm.currentFolder = vm.breadcrumbs[vm.breadcrumbs.length - 1]; }; vm.removeAllFiles = function (r, opts) { @@ -494,7 +498,16 @@ app.controller('websiteCtrl', [ vm.Sites.remove(r, opts); }; + vm.triggerDeleteFolder = function (path, r) { + path = cleanPathQuery(path); + var opts = { + path: path + } + vm.Sites.remove(r, opts) + } + vm.Sites.remove = function (r, opts) { + debugger; if (!window.confirm("Delete files for this site?")) { return; } @@ -620,7 +633,6 @@ app.controller('websiteCtrl', [ token: vm.Shares.inviteToken }).then(function (result) { window.alert(JSON.stringify(result)); - console.log('shasres') vm.listSites(); }); }; @@ -756,7 +768,7 @@ app.controller('websiteCtrl', [ $scope.$watch('vm.selectedDomain', function (domainSelected) { if (domainSelected !== undefined) { - vm.dom = domainSelected.description; + vm.dom = domainSelected; vm.selectDomain(vm.selectedDomain.description); } }); diff --git a/templates/widgets/filetree.html b/templates/widgets/filetree.html index 23b1d21..e578f91 100644 --- a/templates/widgets/filetree.html +++ b/templates/widgets/filetree.html @@ -24,18 +24,17 @@