mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	fixed a bug in filtering...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									bff54a536b
								
							
						
					
					
						commit
						66f665be9b
					
				| @ -680,6 +680,7 @@ var BrowserPrototype = { | |||||||
| 	// NOTE: currently there is no way to search for whitespace explicitly,
 | 	// NOTE: currently there is no way to search for whitespace explicitly,
 | ||||||
| 	// 		at this point this is "by-design" as an experiment on how
 | 	// 		at this point this is "by-design" as an experiment on how
 | ||||||
| 	// 		vital this feature is.
 | 	// 		vital this feature is.
 | ||||||
|  | 	// NOTE: this will ignore items that are not visible.
 | ||||||
| 	//
 | 	//
 | ||||||
| 	// TODO need to support glob / nested patterns...
 | 	// TODO need to support glob / nested patterns...
 | ||||||
| 	// 		..things like /**/a*/*moo/ should list all matching items in
 | 	// 		..things like /**/a*/*moo/ should list all matching items in
 | ||||||
| @ -774,9 +775,11 @@ var BrowserPrototype = { | |||||||
| 		var browser = this.dom | 		var browser = this.dom | ||||||
| 
 | 
 | ||||||
| 		// show all...
 | 		// show all...
 | ||||||
| 		if(pattern == null || pattern.trim() == '*'){ |  | ||||||
| 		browser.find('.filtered-out') | 		browser.find('.filtered-out') | ||||||
| 			.removeClass('filtered-out') | 			.removeClass('filtered-out') | ||||||
|  | 
 | ||||||
|  | 		// clear match highlighting...
 | ||||||
|  | 		if(pattern == null || pattern.trim() == '*'){ | ||||||
| 			// clear the highlighting...
 | 			// clear the highlighting...
 | ||||||
| 			browser.find('.list b') | 			browser.find('.list b') | ||||||
| 				.replaceWith(function() { return this.innerHTML }) | 				.replaceWith(function() { return this.innerHTML }) | ||||||
| @ -797,8 +800,11 @@ var BrowserPrototype = { | |||||||
| 					// 		thus it will require manual setting of the
 | 					// 		thus it will require manual setting of the
 | ||||||
| 					// 		.filtered-out class
 | 					// 		.filtered-out class
 | ||||||
| 					false) | 					false) | ||||||
| 				// passed...
 | 				// NOTE: as .filter(..) ignores non visible elements including
 | ||||||
| 				.removeClass('filtered-out') | 				// 		filtered out stuff, we remove the class unconditionally
 | ||||||
|  | 				// 		above and do not need to do it here...
 | ||||||
|  | 				//// passed...
 | ||||||
|  | 				//.removeClass('filtered-out')
 | ||||||
| 				// NOTE: this will mess up (clear) any highlighting that was 
 | 				// NOTE: this will mess up (clear) any highlighting that was 
 | ||||||
| 				// 		present before...
 | 				// 		present before...
 | ||||||
| 				.each(function(_, e){ | 				.each(function(_, e){ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user