fixing breadcrumbs for restricted sharing
This commit is contained in:
		
							parent
							
								
									a000c8e6ae
								
							
						
					
					
						commit
						f68e126a3b
					
				@ -433,7 +433,13 @@ app.controller('websiteCtrl', [
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  vm.getDirectoriesFromBreadcrumbs = function (dir) {
 | 
					  vm.getDirectoriesFromBreadcrumbs = function (dir) {
 | 
				
			||||||
    if (vm.copyR.shareAccess.path !== '/') {
 | 
					    if (vm.copyR.shareAccess.path !== '/') {
 | 
				
			||||||
      crumbsCleanUp(dir);
 | 
					      var strictArray = vm.copyR.shareAccess.path.split('/');
 | 
				
			||||||
 | 
					      console.log('searching ->', cleanPathQuery(vm.breadcrumbsPath.join('/')));
 | 
				
			||||||
 | 
					      if (vm.breadcrumbsPath.join('/') === '') {
 | 
				
			||||||
 | 
					        vm.breadcrumbsPath = strictArray;
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        crumbsCleanUp(dir);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
      vm.Sites.contents(vm.copyR, vm.breadcrumbsPath.join('/'));
 | 
					      vm.Sites.contents(vm.copyR, vm.breadcrumbsPath.join('/'));
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      crumbsCleanUp(dir);
 | 
					      crumbsCleanUp(dir);
 | 
				
			||||||
@ -477,8 +483,13 @@ app.controller('websiteCtrl', [
 | 
				
			|||||||
        requestedPath = vm.breadcrumbsPath.join('/') + '/' + file;
 | 
					        requestedPath = vm.breadcrumbsPath.join('/') + '/' + file;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      debugger;
 | 
					      if (vm.breadcrumbsPath.length === 0 && r.shareAccess.path === '/') {
 | 
				
			||||||
 | 
					        requestedPath = r.shareAccess.path + file;
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        requestedPath = vm.breadcrumbsPath.join('/') + '/' + file;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    requestedPath = cleanPathQuery(requestedPath);
 | 
				
			||||||
    debugger;
 | 
					    debugger;
 | 
				
			||||||
    opts = {
 | 
					    opts = {
 | 
				
			||||||
      path: requestedPath
 | 
					      path: requestedPath
 | 
				
			||||||
@ -524,11 +535,6 @@ app.controller('websiteCtrl', [
 | 
				
			|||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  vm.shareFolderFrom = function (r, opts) {
 | 
					  vm.shareFolderFrom = function (r, opts) {
 | 
				
			||||||
    debugger;
 | 
					 | 
				
			||||||
    opts = {
 | 
					 | 
				
			||||||
      sharePath: sharePath,
 | 
					 | 
				
			||||||
      shareMode: vm.copiedShareMode
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
    var sharePath;
 | 
					    var sharePath;
 | 
				
			||||||
    if (vm.breadcrumbsPath.join('/') === '' && vm.breadcrumbs.join('/') === '') {
 | 
					    if (vm.breadcrumbsPath.join('/') === '' && vm.breadcrumbs.join('/') === '') {
 | 
				
			||||||
      sharePath = '/';
 | 
					      sharePath = '/';
 | 
				
			||||||
@ -536,6 +542,10 @@ app.controller('websiteCtrl', [
 | 
				
			|||||||
      sharePath = cleanPathQuery(vm.breadcrumbsPath.join('/'));
 | 
					      sharePath = cleanPathQuery(vm.breadcrumbsPath.join('/'));
 | 
				
			||||||
      sharePath = sharePath + '/';
 | 
					      sharePath = sharePath + '/';
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    opts = {
 | 
				
			||||||
 | 
					      sharePath: sharePath,
 | 
				
			||||||
 | 
					      shareMode: vm.copiedShareMode
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
    vm.Shares.invite(r, opts);
 | 
					    vm.Shares.invite(r, opts);
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -574,17 +584,20 @@ app.controller('websiteCtrl', [
 | 
				
			|||||||
        if (vm.breadcrumbsPath[0] !== '') {
 | 
					        if (vm.breadcrumbsPath[0] !== '') {
 | 
				
			||||||
          if (r.shareAccess.path !== '/') {
 | 
					          if (r.shareAccess.path !== '/') {
 | 
				
			||||||
            r.uploadPath = r.shareAccess.path;
 | 
					            r.uploadPath = r.shareAccess.path;
 | 
				
			||||||
 | 
					            debugger;
 | 
				
			||||||
          } else {
 | 
					          } else {
 | 
				
			||||||
            r.uploadPath = r.shareAccess.path;
 | 
					            r.uploadPath = r.shareAccess.path;
 | 
				
			||||||
            debugger;
 | 
					            debugger;
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
          vm.breadcrumbsPath.unshift('');
 | 
					          vm.breadcrumbsPath.unshift('');
 | 
				
			||||||
 | 
					          debugger;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        debugger;
 | 
					        debugger;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      if (vm.breadcrumbsPath.join('/') === '') {
 | 
					      if (vm.breadcrumbsPath.join('/') === '') {
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        r.uploadPath = vm.breadcrumbsPath.join('/') + '/';2
 | 
					        r.uploadPath = vm.breadcrumbsPath.join('/') + '/';
 | 
				
			||||||
 | 
					        r.uploadPath = cleanPathQuery(r.uploadPath);
 | 
				
			||||||
        debugger;
 | 
					        debugger;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -593,6 +606,7 @@ app.controller('websiteCtrl', [
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  vm.Shares = {};
 | 
					  vm.Shares = {};
 | 
				
			||||||
  vm.Shares.invite = function (r, opts) {
 | 
					  vm.Shares.invite = function (r, opts) {
 | 
				
			||||||
 | 
					    debugger;
 | 
				
			||||||
    var pkg = Auth.oauth3.pkg('www@daplie.com');
 | 
					    var pkg = Auth.oauth3.pkg('www@daplie.com');
 | 
				
			||||||
    return pkg.invite({
 | 
					    return pkg.invite({
 | 
				
			||||||
      comment: r.shareEmail
 | 
					      comment: r.shareEmail
 | 
				
			||||||
 | 
				
			|||||||
@ -17,12 +17,6 @@
 | 
				
			|||||||
      <p class="button-title">apps</p>
 | 
					      <p class="button-title">apps</p>
 | 
				
			||||||
    </a>
 | 
					    </a>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
  <div class="button-container" ui-sref-active="active">
 | 
					 | 
				
			||||||
    <a ui-sref=".websites">
 | 
					 | 
				
			||||||
      <button type="button" name="button" class="btn btn-default side-menu-button"><i class="fa fa-plane fa-2x" aria-hidden="true"></i></button>
 | 
					 | 
				
			||||||
      <p class="button-title">blah</p>
 | 
					 | 
				
			||||||
    </a>
 | 
					 | 
				
			||||||
  </div>
 | 
					 | 
				
			||||||
  <!--
 | 
					  <!--
 | 
				
			||||||
  <div class="button-container" ui-sref-active="active">
 | 
					  <div class="button-container" ui-sref-active="active">
 | 
				
			||||||
    <a ui-sref=".bolt">
 | 
					    <a ui-sref=".bolt">
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user