mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 11:20:09 +00:00 
			
		
		
		
	some refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									944243ea4b
								
							
						
					
					
						commit
						af73385a87
					
				| @ -172,7 +172,7 @@ requirejs([ | |||||||
| 
 | 
 | ||||||
| 	// XXX split this into several dialogues, show each and then combine... | 	// XXX split this into several dialogues, show each and then combine... | ||||||
| 	dialog = browser.Browser( | 	dialog = browser.Browser( | ||||||
| 		browser.Browser.PATH_HEADER, | 		browser.Browser.PATH_DISPLAY, | ||||||
| 		function(make){ | 		function(make){ | ||||||
| 			make(['list', 'of', 'text']) | 			make(['list', 'of', 'text']) | ||||||
| 			make.group( | 			make.group( | ||||||
| @ -242,7 +242,7 @@ requirejs([ | |||||||
| 						return make(i) })) | 						return make(i) })) | ||||||
| 
 | 
 | ||||||
| 		},  | 		},  | ||||||
| 		browser.Browser.INFO_FOOTER, | 		browser.Browser.INFO_DISPLAY, | ||||||
| 		{ | 		{ | ||||||
| 			itemButtons: [ | 			itemButtons: [ | ||||||
| 				['–',  | 				['–',  | ||||||
|  | |||||||
| @ -3423,39 +3423,54 @@ var updateElemClass = function(action, cls, handler){ | |||||||
| var HTMLBrowserClassPrototype = { | var HTMLBrowserClassPrototype = { | ||||||
| 	__proto__: BaseBrowser, | 	__proto__: BaseBrowser, | ||||||
| 
 | 
 | ||||||
| 		// XXX move this into the browser2.js
 | 	// Headers...
 | ||||||
| 		//		-> .options.defaultHeader
 | 	//
 | ||||||
| 		//		-> Browser.PATH_HEADER
 | 	// Item path...
 | ||||||
| 	// XXX add search/filter field...
 | 	// XXX add search/filter field...
 | ||||||
| 		// XXX add
 | 	// XXX add path navigation...
 | ||||||
| 	PATH_HEADER: function(make, options){ | 	PATH_DISPLAY: function(make, options){ | ||||||
| 		make('CURRENT_PATH', { | 		// indicator...
 | ||||||
| 			id: 'header_current_path', | 		var e = make('CURRENT_PATH', { | ||||||
|  | 				id: 'item_path_display', | ||||||
| 				cls: 'path', | 				cls: 'path', | ||||||
| 				buttons: (options || {}).headerButtons  | 				buttons: (options || {}).headerButtons  | ||||||
| 					|| (this.options || {}).headerButtons  | 					|| (this.options || {}).headerButtons  | ||||||
| 					|| [], })  | 					|| [], })  | ||||||
| 		this.focus(function(){ | 			.last() | ||||||
| 			var e = this.get({id: 'header_current_path'}, {section: 'header'}) | 		// event handlers...
 | ||||||
|  | 		this | ||||||
|  | 			.off('*', 'item_path_display') | ||||||
|  | 			.on('focus',  | ||||||
|  | 				function(){ | ||||||
| 					e.value = this.pathArray | 					e.value = this.pathArray | ||||||
| 			this.renderItem(e) }) }, | 					this.renderItem(e) }, | ||||||
|  | 				'item_path_display') }, | ||||||
|  | 
 | ||||||
|  | 	// Footers...
 | ||||||
|  | 	//
 | ||||||
|  | 	// Item info...
 | ||||||
| 	// XXX use focused element...
 | 	// XXX use focused element...
 | ||||||
| 	// XXX add on mouse over...
 | 	// XXX add on mouse over...
 | ||||||
| 	INFO_FOOTER: function(make, options){ | 	INFO_DISPLAY: function(make, options){ | ||||||
| 		make('INFO', { | 		// indicator...
 | ||||||
| 			id: 'footer_info', | 		var e = make('INFO', { | ||||||
|  | 				id: 'item_info_display', | ||||||
| 				cls: 'info', | 				cls: 'info', | ||||||
| 				buttons: (options || {}).footerButtons  | 				buttons: (options || {}).footerButtons  | ||||||
| 					|| (this.options || {}).footerButtons  | 					|| (this.options || {}).footerButtons  | ||||||
| 					|| [], }) | 					|| [], }) | ||||||
| 		this.focus(function(){ | 			.last() | ||||||
|  | 		// event handlers...
 | ||||||
|  | 		this | ||||||
|  | 			.off('*', 'item_info_display') | ||||||
|  | 			.on('focus', | ||||||
|  | 				function(){ | ||||||
| 					var focused = this.focused | 					var focused = this.focused | ||||||
| 			var e = this.get({id: 'footer_info'}, {section: 'footer'}) |  | ||||||
| 					e.value = focused.info  | 					e.value = focused.info  | ||||||
| 						|| focused.alt | 						|| focused.alt | ||||||
| 						|| ' ' | 						|| ' ' | ||||||
| 			this.renderItem(e) }) | 					this.renderItem(e) }, | ||||||
| 	}, | 			'item_info_display') }, | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // XXX render of nested lists does not affect the parent list(s)...
 | // XXX render of nested lists does not affect the parent list(s)...
 | ||||||
| @ -3470,8 +3485,9 @@ var HTMLBrowserPrototype = { | |||||||
| 	options: { | 	options: { | ||||||
| 		__proto__: BaseBrowser.prototype.options, | 		__proto__: BaseBrowser.prototype.options, | ||||||
| 
 | 
 | ||||||
| 		// XXX not used...
 | 		// XXX not used yet...
 | ||||||
| 		defaultHeader: 'PATH_HEADER', | 		//defaultHeader: 'PATH_DISPLAY',
 | ||||||
|  | 		//defaultFooter: 'INFO_DISPLAY',
 | ||||||
| 
 | 
 | ||||||
| 		// for more docs see:
 | 		// for more docs see:
 | ||||||
| 		//	https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
 | 		//	https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user