fixed paths

This commit is contained in:
Jon Lambson 2017-10-27 15:01:13 -06:00
parent 1fda0db360
commit cd578bd85f
1 changed files with 4 additions and 23 deletions

View File

@ -235,7 +235,6 @@ app.controller('websiteCtrl', [
opts.progress.uploadTotal = 0; opts.progress.uploadTotal = 0;
vm.buildNotification(result, msg); vm.buildNotification(result, msg);
vm.cleanArrays(); vm.cleanArrays();
debugger;
var path = vm.breadcrumbsPath.join('/'); var path = vm.breadcrumbsPath.join('/');
cleanPathQuery(path); cleanPathQuery(path);
vm.Sites.contents(vm.copyR, vm.cleanedPath); vm.Sites.contents(vm.copyR, vm.cleanedPath);
@ -383,21 +382,6 @@ app.controller('websiteCtrl', [
}); });
}; };
vm.Sites.contents = function (r) {
debugger;
var pkg = Auth.oauth3.pkg('www@daplie.com');
return pkg.contents({
hostname: r.domain
, domain: r.domain
, tld: r.tld
, sld: r.sld
//, sub: r.sub
, path: r.newPath
}).then(function (result) {
debugger;
});
};
var cleanPathQuery = function (path) { var cleanPathQuery = function (path) {
vm.cleanedPath = path.replace(/\/+/g, '/'); vm.cleanedPath = path.replace(/\/+/g, '/');
return vm.cleanedPath; return vm.cleanedPath;
@ -424,6 +408,7 @@ app.controller('websiteCtrl', [
// sub: r.sub, // sub: r.sub,
path: dir path: dir
}).then(function (result) { }).then(function (result) {
vm.cleanArrays();
vm.displaySpinner = 'hidden'; vm.displaySpinner = 'hidden';
vm.folderStructure = result; vm.folderStructure = result;
result.data.forEach(function(data){ result.data.forEach(function(data){
@ -489,7 +474,6 @@ app.controller('websiteCtrl', [
var opts = { var opts = {
path: path path: path
}; };
debugger;
vm.Sites.remove(r, opts); vm.Sites.remove(r, opts);
}; };
@ -724,12 +708,9 @@ app.controller('websiteCtrl', [
vm.breadcrumbs.push(crumb); vm.breadcrumbs.push(crumb);
} }
}); });
console.log('vm.breadcrumbs ->', vm.breadcrumbs.join('/')); if (vm.copyR.shareAccess.path !== '/') {
console.log('vm.breadcrumbsPath ->', vm.breadcrumbsPath.join('/')); } else {
console.log('vm.previousSearchQuery ->', vm.previousSearchQuery); vm.breadcrumbs.unshift('root');
if (vm.copyR.shareAccess.path === '/') {
vm.breadcrumbs.push('root');
vm.breadcrumbsPath.push('');
} }
}; };