mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	fixed a bug with escaped filenames containing spaces, now normalizePath(...) unescapes by default (watchout for auto-escaping as a bug class)...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									943410fceb
								
							
						
					
					
						commit
						80fc58593a
					
				| @ -109,7 +109,7 @@ Roadmap | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| [_] 27% Gen 3 current todo | [_] 27% Gen 3 current todo | ||||||
| 	[_] 55% High priority | 	[_] 54% High priority | ||||||
| 		[_] Q: how do we mark unsorted sections in base ribbon after aligning? | 		[_] Q: how do we mark unsorted sections in base ribbon after aligning? | ||||||
| 		| - there is a big gap in the ribbon below, but it's not visible... | 		| - there is a big gap in the ribbon below, but it's not visible... | ||||||
| 		| - can we "mark" big gaps? ...what's the threshold of "big"? | 		| - can we "mark" big gaps? ...what's the threshold of "big"? | ||||||
| @ -387,6 +387,9 @@ Roadmap | |||||||
| 			[_] remove extra and repetitive actions | 			[_] remove extra and repetitive actions | ||||||
| 			[_] caching config | 			[_] caching config | ||||||
| 		[_] side-by side view... | 		[_] side-by side view... | ||||||
|  | 		[X] BUG: something wrong with the export dialog... | ||||||
|  | 		| when a different destination is specified nothing is copied  | ||||||
|  | 		| form the base ribbon... | ||||||
| 		[X] BUG: need to prioretize marks loading... | 		[X] BUG: need to prioretize marks loading... | ||||||
| 		| if no markes.json is empty then localstorage marks will get  | 		| if no markes.json is empty then localstorage marks will get  | ||||||
| 		| loaded... | 		| loaded... | ||||||
|  | |||||||
| @ -580,10 +580,12 @@ function setBaseURL(url){ | |||||||
| // 		- return relative paths as-is
 | // 		- return relative paths as-is
 | ||||||
| //
 | //
 | ||||||
| // NOTE: mode can be either 'absolute' (default) or 'relative'...
 | // NOTE: mode can be either 'absolute' (default) or 'relative'...
 | ||||||
| function normalizePath(url, base, mode){ | function normalizePath(url, base, mode, do_unescape){ | ||||||
| 	base = base == null ? getBaseURL() : base | 	base = base == null ? getBaseURL() : base | ||||||
| 	//mode = /^\./.test(base) && mode == null ? 'relative' : null
 | 	//mode = /^\./.test(base) && mode == null ? 'relative' : null
 | ||||||
| 	mode = mode == null ? 'absolute' : mode | 	mode = mode == null ? 'absolute' : mode | ||||||
|  | 	// XXX is this the correct default?
 | ||||||
|  | 	do_unescape = do_unescape == null ? true : do_unescape | ||||||
| 
 | 
 | ||||||
| 	res = '' | 	res = '' | ||||||
| 
 | 
 | ||||||
| @ -626,8 +628,12 @@ function normalizePath(url, base, mode){ | |||||||
| 	// XXX legacy support...
 | 	// XXX legacy support...
 | ||||||
| 	res = res.replace('.ImageGridCache', CACHE_DIR) | 	res = res.replace('.ImageGridCache', CACHE_DIR) | ||||||
| 
 | 
 | ||||||
|  | 	if(do_unescape){ | ||||||
|  | 		return unescape(res) | ||||||
|  | 	} else { | ||||||
| 		return res | 		return res | ||||||
| 	} | 	} | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| // Select best preview by size...
 | // Select best preview by size...
 | ||||||
| @ -1547,7 +1553,6 @@ function updateRibbonOrder(no_reload_viewer){ | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| // Action wrapper of alignDataToRibbon(...)
 | // Action wrapper of alignDataToRibbon(...)
 | ||||||
| //
 | //
 | ||||||
| // Align ribbons to the current ribbon.
 | // Align ribbons to the current ribbon.
 | ||||||
|  | |||||||
| @ -59,7 +59,7 @@ function updateGlobalImageInfo(image){ | |||||||
| 			// path...
 | 			// path...
 | ||||||
| 			'<span class="expanding-text path">'+ | 			'<span class="expanding-text path">'+ | ||||||
| 				'<span class="shown">'+ | 				'<span class="shown">'+ | ||||||
| 					data.path.split('/').pop() + | 					unescape(data.path.split('/').pop()) + | ||||||
| 				'</span>'+ | 				'</span>'+ | ||||||
| 				'<span class="hidden" '+ | 				'<span class="hidden" '+ | ||||||
| 						'style="position:absolute;'+ | 						'style="position:absolute;'+ | ||||||
|  | |||||||
							
								
								
									
										1
									
								
								ui/ui.js
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								ui/ui.js
									
									
									
									
									
								
							| @ -325,7 +325,6 @@ function getStatus(){ | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| // XXX move to ui.js?
 |  | ||||||
| function makeIndicator(text){ | function makeIndicator(text){ | ||||||
| 	return $('<span class="indicator expanding-text">'+ | 	return $('<span class="indicator expanding-text">'+ | ||||||
| 				'<span class="hidden">'+ text +'</span>'+ | 				'<span class="hidden">'+ text +'</span>'+ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user