fixing upload path from inside a folder

This commit is contained in:
Jon Lambson 2017-10-13 11:28:14 -06:00
parent ddf5cc5ad3
commit 2c696b642b
2 changed files with 4 additions and 5 deletions

View File

@ -348,7 +348,7 @@ app.controller('websiteCtrl', [
};
vm.Sites.upload = function (r) {
if (r.uploadPath === undefined) {
r.uploadPath = vm.autoPopulateWebPath;
r.uploadPath = vm.breadcrumbsPath.join('');
} else {
r.uploadPath = vm.breadcrumbsPath.join('') + vm.autoPopulateWebPath;
}
@ -665,9 +665,8 @@ app.controller('websiteCtrl', [
sites = _sites.concat(sites);
return;
}
console.error('_sites is not an array');
console.error(_sites);
// console.error('_sites is not an array');
// console.error(_sites);
}, function (err) {
console.error('_sites had an error');
console.error(err);

View File

@ -29,7 +29,7 @@
<button type="button" name="button" class="btn btn-block btn-primary" ng-click="vm.showAction('invite');">Share folder</button>
<ul class="ls-none folder-actions-list">
<li class="" ng-hide="vm.showFolderAction"><span><i class="fa fa-upload cp"></i> <a ng-click="vm.showUploadFilesContainer = true; vm.autoPopulateFolderName(); vm.showUploadFolderContainer = false;" class="cp">Upload files</a></span></li>
<li class=""><span><i class="fa fa-folder cp"></i> <a ng-click="vm.cleanPath(); vm.showUploadFolderContainer = true;" class="cp">New folder</a></span></li>
<li class=""><span><i class="fa fa-folder cp"></i> <a ng-click="vm.cleanPath(); vm.showUploadFolderContainer = true; vm.showFileUploadBtn = false;" class="cp">New folder</a></span></li>
<li ng-hide="vm.showUploadButton"><span><i class="fa fa-trash cp"></i> <a ng-click="vm.triggerDeleteFolder(vm.currentFolder, r)" data="{{ vm.currentFolder }}" class="cp">Delete {{ vm.currentFolder | capitalize }} Folder</a></span></li>
</ul>
</div>