mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									dad135cd11
								
							
						
					
					
						commit
						3aa987d3d3
					
				| @ -1603,7 +1603,54 @@ var WidgetTestActions = actions.Actions({ | |||||||
| 				console.log('Dialog closing...') | 				console.log('Dialog closing...') | ||||||
| 			}) | 			}) | ||||||
| 		})], | 		})], | ||||||
| 	testList: ['Test/-99: Demo new style $lists in dialog...', | 	testBrowsrItems: ['Test/-99: Demo browse $items...', | ||||||
|  | 		makeUIDialog(function(){ | ||||||
|  | 			var actions = this | ||||||
|  | 
 | ||||||
|  | 			return browse.makeLister(null, function(path, make){ | ||||||
|  | 				var that = this | ||||||
|  | 
 | ||||||
|  | 				make.Heading('Heading:', { | ||||||
|  | 					doc: 'Heading doc string...', | ||||||
|  | 				}) | ||||||
|  | 
 | ||||||
|  | 				make('Normal item') | ||||||
|  | 
 | ||||||
|  | 				make.Editable('Select to edit...') | ||||||
|  | 
 | ||||||
|  | 				make.Editable('Enter to edit (cleared)...', { | ||||||
|  | 					start_on: 'open', | ||||||
|  | 					clear_on_edit: true, | ||||||
|  | 				}) | ||||||
|  | 
 | ||||||
|  | 				e = make.Editable('Nested editable...') | ||||||
|  | 				e.parent().append($('<div>').append(e)) | ||||||
|  | 
 | ||||||
|  | 				// this is the same as make('...')
 | ||||||
|  | 				make.Separator() | ||||||
|  | 
 | ||||||
|  | 				make.List(['a', 'b', 'c']) | ||||||
|  | 
 | ||||||
|  | 				make.Separator() | ||||||
|  | 
 | ||||||
|  | 				make.EditableList(['x', 'y', 'z']) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 				// NOTE: the dialog's .parent is not yet set at this point...
 | ||||||
|  | 
 | ||||||
|  | 				// This will finalize the dialog...
 | ||||||
|  | 				//
 | ||||||
|  | 				// NOTE: this is not needed here as the dialog is drawn
 | ||||||
|  | 				// 		on sync, but for async dialogs this will align
 | ||||||
|  | 				// 		the selected field correctly.
 | ||||||
|  | 				make.done() | ||||||
|  | 			}) | ||||||
|  | 			// NOTE: this is not a dialog event, it is defined by the 
 | ||||||
|  | 			// 		container to notify us that we are closing...
 | ||||||
|  | 			.on('close', function(){ | ||||||
|  | 			}) | ||||||
|  | 		})], | ||||||
|  | 	testList: ['Test/-99: Demo $lists editors in dialog...', | ||||||
| 		makeUIDialog(function(){ | 		makeUIDialog(function(){ | ||||||
| 			var actions = this | 			var actions = this | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -382,6 +382,7 @@ function(data, options){ | |||||||
| 	var make = this | 	var make = this | ||||||
| 	var res = [] | 	var res = [] | ||||||
| 	var keys = data instanceof Array ? data : Object.keys(data) | 	var keys = data instanceof Array ? data : Object.keys(data) | ||||||
|  | 	options = options || {} | ||||||
| 	var pattern = options.disableItemPattern | 	var pattern = options.disableItemPattern | ||||||
| 		&& RegExp(options.disableItemPattern)  | 		&& RegExp(options.disableItemPattern)  | ||||||
| 
 | 
 | ||||||
| @ -595,6 +596,7 @@ function(list, options){ | |||||||
| 	dialog.__to_remove = dialog.__to_remove || {} | 	dialog.__to_remove = dialog.__to_remove || {} | ||||||
| 	dialog.__editable_list_handlers = dialog.__editable_list_handlers || {} | 	dialog.__editable_list_handlers = dialog.__editable_list_handlers || {} | ||||||
| 
 | 
 | ||||||
|  | 	options = options || {} | ||||||
| 	var id = options.list_id || 'default'  | 	var id = options.list_id || 'default'  | ||||||
| 
 | 
 | ||||||
| 	var to_remove = dialog.__to_remove[id] = dialog.__to_remove[id] || [] | 	var to_remove = dialog.__to_remove[id] = dialog.__to_remove[id] || [] | ||||||
| @ -937,8 +939,6 @@ function(list, pins, options){ | |||||||
| 			pins.sort(options.sort)  | 			pins.sort(options.sort)  | ||||||
| 			: pins.sortAs(list)) | 			: pins.sortAs(list)) | ||||||
| 
 | 
 | ||||||
| 	console.log('>>>>', pins, list) |  | ||||||
| 
 |  | ||||||
| 	// build the list...
 | 	// build the list...
 | ||||||
| 	var res = this.EditableList(pins, pins_options) | 	var res = this.EditableList(pins, pins_options) | ||||||
| 		.addClass('pinned') | 		.addClass('pinned') | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user