1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 20:13:22 +01:00

[ticket/10270] Made the alert after an AJAX operation optional.

PHPBB3-10270
This commit is contained in:
Callum Macrae 2011-08-24 16:25:54 +01:00 committed by Igor Wiedler
parent 4ae74cd4b4
commit fc7cb6a70b

View File

@ -224,7 +224,11 @@ phpbb.ajaxify = function(options, refresh, callback) {
if (typeof res.S_CONFIRM_ACTION === 'undefined') if (typeof res.S_CONFIRM_ACTION === 'undefined')
{ {
// It is a standard link, no confirm_box required. // It is a standard link, no confirm_box required.
if (typeof res.MESSAGE_TITLE !== 'undefined')
{
var alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT); var alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT);
}
if (typeof phpbb.ajax_callbacks[callback] === 'function') if (typeof phpbb.ajax_callbacks[callback] === 'function')
{ {
phpbb.ajax_callbacks[callback](that, res, (is_form) ? act : null); 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; path = res.S_CONFIRM_ACTION;
phpbb.loading_alert(); phpbb.loading_alert();
$.post(path, data + '&confirm=' + res.YES_VALUE, function(res) { $.post(path, data + '&confirm=' + res.YES_VALUE, function(res) {
if (typeof res.MESSAGE_TITLE !== 'undefined')
{
var alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT); var alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT);
}
if (typeof phpbb.ajax_callbacks[callback] === 'function') if (typeof phpbb.ajax_callbacks[callback] === 'function')
{ {
phpbb.ajax_callbacks[callback](that, res, (is_form) ? act : null); phpbb.ajax_callbacks[callback](that, res, (is_form) ? act : null);