[ticket/10270] Fixed a bug with the close button in phpbb.confirm.

PHPBB3-10270
This commit is contained in:
Callum Macrae 2011-10-22 17:07:00 +01:00 committed by Igor Wiedler
parent cdfd746a25
commit e0d6814772

View file

@ -61,6 +61,7 @@ phpbb.alert = function(title, msg, fadedark) {
return true; return true;
}); });
dark.one('click', function(e) { dark.one('click', function(e) {
div.find('.alert_close').unbind('click');
var fade = (typeof fadedark !== 'undefined' && !fadedark) ? div : dark; var fade = (typeof fadedark !== 'undefined' && !fadedark) ? div : dark;
fade.fadeOut(phpbb.alert_time, function() { fade.fadeOut(phpbb.alert_time, function() {
div.hide(); div.hide();
@ -135,6 +136,7 @@ phpbb.confirm = function(msg, callback, fadedark) {
}); });
dark.one('click', function(e) { dark.one('click', function(e) {
div.find('.alert_close').unbind('click');
var fade = (typeof fadedark !== 'undefined' && !fadedark && res) ? div : dark; var fade = (typeof fadedark !== 'undefined' && !fadedark && res) ? div : dark;
fade.fadeOut(phpbb.alert_time, function() { fade.fadeOut(phpbb.alert_time, function() {
div.hide(); div.hide();
@ -155,7 +157,11 @@ phpbb.confirm = function(msg, callback, fadedark) {
}); });
div.find('.alert_close').one('click', function() { div.find('.alert_close').one('click', function() {
dark.trigger('click'); var fade = (typeof fadedark !== 'undefined' && fadedark) ? div : dark;
fade.fadeOut(phpbb.alert_time, function() {
div.hide();
});
callback(false);
}); });
if (loading_alert.is(':visible')) if (loading_alert.is(':visible'))