mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	some refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									a15397c1af
								
							
						
					
					
						commit
						261a8690f4
					
				| @ -1198,6 +1198,8 @@ var FileSystemWriterUIActions = actions.Actions({ | |||||||
| 						'export-preview-size')) | 						'export-preview-size')) | ||||||
| 
 | 
 | ||||||
| 		}, | 		}, | ||||||
|  | 		// XXX make this editable on open and remove "new" from history...
 | ||||||
|  | 		// XXX add "history" button...
 | ||||||
| 		'target_dir': function(actions, make, overlay){ | 		'target_dir': function(actions, make, overlay){ | ||||||
| 			return make(['To: ',  | 			return make(['To: ',  | ||||||
| 				function(){ return actions.config['export-path'] || './' }],  | 				function(){ return actions.config['export-path'] || './' }],  | ||||||
| @ -1219,8 +1221,17 @@ var FileSystemWriterUIActions = actions.Actions({ | |||||||
| 								// XXX ugly...
 | 								// XXX ugly...
 | ||||||
| 								overlay.focus() | 								overlay.focus() | ||||||
| 							}) | 							}) | ||||||
| 					}] | 					}], | ||||||
|  | 					['histroy', widgets.makeNestedConfigListEditor(actions, overlay, | ||||||
|  | 						'export-paths', | ||||||
|  | 						'export-path', | ||||||
|  | 						{ | ||||||
|  | 							new_button: false, | ||||||
|  | 							// XXX add 'edit' button...
 | ||||||
|  | 							//itemButtons: []
 | ||||||
|  | 						})], | ||||||
| 				]}) | 				]}) | ||||||
|  | 				// XXX make this editable???
 | ||||||
| 				.on('open',  | 				.on('open',  | ||||||
| 					widgets.makeNestedConfigListEditor(actions, overlay, | 					widgets.makeNestedConfigListEditor(actions, overlay, | ||||||
| 						'export-paths', | 						'export-paths', | ||||||
|  | |||||||
| @ -114,15 +114,19 @@ function(actions, list_key, options){ | |||||||
| 						.push(txt) | 						.push(txt) | ||||||
| 
 | 
 | ||||||
| 					// unique...
 | 					// unique...
 | ||||||
| 					if(options.unique){ | 					if(options.unique == null || options.unique){ | ||||||
| 						actions.config[list_key] = actions.config[list_key] | 						actions.config[list_key] = actions.config[list_key] | ||||||
| 							.unique(options.unique !== true ? options.unique : undefined) | 							.unique(typeof(options.unique) == typeof(function(){}) ? | ||||||
|  | 								options.unique  | ||||||
|  | 								: undefined) | ||||||
| 					} | 					} | ||||||
| 
 | 
 | ||||||
| 					// sort...
 | 					// sort...
 | ||||||
| 					if(options.sort){ | 					if(options.sort){ | ||||||
| 						actions.config[list_key] = actions.config[list_key] | 						actions.config[list_key] = actions.config[list_key] | ||||||
| 							.sort(options.sort !== true ? options.sort : undefined) | 							.sort(typeof(options.sort) == typeof(function(){}) ?  | ||||||
|  | 								options.sort  | ||||||
|  | 								: undefined) | ||||||
| 					} | 					} | ||||||
| 
 | 
 | ||||||
| 					// update the list data...
 | 					// update the list data...
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user