mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Fix ajax error not being shown
This commit is contained in:
@@ -330,9 +330,11 @@ var ajaxErrDialog = {
|
||||
$("#ajaxerr .links").html("<a class='btn btn-default ajaxerr-close'>"
|
||||
+ gettext("Close message") + "</a>");
|
||||
$("body").addClass("ajaxerr has-modal-dialog");
|
||||
$("#ajaxerr").prop("hidden", false);
|
||||
},
|
||||
hide: function () {
|
||||
"use strict";
|
||||
$("body").removeClass("ajaxerr has-modal-dialog");
|
||||
$("#ajaxerr").prop("hidden", true);
|
||||
},
|
||||
};
|
||||
|
||||
@@ -60,7 +60,7 @@ var i18nToString = function (i18nstring) {
|
||||
$(document).ajaxError(function (event, jqXHR, settings, thrownError) {
|
||||
waitingDialog.hide();
|
||||
var c = $(jqXHR.responseText).filter('.container');
|
||||
if (jqXHR.responseText.indexOf("<!-- pretix-login-marker -->") !== -1) {
|
||||
if (jqXHR.responseText && jqXHR.responseText.indexOf("<!-- pretix-login-marker -->") !== -1) {
|
||||
location.href = '/control/login?next=' + encodeURIComponent(location.pathname + location.search + location.hash)
|
||||
} else if (c.length > 0) {
|
||||
ajaxErrDialog.show(c.first().html());
|
||||
|
||||
Reference in New Issue
Block a user