diff --git a/mayan/apps/appearance/static/appearance/js/partial_navigation.js b/mayan/apps/appearance/static/appearance/js/partial_navigation.js index 6cabfb7baa..5f9b0e29fa 100644 --- a/mayan/apps/appearance/static/appearance/js/partial_navigation.js +++ b/mayan/apps/appearance/static/appearance/js/partial_navigation.js @@ -143,12 +143,15 @@ PartialNavigation.prototype.processAjaxRequestError = function (jqXHR) { * user. */ - if (jqXHR.status == 0) { - $('#modal-server-error .modal-body').html($('#template-error').html()); - $('#modal-server-error').modal('show') + if (djangoDEBUG) { + $('#ajax-content').html('
' + jqXHR.responseText + '
'); } else { - $('#ajax-content').html(jqXHR.responseText); - } + if (jqXHR.status == 0) { + $('#modal-server-error .modal-body').html($('#template-error').html()); + $('#modal-server-error').modal('show') + } else { + $('#ajax-content').html(jqXHR.responseText); + } } PartialNavigation.prototype.setLocation = function (newLocation, pushState) { diff --git a/mayan/apps/appearance/templates/appearance/root.html b/mayan/apps/appearance/templates/appearance/root.html index d4c0c9befe..f9fc425a86 100644 --- a/mayan/apps/appearance/templates/appearance/root.html +++ b/mayan/apps/appearance/templates/appearance/root.html @@ -170,7 +170,8 @@ {# Transfer variable from Django to javascript #} var initialURL = '{% url home_view %}'; Dropzone.autoDiscover = false; - + var djangoDEBUG = {% if debug %}true{% else %}false{% endif %}; + {% endcompress %}