fixing more restrictions
This commit is contained in:
		
							parent
							
								
									fabac7b5f2
								
							
						
					
					
						commit
						092714087e
					
				| @ -231,6 +231,7 @@ app.controller('websiteCtrl', [ | |||||||
|       } |       } | ||||||
|       opts.progress.uploadTotal = 0; |       opts.progress.uploadTotal = 0; | ||||||
|       vm.buildNotification(result, msg); |       vm.buildNotification(result, msg); | ||||||
|  |       vm.Sites.contents(vm.copyR, vm.previousSearchQuery); | ||||||
|     }); |     }); | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
| @ -354,7 +355,7 @@ app.controller('websiteCtrl', [ | |||||||
|   vm.Sites.allContents = function (r) { |   vm.Sites.allContents = function (r) { | ||||||
|     vm.copyR = r; |     vm.copyR = r; | ||||||
|     vm.strictPath = r.shareAccess.path; |     vm.strictPath = r.shareAccess.path; | ||||||
| 
 |     vm.previousSearchQuery = vm.strictPath; | ||||||
|     var pkg = Auth.oauth3.pkg('www@daplie.com'); |     var pkg = Auth.oauth3.pkg('www@daplie.com'); | ||||||
|     return pkg.contents({ |     return pkg.contents({ | ||||||
|       hostname: r.domain, |       hostname: r.domain, | ||||||
| @ -400,6 +401,7 @@ app.controller('websiteCtrl', [ | |||||||
|     vm.siteDirectories = []; |     vm.siteDirectories = []; | ||||||
|     cleanPathQuery(dir); |     cleanPathQuery(dir); | ||||||
|     dir = vm.cleanedPath; |     dir = vm.cleanedPath; | ||||||
|  |     vm.previousSearchQuery = dir; | ||||||
|     vm.displaySpinner = ''; |     vm.displaySpinner = ''; | ||||||
|     var pkg = Auth.oauth3.pkg('www@daplie.com'); |     var pkg = Auth.oauth3.pkg('www@daplie.com'); | ||||||
|     console.log('searching ->', cleanPathQuery(vm.breadcrumbsPath.join('/'))); |     console.log('searching ->', cleanPathQuery(vm.breadcrumbsPath.join('/'))); | ||||||
| @ -435,6 +437,7 @@ app.controller('websiteCtrl', [ | |||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   vm.getDirectoriesFromBreadcrumbs = function (dir) { |   vm.getDirectoriesFromBreadcrumbs = function (dir) { | ||||||
|  |     debugger; | ||||||
|     if (vm.copyR.shareAccess.path !== '/') { |     if (vm.copyR.shareAccess.path !== '/') { | ||||||
|       var strictArray = vm.copyR.shareAccess.path.split('/'); |       var strictArray = vm.copyR.shareAccess.path.split('/'); | ||||||
|       console.log('searching ->', cleanPathQuery(vm.breadcrumbsPath.join('/'))); |       console.log('searching ->', cleanPathQuery(vm.breadcrumbsPath.join('/'))); | ||||||
| @ -457,9 +460,10 @@ app.controller('websiteCtrl', [ | |||||||
|       if (vm.breadcrumbsPath.length === 0) { |       if (vm.breadcrumbsPath.length === 0) { | ||||||
|         var breadcrumblies = vm.strictPath + dir; |         var breadcrumblies = vm.strictPath + dir; | ||||||
|         vm.breadcrumbsPath = breadcrumblies.split('/'); |         vm.breadcrumbsPath = breadcrumblies.split('/'); | ||||||
|       } else { |  | ||||||
|         vm.breadcrumbsPath.push(dir); |  | ||||||
|       } |       } | ||||||
|  |       // else {
 | ||||||
|  |       //   vm.breadcrumbsPath.push(dir);
 | ||||||
|  |       // }
 | ||||||
|       vm.Sites.contents(vm.copyR, vm.breadcrumbsPath.join('/')); |       vm.Sites.contents(vm.copyR, vm.breadcrumbsPath.join('/')); | ||||||
|     } else { |     } else { | ||||||
|       vm.breadcrumbs.push(dir); |       vm.breadcrumbs.push(dir); | ||||||
| @ -483,9 +487,13 @@ app.controller('websiteCtrl', [ | |||||||
|     var requestedPath; |     var requestedPath; | ||||||
|     if (r.shareAccess.path !== '/') { |     if (r.shareAccess.path !== '/') { | ||||||
|       if (vm.breadcrumbsPath.length === 0) { |       if (vm.breadcrumbsPath.length === 0) { | ||||||
|         requestedPath = r.shareAccess.path + file; |         requestedPath = r.shareAccess.path + '/' + file; | ||||||
|       } else { |       } else { | ||||||
|         requestedPath = vm.breadcrumbsPath.join('/') + '/' + file; |         if (r.shareAccess.path !== '/' && vm.breadcrumbsPath.join('/') !== '') { | ||||||
|  |           requestedPath = vm.breadcrumbsPath.join('/') + '/' + file; | ||||||
|  |         } else { | ||||||
|  |           requestedPath = vm.breadcrumbsPath.join('/') + '/' + file; | ||||||
|  |         } | ||||||
|       } |       } | ||||||
|     } else { |     } else { | ||||||
|       if (vm.breadcrumbsPath.length === 0 && r.shareAccess.path === '/') { |       if (vm.breadcrumbsPath.length === 0 && r.shareAccess.path === '/') { | ||||||
| @ -495,6 +503,7 @@ app.controller('websiteCtrl', [ | |||||||
|       } |       } | ||||||
|     } |     } | ||||||
|     requestedPath = cleanPathQuery(requestedPath); |     requestedPath = cleanPathQuery(requestedPath); | ||||||
|  |     debugger; | ||||||
|     opts = { |     opts = { | ||||||
|       path: requestedPath |       path: requestedPath | ||||||
|     }; |     }; | ||||||
| @ -526,6 +535,7 @@ app.controller('websiteCtrl', [ | |||||||
|     }).then(function (result) { |     }).then(function (result) { | ||||||
|       var msg = "'"+ vm.pathRemoved + "'" + ' has been removed'; |       var msg = "'"+ vm.pathRemoved + "'" + ' has been removed'; | ||||||
|       vm.buildNotification(result, msg); |       vm.buildNotification(result, msg); | ||||||
|  |       vm.Sites.contents(vm.copyR, vm.previousSearchQuery); | ||||||
|     }); |     }); | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user