fixing restricted paths
This commit is contained in:
parent
f26468d3dc
commit
0b52305043
|
@ -415,19 +415,20 @@ app.controller('websiteCtrl', [
|
|||
var arry = vm.breadcrumbsPath.split('/');
|
||||
arry.pop();
|
||||
var removeFromBreadcrumbs = arry.indexOf(dir) + 1;
|
||||
var notearry = vm.breadcrumbs;
|
||||
notearry.pop();
|
||||
var newArry = vm.breadcrumbs;
|
||||
newArry.pop();
|
||||
vm.breadcrumbsPath = arry.splice(0,removeFromBreadcrumbs);
|
||||
vm.breadcrumbs = vm.breadcrumbs.splice(0,removeFromBreadcrumbs);
|
||||
vm.Sites.contents(vm.copyR, vm.breadcrumbsPath.join('/'));
|
||||
} else {
|
||||
vm.breadcrumbsPath.unshift('');
|
||||
var removeFromBreadcrumbs = vm.breadcrumbsPath.indexOf(dir) + 1;
|
||||
vm.breadcrumbsPath = vm.breadcrumbsPath.splice(0,removeFromBreadcrumbs);
|
||||
vm.breadcrumbs = vm.breadcrumbs.splice(0,removeFromBreadcrumbs);
|
||||
vm.Sites.contents(vm.copyR, vm.breadcrumbsPath.join('/'));
|
||||
if (dir === 'root') {
|
||||
vm.breadcrumbs = ['root'];
|
||||
vm.breadcrumbsPath = [''];
|
||||
vm.breadcrumbsPath = [];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -519,11 +520,18 @@ app.controller('websiteCtrl', [
|
|||
};
|
||||
|
||||
vm.createNewFolder = function (r) {
|
||||
if (r.shareAccess.path !== '/') {
|
||||
vm.breadcrumbsPath;
|
||||
vm.breadcrumbs;
|
||||
r.folderName = vm.breadcrumbsPath + vm.folderName;
|
||||
debugger;
|
||||
} else {
|
||||
if (vm.breadcrumbsPath.join('/') === '') {
|
||||
r.folderName = '/' + vm.folderName + '/';
|
||||
} else {
|
||||
r.folderName = vm.breadcrumbsPath.join('/') + '/' + vm.folderName + '/';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
vm.Sites.upload = function (r) {
|
||||
|
@ -674,6 +682,12 @@ app.controller('websiteCtrl', [
|
|||
}, 0);
|
||||
};
|
||||
|
||||
vm.cleanArrays = function () {
|
||||
vm.breadcrumbsPath = [];
|
||||
vm.breadcrumbs = [];
|
||||
vm.siteFiles = [];
|
||||
vm.siteDirectories = [];
|
||||
};
|
||||
|
||||
vm.checkShareRights = function (r) {
|
||||
if (r.invitedBy) {
|
||||
|
|
|
@ -157,7 +157,7 @@
|
|||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="square-service-block">
|
||||
<a ng-click="vm.showAction('files'); vm.Sites.allContents(r);" class="cp trigger-files-list-refresh">
|
||||
<a ng-click="vm.cleanArrays(); vm.showAction('files'); vm.Sites.allContents(r);" class="cp trigger-files-list-refresh">
|
||||
<div class="ssb-icon"><i class="fa fa-sitemap" aria-hidden="true"></i></div>
|
||||
<h2 class="ssb-title">Files</h2>
|
||||
</a>
|
||||
|
|
Loading…
Reference in New Issue