|
@ -122,7 +122,7 @@ $.fn.popup = function(parameters) { |
|
|
destroy: function() { |
|
|
destroy: function() { |
|
|
module.debug('Destroying previous module'); |
|
|
module.debug('Destroying previous module'); |
|
|
if($popup && !settings.preserve) { |
|
|
if($popup && !settings.preserve) { |
|
|
module.remove(); |
|
|
|
|
|
|
|
|
module.removePopup(); |
|
|
} |
|
|
} |
|
|
$module |
|
|
$module |
|
|
.off(eventNamespace) |
|
|
.off(eventNamespace) |
|
@ -253,9 +253,7 @@ $.fn.popup = function(parameters) { |
|
|
|
|
|
|
|
|
hide: function(callback) { |
|
|
hide: function(callback) { |
|
|
callback = $.isFunction(callback) ? callback : function(){}; |
|
|
callback = $.isFunction(callback) ? callback : function(){}; |
|
|
$module |
|
|
|
|
|
.removeClass(className.visible) |
|
|
|
|
|
; |
|
|
|
|
|
|
|
|
module.remove.visible(); |
|
|
module.unbind.close(); |
|
|
module.unbind.close(); |
|
|
if( module.is.visible() ) { |
|
|
if( module.is.visible() ) { |
|
|
module.restore.conditions(); |
|
|
module.restore.conditions(); |
|
@ -293,10 +291,10 @@ $.fn.popup = function(parameters) { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
remove: function() { |
|
|
|
|
|
|
|
|
removePopup: function() { |
|
|
module.debug('Removing popup'); |
|
|
module.debug('Removing popup'); |
|
|
$popup |
|
|
$popup |
|
|
.remove() |
|
|
|
|
|
|
|
|
.removePopup() |
|
|
; |
|
|
; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -325,15 +323,15 @@ $.fn.popup = function(parameters) { |
|
|
show: function(callback) { |
|
|
show: function(callback) { |
|
|
callback = $.isFunction(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')) { |
|
|
$module |
|
|
|
|
|
.addClass(className.visible) |
|
|
|
|
|
; |
|
|
|
|
|
|
|
|
module.set.visible(); |
|
|
$popup |
|
|
$popup |
|
|
.transition({ |
|
|
.transition({ |
|
|
animation : settings.transition + ' in', |
|
|
|
|
|
queue : false, |
|
|
|
|
|
duration : settings.duration, |
|
|
|
|
|
onComplete : function() { |
|
|
|
|
|
|
|
|
animation : settings.transition + ' in', |
|
|
|
|
|
queue : false, |
|
|
|
|
|
debug : settings.debug, |
|
|
|
|
|
verbose : settings.verbose, |
|
|
|
|
|
duration : settings.duration, |
|
|
|
|
|
onComplete : function() { |
|
|
module.bind.close(); |
|
|
module.bind.close(); |
|
|
$.proxy(callback, element)(); |
|
|
$.proxy(callback, element)(); |
|
|
} |
|
|
} |
|
@ -341,9 +339,7 @@ $.fn.popup = function(parameters) { |
|
|
; |
|
|
; |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
$module |
|
|
|
|
|
.addClass(className.visible) |
|
|
|
|
|
; |
|
|
|
|
|
|
|
|
module.set.visible(); |
|
|
$popup |
|
|
$popup |
|
|
.stop() |
|
|
.stop() |
|
|
.fadeIn(settings.duration, settings.easing, function() { |
|
|
.fadeIn(settings.duration, settings.easing, function() { |
|
@ -363,6 +359,8 @@ $.fn.popup = function(parameters) { |
|
|
animation : settings.transition + ' out', |
|
|
animation : settings.transition + ' out', |
|
|
queue : false, |
|
|
queue : false, |
|
|
duration : settings.duration, |
|
|
duration : settings.duration, |
|
|
|
|
|
debug : settings.debug, |
|
|
|
|
|
verbose : settings.verbose, |
|
|
onComplete : function() { |
|
|
onComplete : function() { |
|
|
module.reset(); |
|
|
module.reset(); |
|
|
callback(); |
|
|
callback(); |
|
@ -625,8 +623,17 @@ $.fn.popup = function(parameters) { |
|
|
$popup.removeClass(className.loading); |
|
|
$popup.removeClass(className.loading); |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
visible: function() { |
|
|
|
|
|
$module.addClass(className.visible); |
|
|
} |
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
remove: { |
|
|
|
|
|
visible: function() { |
|
|
|
|
|
$module.removeClass(className.visible); |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
bind: { |
|
|
bind: { |
|
@ -698,9 +705,7 @@ $.fn.popup = function(parameters) { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
reset: function() { |
|
|
reset: function() { |
|
|
$popup |
|
|
|
|
|
.removeClass(className.visible) |
|
|
|
|
|
; |
|
|
|
|
|
|
|
|
module.remove.visible(); |
|
|
if(settings.preserve || settings.popup) { |
|
|
if(settings.preserve || settings.popup) { |
|
|
if($.fn.transition !== undefined) { |
|
|
if($.fn.transition !== undefined) { |
|
|
$popup |
|
|
$popup |
|
@ -709,7 +714,7 @@ $.fn.popup = function(parameters) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
module.remove(); |
|
|
|
|
|
|
|
|
module.removePopup(); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|