better reporting of 500 ajax errors, issue 832, thanks Paolo Velleri
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.4.1-alpha.1+timestamp.2012.12.23.23.33.10
|
Version 2.4.1-alpha.1+timestamp.2012.12.24.11.20.54
|
||||||
|
|||||||
@@ -50,6 +50,13 @@ function web2py_event_handlers() {
|
|||||||
window.location = redirect;
|
window.location = redirect;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
doc.ajaxError(function(e, xhr, settings, exception) {
|
||||||
|
doc.off('click', '.flash')
|
||||||
|
switch(xhr.status){
|
||||||
|
case 500:
|
||||||
|
$('.flash').html(ajax_error_500).slideDown();
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
jQuery(function() {
|
jQuery(function() {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
var w2p_ajax_confirm_message = "{{=T('Are you sure you want to delete this object?')}}";
|
var w2p_ajax_confirm_message = "{{=T('Are you sure you want to delete this object?')}}";
|
||||||
var w2p_ajax_date_format = "{{=T('%Y-%m-%d')}}";
|
var w2p_ajax_date_format = "{{=T('%Y-%m-%d')}}";
|
||||||
var w2p_ajax_datetime_format = "{{=T('%Y-%m-%d %H:%M:%S')}}";
|
var w2p_ajax_datetime_format = "{{=T('%Y-%m-%d %H:%M:%S')}}";
|
||||||
|
var ajax_error_500 = '{{=XML(T('An error occured, please %s the page') % A(T('reload'), _href=URL(args=request.args, vars=request.vars))) }}'
|
||||||
//--></script>
|
//--></script>
|
||||||
{{
|
{{
|
||||||
response.files.insert(0,URL('static','js/jquery.js'))
|
response.files.insert(0,URL('static','js/jquery.js'))
|
||||||
|
|||||||
@@ -50,6 +50,13 @@ function web2py_event_handlers() {
|
|||||||
window.location = redirect;
|
window.location = redirect;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
doc.ajaxError(function(e, xhr, settings, exception) {
|
||||||
|
doc.off('click', '.flash')
|
||||||
|
switch(xhr.status){
|
||||||
|
case 500:
|
||||||
|
$('.flash').html(ajax_error_500).slideDown();
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
jQuery(function() {
|
jQuery(function() {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
var w2p_ajax_confirm_message = "{{=T('Are you sure you want to delete this object?')}}";
|
var w2p_ajax_confirm_message = "{{=T('Are you sure you want to delete this object?')}}";
|
||||||
var w2p_ajax_date_format = "{{=T('%Y-%m-%d')}}";
|
var w2p_ajax_date_format = "{{=T('%Y-%m-%d')}}";
|
||||||
var w2p_ajax_datetime_format = "{{=T('%Y-%m-%d %H:%M:%S')}}";
|
var w2p_ajax_datetime_format = "{{=T('%Y-%m-%d %H:%M:%S')}}";
|
||||||
|
var ajax_error_500 = '{{=XML(T('An error occured, please %s the page') % A(T('reload'), _href=URL(args=request.args, vars=request.vars))) }}'
|
||||||
//--></script>
|
//--></script>
|
||||||
{{
|
{{
|
||||||
response.files.insert(0,URL('static','js/jquery.js'))
|
response.files.insert(0,URL('static','js/jquery.js'))
|
||||||
|
|||||||
@@ -50,6 +50,13 @@ function web2py_event_handlers() {
|
|||||||
window.location = redirect;
|
window.location = redirect;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
doc.ajaxError(function(e, xhr, settings, exception) {
|
||||||
|
doc.off('click', '.flash')
|
||||||
|
switch(xhr.status){
|
||||||
|
case 500:
|
||||||
|
$('.flash').html(ajax_error_500).slideDown();
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
jQuery(function() {
|
jQuery(function() {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
var w2p_ajax_confirm_message = "{{=T('Are you sure you want to delete this object?')}}";
|
var w2p_ajax_confirm_message = "{{=T('Are you sure you want to delete this object?')}}";
|
||||||
var w2p_ajax_date_format = "{{=T('%Y-%m-%d')}}";
|
var w2p_ajax_date_format = "{{=T('%Y-%m-%d')}}";
|
||||||
var w2p_ajax_datetime_format = "{{=T('%Y-%m-%d %H:%M:%S')}}";
|
var w2p_ajax_datetime_format = "{{=T('%Y-%m-%d %H:%M:%S')}}";
|
||||||
|
var ajax_error_500 = '{{=XML(T('An error occured, please %s the page') % A(T('reload'), _href=URL(args=request.args, vars=request.vars))) }}'
|
||||||
//--></script>
|
//--></script>
|
||||||
{{
|
{{
|
||||||
response.files.insert(0,URL('static','js/jquery.js'))
|
response.files.insert(0,URL('static','js/jquery.js'))
|
||||||
|
|||||||
Reference in New Issue
Block a user