mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-30 19:00:09 +00:00 
			
		
		
		
	some cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									8e9aa684ab
								
							
						
					
					
						commit
						b810a47fbb
					
				| @ -717,7 +717,29 @@ var StatusBarActions = actions.Actions({ | |||||||
| 
 | 
 | ||||||
| 	// XXX revise...
 | 	// XXX revise...
 | ||||||
| 	showStatusBarInfo: ['- Interface/', | 	showStatusBarInfo: ['- Interface/', | ||||||
| 		function(text, timeout){ | 		core.doc` | ||||||
|  | 			Show info... | ||||||
|  | 			.showStatusBarInfo(text) | ||||||
|  | 
 | ||||||
|  | 			Show info for timeout then fadeout... | ||||||
|  | 			.showStatusBarInfo(text, timeout) | ||||||
|  | 			.showStatusBarInfo(text, timeout, fadeout) | ||||||
|  | 
 | ||||||
|  | 			Hide info... | ||||||
|  | 			.showStatusBarInfo() | ||||||
|  | 			.showStatusBarInfo('') | ||||||
|  | 
 | ||||||
|  | 			Fadeout info for timeout... | ||||||
|  | 			.showStatusBarInfo(fadeout) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 		`,
 | ||||||
|  | 		function(text, timeout, fadeout){ | ||||||
|  | 			timeout = timeout === true ?  | ||||||
|  | 				1000  | ||||||
|  | 				: timeout | ||||||
|  | 			fadeout = fadeout || 200 | ||||||
|  | 
 | ||||||
| 			// reset clear timeout...
 | 			// reset clear timeout...
 | ||||||
| 			this.__statusbar_info_timeout | 			this.__statusbar_info_timeout | ||||||
| 				&& clearTimeout(this.__statusbar_info_timeout) | 				&& clearTimeout(this.__statusbar_info_timeout) | ||||||
| @ -725,9 +747,23 @@ var StatusBarActions = actions.Actions({ | |||||||
| 
 | 
 | ||||||
| 			var bar = this.dom.find('.state-indicator-container.global-info')  | 			var bar = this.dom.find('.state-indicator-container.global-info')  | ||||||
| 
 | 
 | ||||||
| 			text ? | 			// update the element...
 | ||||||
| 				bar.find('.info').text(text) | 			// show...
 | ||||||
| 				: bar.find('.info').empty() | 			;(typeof(text) == typeof('str')  | ||||||
|  | 					&& text.trim().length > 0) ? | ||||||
|  | 				bar.find('.info') | ||||||
|  | 					.empty() | ||||||
|  | 					.show() | ||||||
|  | 					.text(text) | ||||||
|  | 			// fadeout...
 | ||||||
|  | 			: typeof(text) == typeof(123) ? | ||||||
|  | 				bar.find('.info') | ||||||
|  | 					.fadeOut(text, function(){ | ||||||
|  | 						$(this).empty() }) | ||||||
|  | 			// hide...
 | ||||||
|  | 			: bar.find('.info') | ||||||
|  | 				.empty() | ||||||
|  | 				.show() | ||||||
| 
 | 
 | ||||||
| 			// clear after timeout...
 | 			// clear after timeout...
 | ||||||
| 			timeout  | 			timeout  | ||||||
| @ -735,7 +771,8 @@ var StatusBarActions = actions.Actions({ | |||||||
| 				&& (this.__statusbar_info_timeout =  | 				&& (this.__statusbar_info_timeout =  | ||||||
| 					setTimeout(function(){ | 					setTimeout(function(){ | ||||||
| 							delete this.__statusbar_info_timeout | 							delete this.__statusbar_info_timeout | ||||||
| 						this.showStatusBarInfo() }.bind(this), timeout)) }], | 							this.showStatusBarInfo(fadeout) }.bind(this),  | ||||||
|  | 						timeout)) }], | ||||||
| }) | }) | ||||||
| 
 | 
 | ||||||
| var StatusBar =  | var StatusBar =  | ||||||
|  | |||||||
| @ -2267,7 +2267,7 @@ module.PreviewFilters = core.ImageGridFeatures.Feature({ | |||||||
| 		['togglePreviewFilter', | 		['togglePreviewFilter', | ||||||
| 			function(res){ | 			function(res){ | ||||||
| 				res != 'No filters' ? | 				res != 'No filters' ? | ||||||
| 					this.showStatusBarInfo(res, 3000)  | 					this.showStatusBarInfo(res, 1000)  | ||||||
| 					: this.showStatusBarInfo() }], | 					: this.showStatusBarInfo() }], | ||||||
| 	], | 	], | ||||||
| }) | }) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user