diff --git a/js/controllers/website-controller.js b/js/controllers/website-controller.js index 79e9f42..bb400db 100644 --- a/js/controllers/website-controller.js +++ b/js/controllers/website-controller.js @@ -467,13 +467,24 @@ app.controller('websiteCtrl', [ vm.autoPopulateWebPath = updatebreadcrumbsPath.join(''); vm.autoPopulateWebPath = vm.autoPopulateWebPath + '/'; vm.breadcrumbsPath.push('/'); + debugger; } } if (site.shareAccess !== undefined) { if (site.shareAccess.path !== '/') { + vm.strictBreadcrumbs = site.shareAccess.path; vm.breadcrumbsPath = site.shareAccess.path.split('/'); vm.breadcrumbs = site.shareAccess.path.split('/'); - vm.breadcrumbs.splice(0,1,'root'); + if (vm.requestSearchPath !== undefined && vm.requestSearchPath.includes(vm.strictBreadcrumbs)) { + vm.breadcrumbsPath = vm.requestSearchPath.split('/'); + var lastItem = vm.breadcrumbsPath[vm.breadcrumbsPath.length - 1]; + vm.breadcrumbs.pop(); + vm.breadcrumbs.push(lastItem); + } + if (vm.breadcrumbPathClicked) { + debugger + + } } } } @@ -527,19 +538,19 @@ app.controller('websiteCtrl', [ }; vm.getDirectories = function (path) { - debugger; vm.displaySpinner = ''; vm.siteDirectories = []; vm.siteFiles = []; var site = vm.siteResults; vm.directoryPath = path; + path = site.shareAccess.path + path; + vm.requestSearchPath = path; vm.getSiteContents(path, site); vm.showUploadButton = false; vm.showFolderAction = false; }; vm.getDirectoriesFromBreadcrumbs = function (dir) { - debugger; if (dir === 'root') { vm.showFolderAction = true; vm.showUploadButton = true;