mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	tweaking and fixing...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									bf73a289c2
								
							
						
					
					
						commit
						e4a8c6bb57
					
				| @ -288,18 +288,29 @@ Items.EditablePinnedList = function(values){} | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| // XXX EXPERIMENTAL...
 | // XXX EXPERIMENTAL...
 | ||||||
| // XXX get keys from options...
 | //
 | ||||||
|  | // options:
 | ||||||
|  | // 	{
 | ||||||
|  | // 		showOKButton: <bool>,
 | ||||||
|  | //
 | ||||||
|  | // 	}
 | ||||||
|  | //
 | ||||||
| Items.Confirm = function(message, accept, reject, options){ | Items.Confirm = function(message, accept, reject, options){ | ||||||
| 	return this(message,  | 	return this(message,  | ||||||
| 		Object.assign({ | 		Object.assign({ | ||||||
| 			// XXX should the user be able to merge buttons from options???
 | 			// XXX should the user be able to merge buttons from options???
 | ||||||
| 			buttons: [ | 			buttons: [ | ||||||
| 				...[reject instanceof Function ? | 				...(reject instanceof Function ? | ||||||
| 					['$Cancel', reject] | 					[['$Cancel', reject]] | ||||||
| 					: []], | 					: []), | ||||||
| 				...[accept instanceof Function ? | 				...(accept instanceof Function  | ||||||
| 					['$OK', accept] | 						&& (options || {}).showOKButton ? | ||||||
| 					: []], ], }, | 					[['$OK', accept]] | ||||||
|  | 					: []), ],  | ||||||
|  | 			}, | ||||||
|  | 			accept ?  | ||||||
|  | 				{open: accept} | ||||||
|  | 				: {}, | ||||||
| 			options || {})) } | 			options || {})) } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -3503,16 +3514,16 @@ module.KEYBOARD_CONFIG = { | |||||||
| 		Home: 'focus: "first"', | 		Home: 'focus: "first"', | ||||||
| 		End: 'focus: "last"', | 		End: 'focus: "last"', | ||||||
| 
 | 
 | ||||||
| 		'#1': 'focus: 0', | 		'#1': 'open: 0', | ||||||
| 		'#2': 'focus: 1', | 		'#2': 'open: 1', | ||||||
| 		'#3': 'focus: 2', | 		'#3': 'open: 2', | ||||||
| 		'#4': 'focus: 3', | 		'#4': 'open: 3', | ||||||
| 		'#5': 'focus: 4', | 		'#5': 'open: 4', | ||||||
| 		'#6': 'focus: 5', | 		'#6': 'open: 5', | ||||||
| 		'#7': 'focus: 6', | 		'#7': 'open: 6', | ||||||
| 		'#8': 'focus: 7', | 		'#8': 'open: 7', | ||||||
| 		'#9': 'focus: 8', | 		'#9': 'open: 8', | ||||||
| 		'#0': 'focus: 9', | 		'#0': 'open: 9', | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 		Enter: 'open', | 		Enter: 'open', | ||||||
| @ -4662,7 +4673,9 @@ var HTMLBrowserPrototype = { | |||||||
| 							if(!shortcuts[k]){ | 							if(!shortcuts[k]){ | ||||||
| 								shortcuts[k] = function(){  | 								shortcuts[k] = function(){  | ||||||
| 									// XXX should this focus or open???
 | 									// XXX should this focus or open???
 | ||||||
| 									that.focus(e) }  | 									that | ||||||
|  | 										.focus(e)  | ||||||
|  | 										.open(e) }  | ||||||
| 
 | 
 | ||||||
| 								var keys = e.keys = e.keys || [] | 								var keys = e.keys = e.keys || [] | ||||||
| 								keys.includes(k) | 								keys.includes(k) | ||||||
| @ -4707,6 +4720,7 @@ var HTMLBrowserPrototype = { | |||||||
| 					// refocus the dialog...
 | 					// refocus the dialog...
 | ||||||
| 					that.dom | 					that.dom | ||||||
| 						&& that.dom.focus() }) }, | 						&& that.dom.focus() }) }, | ||||||
|  | 	__open__: function(evt, elem){ this.focus(elem) }, | ||||||
| 	__expand__: function(){ this.update() }, | 	__expand__: function(){ this.update() }, | ||||||
| 	__collapse__: function(){ this.update() }, | 	__collapse__: function(){ this.update() }, | ||||||
| 	__select__: updateElemClass('add', 'selected'), | 	__select__: updateElemClass('add', 'selected'), | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user