thats paths

This commit is contained in:
Jon Lambson 2017-10-26 16:27:26 -06:00
parent 7bc9397564
commit 2579370bae
1 changed files with 21 additions and 4 deletions

View File

@ -441,6 +441,7 @@ app.controller('websiteCtrl', [
};
vm.getDirectoriesFromBreadcrumbs = function (dir) {
vm.isRoot = false;
if (vm.copyR.shareAccess.path !== '/') {
var strictArray = vm.copyR.shareAccess.path.split('/');
if (vm.breadcrumbsPath.join('/') === '') {
@ -463,11 +464,20 @@ app.controller('websiteCtrl', [
vm.breadcrumbsPath = breadcrumblies.split('/');
vm.breadcrumbs.push(dir);
} else {
if (vm.copyR.shareAccess.path !== '/') {
vm.breadcrumbsPath.push(dir);
vm.breadcrumbs.push(dir);
if (vm.copyR.shareAccess.path !== '/' && vm.copyR.newFile) {
if (vm.count === 1) {
vm.breadcrumbsPath.push(dir);
vm.breadcrumbs.push(dir);
} else {
if (vm.isRoot) {
vm.breadcrumbsPath.pop();
}
vm.breadcrumbsPath.push(dir);
vm.breadcrumbs.push(dir);
}
} else {
vm.breadcrumbsPath.push(dir);
vm.breadcrumbs.push(dir);
}
}
vm.Sites.contents(vm.copyR, vm.breadcrumbsPath.join('/'));
@ -478,6 +488,7 @@ app.controller('websiteCtrl', [
vm.Sites.contents(vm.copyR, vm.breadcrumbsPath.join('/'));
}
vm.currentFolder = vm.breadcrumbs[vm.breadcrumbs.length - 1];
console.log(vm.breadcrumbsPath.join('/'));
};
vm.removeAllFiles = function (r, opts) {
@ -512,7 +523,6 @@ app.controller('websiteCtrl', [
requestedPath = vm.breadcrumbsPath.join('/') + '/' + file;
}
}
requestedPath = cleanPathQuery(requestedPath);
opts = {
path: requestedPath
};
@ -553,6 +563,8 @@ app.controller('websiteCtrl', [
var removeFolder = vm.previousSearchQuery.split('/');
removeFolder.pop();
vm.previousSearchQuery = removeFolder.join('/');
vm.breadcrumbs.pop();
vm.breadcrumbsPath.pop();
vm.Sites.contents(vm.copyR, vm.previousSearchQuery);
} else {
vm.Sites.contents(vm.copyR, vm.previousSearchQuery);
@ -616,6 +628,8 @@ app.controller('websiteCtrl', [
}
};
vm.count = 0;
vm.isRoot = true;
vm.Sites.upload = function (r) {
var pkg = Auth.oauth3.pkg('www@daplie.com');
//analyzeFile(r.newFile, r);
@ -641,6 +655,9 @@ app.controller('websiteCtrl', [
r.uploadPath = cleanPathQuery(r.uploadPath);
}
}
if (vm.copyR.newFile) {
vm.copyR.fAmount = vm.count++;
}
vm._uploadFile(pkg, r);
};