diff options
author | Callum Macrae <callum@lynxphp.com> | 2011-08-24 16:25:54 +0100 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2012-03-31 02:09:15 +0200 |
commit | fc7cb6a70b9e0422bf5658bb9f49de831be08718 (patch) | |
tree | 8af616d706c32628ca674f855e890c6cb20f4eb1 | |
parent | 4ae74cd4b450ae4cca956f6f3e2371429f67deec (diff) | |
download | forums-fc7cb6a70b9e0422bf5658bb9f49de831be08718.tar forums-fc7cb6a70b9e0422bf5658bb9f49de831be08718.tar.gz forums-fc7cb6a70b9e0422bf5658bb9f49de831be08718.tar.bz2 forums-fc7cb6a70b9e0422bf5658bb9f49de831be08718.tar.xz forums-fc7cb6a70b9e0422bf5658bb9f49de831be08718.zip |
[ticket/10270] Made the alert after an AJAX operation optional.
PHPBB3-10270
-rw-r--r-- | phpBB/styles/script.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/phpBB/styles/script.js b/phpBB/styles/script.js index 44b21906cc..16d64319d9 100644 --- a/phpBB/styles/script.js +++ b/phpBB/styles/script.js @@ -224,7 +224,11 @@ phpbb.ajaxify = function(options, refresh, callback) { if (typeof res.S_CONFIRM_ACTION === 'undefined') { // It is a standard link, no confirm_box required. - var alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT); + if (typeof res.MESSAGE_TITLE !== 'undefined') + { + var alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT); + } + if (typeof phpbb.ajax_callbacks[callback] === 'function') { phpbb.ajax_callbacks[callback](that, res, (is_form) ? act : null); @@ -241,7 +245,11 @@ phpbb.ajaxify = function(options, refresh, callback) { path = res.S_CONFIRM_ACTION; phpbb.loading_alert(); $.post(path, data + '&confirm=' + res.YES_VALUE, function(res) { - var alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT); + if (typeof res.MESSAGE_TITLE !== 'undefined') + { + var alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT); + } + if (typeof phpbb.ajax_callbacks[callback] === 'function') { phpbb.ajax_callbacks[callback](that, res, (is_form) ? act : null); |