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) {
 | 
			
		||||
    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('/'));
 | 
			
		||||
    } else {
 | 
			
		||||
      crumbsCleanUp(dir);
 | 
			
		||||
@ -477,8 +483,13 @@ app.controller('websiteCtrl', [
 | 
			
		||||
        requestedPath = vm.breadcrumbsPath.join('/') + '/' + file;
 | 
			
		||||
      }
 | 
			
		||||
    } 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;
 | 
			
		||||
    opts = {
 | 
			
		||||
      path: requestedPath
 | 
			
		||||
@ -524,11 +535,6 @@ app.controller('websiteCtrl', [
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  vm.shareFolderFrom = function (r, opts) {
 | 
			
		||||
    debugger;
 | 
			
		||||
    opts = {
 | 
			
		||||
      sharePath: sharePath,
 | 
			
		||||
      shareMode: vm.copiedShareMode
 | 
			
		||||
    };
 | 
			
		||||
    var sharePath;
 | 
			
		||||
    if (vm.breadcrumbsPath.join('/') === '' && vm.breadcrumbs.join('/') === '') {
 | 
			
		||||
      sharePath = '/';
 | 
			
		||||
@ -536,6 +542,10 @@ app.controller('websiteCtrl', [
 | 
			
		||||
      sharePath = cleanPathQuery(vm.breadcrumbsPath.join('/'));
 | 
			
		||||
      sharePath = sharePath + '/';
 | 
			
		||||
    }
 | 
			
		||||
    opts = {
 | 
			
		||||
      sharePath: sharePath,
 | 
			
		||||
      shareMode: vm.copiedShareMode
 | 
			
		||||
    };
 | 
			
		||||
    vm.Shares.invite(r, opts);
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
@ -574,17 +584,20 @@ app.controller('websiteCtrl', [
 | 
			
		||||
        if (vm.breadcrumbsPath[0] !== '') {
 | 
			
		||||
          if (r.shareAccess.path !== '/') {
 | 
			
		||||
            r.uploadPath = r.shareAccess.path;
 | 
			
		||||
            debugger;
 | 
			
		||||
          } else {
 | 
			
		||||
            r.uploadPath = r.shareAccess.path;
 | 
			
		||||
            debugger;
 | 
			
		||||
          }
 | 
			
		||||
          vm.breadcrumbsPath.unshift('');
 | 
			
		||||
          debugger;
 | 
			
		||||
        }
 | 
			
		||||
        debugger;
 | 
			
		||||
      }
 | 
			
		||||
      if (vm.breadcrumbsPath.join('/') === '') {
 | 
			
		||||
      } else {
 | 
			
		||||
        r.uploadPath = vm.breadcrumbsPath.join('/') + '/';2
 | 
			
		||||
        r.uploadPath = vm.breadcrumbsPath.join('/') + '/';
 | 
			
		||||
        r.uploadPath = cleanPathQuery(r.uploadPath);
 | 
			
		||||
        debugger;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
@ -593,6 +606,7 @@ app.controller('websiteCtrl', [
 | 
			
		||||
 | 
			
		||||
  vm.Shares = {};
 | 
			
		||||
  vm.Shares.invite = function (r, opts) {
 | 
			
		||||
    debugger;
 | 
			
		||||
    var pkg = Auth.oauth3.pkg('www@daplie.com');
 | 
			
		||||
    return pkg.invite({
 | 
			
		||||
      comment: r.shareEmail
 | 
			
		||||
 | 
			
		||||
@ -17,12 +17,6 @@
 | 
			
		||||
      <p class="button-title">apps</p>
 | 
			
		||||
    </a>
 | 
			
		||||
  </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">
 | 
			
		||||
    <a ui-sref=".bolt">
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user