mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +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(){
|
||||
var o = make.apply(this, arguments)
|
||||
|
||||
// notify the client that we are closing...
|
||||
o.close(function(){ o.client.trigger('close') })
|
||||
o
|
||||
// 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
|
||||
})
|
||||
|
||||
@ -2155,10 +2155,6 @@ var BrowserPrototype = {
|
||||
setTimeout(function(){
|
||||
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 overlay = $('<div>')
|
||||
.addClass('drawer-widget')
|
||||
.on(options.nonPropagatedEvents.join(' '), function(){
|
||||
event.stopPropagation()
|
||||
})
|
||||
.append($('<div>')
|
||||
.addClass('content')
|
||||
.click(function(){
|
||||
@ -58,6 +55,8 @@ var DrawerPrototype = {
|
||||
nonPropagatedEvents: [
|
||||
'click',
|
||||
'keydown',
|
||||
|
||||
'close',
|
||||
],
|
||||
|
||||
background: null,
|
||||
|
||||
@ -66,6 +66,8 @@ var WidgetPrototype = {
|
||||
nonPropagatedEvents: [
|
||||
'click',
|
||||
'keydown',
|
||||
|
||||
'close',
|
||||
],
|
||||
},
|
||||
|
||||
@ -121,6 +123,11 @@ var WidgetPrototype = {
|
||||
this))
|
||||
}
|
||||
|
||||
if(this.options.nonPropagatedEvents != null){
|
||||
this.on(this.options.nonPropagatedEvents.join(' '),
|
||||
function(evt){ evt.stopPropagation() })
|
||||
}
|
||||
|
||||
return this
|
||||
},
|
||||
}
|
||||
@ -185,6 +192,11 @@ var ContainerPrototype = {
|
||||
this))
|
||||
}
|
||||
|
||||
if(this.options.nonPropagatedEvents != null){
|
||||
this.on(this.options.nonPropagatedEvents.join(' '),
|
||||
function(evt){ evt.stopPropagation() })
|
||||
}
|
||||
|
||||
return this
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user