aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/adm/style/overall_footer.html2
-rw-r--r--phpBB/assets/javascript/core.js18
-rw-r--r--phpBB/language/en/common.php2
-rw-r--r--phpBB/styles/prosilver/template/overall_footer.html2
4 files changed, 21 insertions, 3 deletions
diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html
index 549b6995af..dfe161fd76 100644
--- a/phpBB/adm/style/overall_footer.html
+++ b/phpBB/adm/style/overall_footer.html
@@ -18,7 +18,7 @@
{DEBUG_OUTPUT}
<!-- ENDIF -->
- <div id="darkenwrapper">
+ <div id="darkenwrapper" data-ajax-error-title="{L_AJAX_ERROR_TITLE}" data-ajax-error-text="{L_AJAX_ERROR_TEXT}">
<div id="darken">&nbsp;</div>
<div class="jalert" id="loadingalert"><h3>{L_LOADING}</h3><p>{L_PLEASE_WAIT}</p></div>
</div>
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index 488b095b47..1faec27316 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -324,12 +324,28 @@ phpbb.ajaxify = function(options) {
{
phpbb.loading_alert();
data = $('<form>' + res.S_HIDDEN_FIELDS + '</form>').serialize();
- $.post(res.S_CONFIRM_ACTION, data + '&confirm=' + res.YES_VALUE, return_handler);
+ $.ajax({
+ url: res.S_CONFIRM_ACTION,
+ type: 'POST',
+ data: data + '&confirm=' + res.YES_VALUE,
+ success: return_handler
+ });
}
}, false);
}
}
+ function error_handler()
+ {
+ var alert;
+
+ alert = phpbb.alert(dark.attr('data-ajax-error-title'), dark.attr('data-ajax-error-text'));
+
+ dark.fadeOut(phpbb.alert_time, function() {
+ alert.hide();
+ });
+ }
+
// If the element is a form, POST must be used and some extra data must
// be taken from the form.
var run_filter = (typeof options.filter === 'function');
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 4983aaca69..b92b915623 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -67,6 +67,8 @@ $lang = array_merge($lang, array(
'ADMINISTRATORS' => 'Administrators',
'AGE' => 'Age',
'AIM' => 'AIM',
+ 'AJAX_ERROR_TITLE' => 'AJAX error',
+ 'AJAX_ERROR_TEXT' => 'Something went wrong when processing your request.',
'ALLOWED' => 'Allowed',
'ALL_FILES' => 'All files',
'ALL_FORUMS' => 'All forums',
diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html
index 00de9029ec..ccc5b8b5de 100644
--- a/phpBB/styles/prosilver/template/overall_footer.html
+++ b/phpBB/styles/prosilver/template/overall_footer.html
@@ -25,7 +25,7 @@
<!-- IF U_ACP --><br /><strong><a href="{U_ACP}">{L_ACP}</a></strong><!-- ENDIF -->
</div>
- <div id="darkenwrapper">
+ <div id="darkenwrapper" data-ajax-error-title="{L_AJAX_ERROR_TITLE}" data-ajax-error-text="{L_AJAX_ERROR_TEXT}">
<div id="darken">&nbsp;</div>
<div class="jalert" id="loadingalert"><h3>{L_LOADING}</h3><p>{L_PLEASE_WAIT}</p></div>
</div>