mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	more cleanup and refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									1560ce647b
								
							
						
					
					
						commit
						bf66b217c2
					
				| @ -315,8 +315,14 @@ module.makeUIContainer = function(make){ | |||||||
| 	return uiContainer(function(){ | 	return uiContainer(function(){ | ||||||
| 		var o = make.apply(this, arguments) | 		var o = make.apply(this, arguments) | ||||||
| 
 | 
 | ||||||
| 		// notify the client that we are closing...
 | 		o | ||||||
| 		o.close(function(){ o.client.trigger('close') }) | 			// notify the client that we are closing...
 | ||||||
|  | 			.close(function(){ o.client.trigger('close') }) | ||||||
|  | 			.client | ||||||
|  | 				// NOTE: strictly this is the responsibility of the client
 | ||||||
|  | 				// 		but it is less error prone to just in case also do
 | ||||||
|  | 				// 		this here...
 | ||||||
|  | 				.on('close', function(evt){ evt.stopPropagation() }) | ||||||
| 
 | 
 | ||||||
| 		return o | 		return o | ||||||
| 	}) | 	}) | ||||||
|  | |||||||
| @ -2155,10 +2155,6 @@ var BrowserPrototype = { | |||||||
| 		setTimeout(function(){  | 		setTimeout(function(){  | ||||||
| 			that.update(options.path || that.path || '/') }, 0) | 			that.update(options.path || that.path || '/') }, 0) | ||||||
| 
 | 
 | ||||||
| 		if(this.options.nonPropagatedEvents != null){ |  | ||||||
| 			this.on(this.options.nonPropagatedEvents.join(' '),  |  | ||||||
| 				function(evt){ evt.stopPropagation() }) |  | ||||||
| 		} |  | ||||||
| 	}, | 	}, | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -20,9 +20,6 @@ var DrawerClassPrototype = { | |||||||
| 		var that = this | 		var that = this | ||||||
| 		var overlay = $('<div>') | 		var overlay = $('<div>') | ||||||
| 			.addClass('drawer-widget') | 			.addClass('drawer-widget') | ||||||
| 			.on(options.nonPropagatedEvents.join(' '), function(){ |  | ||||||
| 				event.stopPropagation() |  | ||||||
| 			}) |  | ||||||
| 			.append($('<div>') | 			.append($('<div>') | ||||||
| 				.addClass('content') | 				.addClass('content') | ||||||
| 				.click(function(){ | 				.click(function(){ | ||||||
| @ -58,6 +55,8 @@ var DrawerPrototype = { | |||||||
| 		nonPropagatedEvents: [ | 		nonPropagatedEvents: [ | ||||||
| 			'click', | 			'click', | ||||||
| 			'keydown', | 			'keydown', | ||||||
|  | 
 | ||||||
|  | 			'close', | ||||||
| 		], | 		], | ||||||
| 
 | 
 | ||||||
| 		background: null, | 		background: null, | ||||||
|  | |||||||
| @ -66,6 +66,8 @@ var WidgetPrototype = { | |||||||
| 		nonPropagatedEvents: [ | 		nonPropagatedEvents: [ | ||||||
| 			'click', | 			'click', | ||||||
| 			'keydown', | 			'keydown', | ||||||
|  | 
 | ||||||
|  | 			'close', | ||||||
| 		], | 		], | ||||||
| 	}, | 	}, | ||||||
| 
 | 
 | ||||||
| @ -121,6 +123,11 @@ var WidgetPrototype = { | |||||||
| 					this)) | 					this)) | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
|  | 		if(this.options.nonPropagatedEvents != null){ | ||||||
|  | 			this.on(this.options.nonPropagatedEvents.join(' '),  | ||||||
|  | 				function(evt){ evt.stopPropagation() }) | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
| 		return this | 		return this | ||||||
| 	}, | 	}, | ||||||
| } | } | ||||||
| @ -185,6 +192,11 @@ var ContainerPrototype = { | |||||||
| 					this)) | 					this)) | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
|  | 		if(this.options.nonPropagatedEvents != null){ | ||||||
|  | 			this.on(this.options.nonPropagatedEvents.join(' '),  | ||||||
|  | 				function(evt){ evt.stopPropagation() }) | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
| 		return this | 		return this | ||||||
| 	}, | 	}, | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user