From c0aa173f0753b102d8500d970a5c5d0ecd9a51f1 Mon Sep 17 00:00:00 2001 From: Chris Hallberg <crhallberg@gmail.com> Date: Fri, 5 Feb 2016 12:34:28 -0500 Subject: [PATCH] JS adaptation part uno. --- themes/bootstrap3/js/common.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/themes/bootstrap3/js/common.js b/themes/bootstrap3/js/common.js index 9528b20897e..bc54a19e961 100644 --- a/themes/bootstrap3/js/common.js +++ b/themes/bootstrap3/js/common.js @@ -225,22 +225,22 @@ function ajaxLogin(form) { dataType: 'json', data: params, success: function(response) { - if (response.status == 'OK') { - Lightbox.addCloseAction(refreshPageForLogin); - // and we update the modal - var params = deparam(Lightbox.lastURL); - if (params['subaction'] == 'UserLogin') { - Lightbox.close(); - } else { - Lightbox.getByUrl( - Lightbox.lastURL, - Lightbox.lastPOST, - Lightbox.changeContent - ); - } + Lightbox.addCloseAction(refreshPageForLogin); + // and we update the modal + var params = deparam(Lightbox.lastURL); + if (params['subaction'] == 'UserLogin') { + Lightbox.close(); } else { - Lightbox.displayError(response.data); + Lightbox.getByUrl( + Lightbox.lastURL, + Lightbox.lastPOST, + Lightbox.changeContent + ); } + }, + error: function(response) { + var json = JSON.parse(response.responseText); + Lightbox.displayError(json.data); } }); } else { -- GitLab