mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 19:30:07 +00:00 
			
		
		
		
	basic work on display modes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									8dacec8a26
								
							
						
					
					
						commit
						369578f285
					
				| @ -219,6 +219,7 @@ var MetadataUIActions = actions.Actions({ | ||||
| 		], | ||||
| 	}, | ||||
| 
 | ||||
| 	// XXX should we replace 'mode' with nested set of metadata???
 | ||||
| 	showMetadata: ['Image/Show metadata', | ||||
| 		function(image, mode){ | ||||
| 			image = this.data.getImage(image) | ||||
| @ -242,13 +243,17 @@ var MetadataUIActions = actions.Actions({ | ||||
| 					.capitalize() | ||||
| 
 | ||||
| 				// skip metadata stuff in short mode...
 | ||||
| 				if(mode == 'short'  | ||||
| 				if(mode != 'full'  | ||||
| 						&& field_order.indexOf(n) == -1){ | ||||
| 					return | ||||
| 					if(mode == 'short'){ | ||||
| 						return | ||||
| 
 | ||||
| 					} else if(mode == 'disabled') { | ||||
| 						n = '- ' + n | ||||
| 					} | ||||
| 				} | ||||
| 
 | ||||
| 				fields.push([ n + ': ', | ||||
| 						metadata[k] ]) | ||||
| 				fields.push([ n + ': ', metadata[k] ]) | ||||
| 			}) | ||||
| 
 | ||||
| 			// sort fields...
 | ||||
| @ -260,11 +265,6 @@ var MetadataUIActions = actions.Actions({ | ||||
| 				return a - b | ||||
| 			}) | ||||
| 
 | ||||
| 			// XXX replace field names with pretty names...
 | ||||
| 			// XXX do two types of fields:
 | ||||
| 			// 		- base
 | ||||
| 			// 		- other (browse.Browse + sub-directory???)
 | ||||
| 			 | ||||
| 			var o = overlay.Overlay(this.ribbons.viewer,  | ||||
| 				browse.makeList( | ||||
| 						null, | ||||
|  | ||||
| @ -2098,11 +2098,19 @@ ListPrototype.options = { | ||||
| 				var n = k | ||||
| 
 | ||||
| 				// XXX make this support list args as well...
 | ||||
| 				if(pattern && typeof(k) == typeof('str')){ | ||||
| 					var n = k.replace(pattern, '') | ||||
| 					if(n != k){ | ||||
| 				if(pattern){ | ||||
| 					var t = typeof(n) == typeof('str') ? n : n[0] | ||||
| 
 | ||||
| 					var tt = t.replace(pattern, '') | ||||
| 					if(t != tt){ | ||||
| 						disable = true | ||||
| 
 | ||||
| 						if(typeof(k) == typeof('str')){ | ||||
| 							n = tt | ||||
| 						} else { | ||||
| 							n[0] = tt | ||||
| 						} | ||||
| 
 | ||||
| 						if(that.options.skipDisabledItems){ | ||||
| 							return | ||||
| 						} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user