|
@ -7240,7 +7240,7 @@ $.fn.popup = function(parameters) { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
show: function(callback) { |
|
|
show: function(callback) { |
|
|
callback = callback || function(){}; |
|
|
callback = $.isFunction(callback) ? callback : function(){}; |
|
|
module.debug('Showing pop-up', settings.transition); |
|
|
module.debug('Showing pop-up', settings.transition); |
|
|
if(!settings.preserve && !settings.popup) { |
|
|
if(!settings.preserve && !settings.popup) { |
|
|
module.refresh(); |
|
|
module.refresh(); |
|
@ -7256,7 +7256,7 @@ $.fn.popup = function(parameters) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hide: function(callback) { |
|
|
hide: function(callback) { |
|
|
callback = callback || function(){}; |
|
|
callback = $.isFunction(callback) ? callback : function(){}; |
|
|
$module |
|
|
$module |
|
|
.removeClass(className.visible) |
|
|
.removeClass(className.visible) |
|
|
; |
|
|
; |
|
@ -7317,6 +7317,7 @@ $.fn.popup = function(parameters) { |
|
|
}, |
|
|
}, |
|
|
restore: { |
|
|
restore: { |
|
|
conditions: function() { |
|
|
conditions: function() { |
|
|
|
|
|
element.blur(); |
|
|
if(module.cache && module.cache.title) { |
|
|
if(module.cache && module.cache.title) { |
|
|
$module.attr('title', module.cache.title); |
|
|
$module.attr('title', module.cache.title); |
|
|
module.verbose('Restoring original attributes', module.cache.title); |
|
|
module.verbose('Restoring original attributes', module.cache.title); |
|
@ -7326,7 +7327,7 @@ $.fn.popup = function(parameters) { |
|
|
}, |
|
|
}, |
|
|
animate: { |
|
|
animate: { |
|
|
show: function(callback) { |
|
|
show: function(callback) { |
|
|
callback = callback || function(){}; |
|
|
callback = $.isFunction(callback) ? callback : function(){}; |
|
|
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) { |
|
|
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) { |
|
|
$popup |
|
|
$popup |
|
|
.transition({ |
|
|
.transition({ |
|
@ -7360,7 +7361,7 @@ $.fn.popup = function(parameters) { |
|
|
$.proxy(settings.onShow, element)(); |
|
|
$.proxy(settings.onShow, element)(); |
|
|
}, |
|
|
}, |
|
|
hide: function(callback) { |
|
|
hide: function(callback) { |
|
|
callback = callback || function(){}; |
|
|
callback = $.isFunction(callback) ? callback : function(){}; |
|
|
module.debug('Hiding pop-up'); |
|
|
module.debug('Hiding pop-up'); |
|
|
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) { |
|
|
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) { |
|
|
$popup |
|
|
$popup |
|
@ -7638,11 +7639,21 @@ $.fn.popup = function(parameters) { |
|
|
popup: function() { |
|
|
popup: function() { |
|
|
module.verbose('Allowing hover events on popup to prevent closing'); |
|
|
module.verbose('Allowing hover events on popup to prevent closing'); |
|
|
$popup |
|
|
$popup |
|
|
.on('mouseenter', module.event.start) |
|
|
.on('mouseenter' + eventNamespace, module.event.start) |
|
|
.on('mouseleave', module.event.end) |
|
|
.on('mouseleave' + eventNamespace, module.event.end) |
|
|
; |
|
|
; |
|
|
}, |
|
|
}, |
|
|
close:function() { |
|
|
close:function() { |
|
|
|
|
|
if(settings.hideOnScroll) { |
|
|
|
|
|
$document |
|
|
|
|
|
.on('touchmove' + eventNamespace, module.hideGracefully) |
|
|
|
|
|
.on('scroll' + eventNamespace, module.hideGracefully) |
|
|
|
|
|
; |
|
|
|
|
|
$context |
|
|
|
|
|
.on('touchmove' + eventNamespace, module.hideGracefully) |
|
|
|
|
|
.on('scroll' + eventNamespace, module.hideGracefully) |
|
|
|
|
|
; |
|
|
|
|
|
} |
|
|
if(settings.on == 'click' && settings.closable) { |
|
|
if(settings.on == 'click' && settings.closable) { |
|
|
module.verbose('Binding popup close event to document'); |
|
|
module.verbose('Binding popup close event to document'); |
|
|
$document |
|
|
$document |
|
@ -7657,6 +7668,14 @@ $.fn.popup = function(parameters) { |
|
|
|
|
|
|
|
|
unbind: { |
|
|
unbind: { |
|
|
close: function() { |
|
|
close: function() { |
|
|
|
|
|
if(settings.hideOnScroll) { |
|
|
|
|
|
$document |
|
|
|
|
|
.off('scroll' + eventNamespace, module.hide) |
|
|
|
|
|
; |
|
|
|
|
|
$context |
|
|
|
|
|
.off('scroll' + eventNamespace, module.hide) |
|
|
|
|
|
; |
|
|
|
|
|
} |
|
|
if(settings.on == 'click' && settings.closable) { |
|
|
if(settings.on == 'click' && settings.closable) { |
|
|
module.verbose('Removing close event from document'); |
|
|
module.verbose('Removing close event from document'); |
|
|
$document |
|
|
$document |
|
@ -7896,6 +7915,7 @@ $.fn.popup.settings = { |
|
|
|
|
|
|
|
|
on : 'hover', |
|
|
on : 'hover', |
|
|
closable : true, |
|
|
closable : true, |
|
|
|
|
|
hideOnScroll : true, |
|
|
|
|
|
|
|
|
context : 'body', |
|
|
context : 'body', |
|
|
position : 'top left', |
|
|
position : 'top left', |
|
|
xxxxxxxxxx