diff --git a/themes/bootstrap3/js/common.js b/themes/bootstrap3/js/common.js index 1481a818bb828d5a30cdd125265e43d6211535ea..57536d19aeb39eff98133183d47563be096f680d 100644 --- a/themes/bootstrap3/js/common.js +++ b/themes/bootstrap3/js/common.js @@ -194,7 +194,7 @@ function newAccountHandler(html) { // This is a full handler for the login form function ajaxLogin(form) { - $.ajax({ + Lightbox.ajax({ url: VuFind.getPath() + '/AJAX/JSON?method=getSalt', dataType: 'json' }) diff --git a/themes/bootstrap3/js/lightbox.js b/themes/bootstrap3/js/lightbox.js index 48ec009a4c3cc9d3a2b5032773e7126bcaf80fed..0b7c1c20bd692a81192ae8fd9480440645e47d80 100644 --- a/themes/bootstrap3/js/lightbox.js +++ b/themes/bootstrap3/js/lightbox.js @@ -475,7 +475,7 @@ $(document).ready(function() { }); Lightbox.addFormHandler('exportForm', function(evt) { - $.ajax({ + Lightbox.ajax({ url: VuFind.getPath() + '/AJAX/JSON?' + $.param({method:'exportFavorites'}), type:'POST', dataType:'json', @@ -489,9 +489,6 @@ $(document).ready(function() { } else { Lightbox.changeContent(data.data.result_additional); } - }) - .fail(function(d,e) { - //console.log(d,e); // Error reporting }); return false; }); diff --git a/themes/bootstrap3/js/record.js b/themes/bootstrap3/js/record.js index fe148626036324378623c0482f100abe0bef2304..8031365b3257aa17ec7449181e7ab4466eeb4290 100644 --- a/themes/bootstrap3/js/record.js +++ b/themes/bootstrap3/js/record.js @@ -180,14 +180,12 @@ function refreshTagList(target, loggedin) { dataType: 'json', url: url }) - .always(function(response) { - if(response.status == 200) { - $tagList.replaceWith(response.responseText); - if(loggedin) { - $tagList.addClass('loggedin'); - } else { - $tagList.removeClass('loggedin'); - } + .done(function(response) { + $tagList.replaceWith(response.responseText); + if(loggedin) { + $tagList.addClass('loggedin'); + } else { + $tagList.removeClass('loggedin'); } }); }