From 07c0db71954ccc7b7b14283f80e8b1fc79dd5b52 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Tue, 23 Feb 2016 09:46:27 -0500 Subject: [PATCH] Style fixes. --- themes/bootstrap3/js/check_save_statuses.js | 4 +-- themes/bootstrap3/js/lightbox.js | 36 ++++++++++----------- themes/bootstrap3/js/record.js | 2 +- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/themes/bootstrap3/js/check_save_statuses.js b/themes/bootstrap3/js/check_save_statuses.js index 032c7eda006..66556d4d88c 100644 --- a/themes/bootstrap3/js/check_save_statuses.js +++ b/themes/bootstrap3/js/check_save_statuses.js @@ -22,7 +22,7 @@ function checkSaveStatuses() { }) .done(function(response) { for (var rn in response.data) { - var list = $('#result'+rn).find('.savedLists') + var list = $('#result'+rn).find('.savedLists'); if (list.length == 0) { list = $('.savedLists'); } @@ -39,5 +39,5 @@ function checkSaveStatuses() { } $(document).ready(function() { - checkSaveStatuses() + checkSaveStatuses(); }); diff --git a/themes/bootstrap3/js/lightbox.js b/themes/bootstrap3/js/lightbox.js index 5ac629f9c6e..4c4f0d3c7fa 100644 --- a/themes/bootstrap3/js/lightbox.js +++ b/themes/bootstrap3/js/lightbox.js @@ -75,24 +75,24 @@ var Lightbox = { * We store all the ajax calls in case we need to cancel. * This function cancels the previous call and creates a new one. */ - ajax: function(obj) { + ajax: function(obj) { if(this.XHR) { this.XHR.abort(); } - this.XHR = $.ajax(obj) + this.XHR = $.ajax(obj); this.XHR.then().fail(function(response, textStatus) { - if (textStatus == "abort") { return; } + if (textStatus == "abort") { return; } if (response.responseJSON) { - Lightbox.displayError(response.responseJSON.data); - } else { - var json = JSON.parse(response.responseText); - if (json.data) { - Lightbox.displayError(json.data); - } else { - Lightbox.displayError(response.responseText); - } - } - }); + Lightbox.displayError(response.responseJSON.data); + } else { + var json = JSON.parse(response.responseText); + if (json.data) { + Lightbox.displayError(json.data); + } else { + Lightbox.displayError(response.responseText); + } + } + }); return this.XHR; }, /**********************************/ @@ -241,9 +241,9 @@ var Lightbox = { this.ajax({ type:'POST', url:url, - data:post - }) - .done(callback) + data:post + }) + .done(callback) .fail(function(response, textStatus) { console.log(response, textStatus); // Error reporting console.log(url, post); @@ -480,8 +480,8 @@ $(document).ready(function() { url: VuFind.getPath() + '/AJAX/JSON?' + $.param({method:'exportFavorites'}), type:'POST', dataType:'json', - data:Lightbox.getFormData($(evt.target)) - }) + data:Lightbox.getFormData($(evt.target)) + }) .done(function(data) { if(data.data.export_type == 'download' || data.data.needs_redirect) { document.location.href = data.data.result_url; diff --git a/themes/bootstrap3/js/record.js b/themes/bootstrap3/js/record.js index ed2978931c7..b57f6b22fa9 100644 --- a/themes/bootstrap3/js/record.js +++ b/themes/bootstrap3/js/record.js @@ -151,7 +151,7 @@ function ajaxLoadTab($newTab, tabid, setHash) { $.ajax({ url: path + urlroot + '/AjaxTab', type: 'POST', - data: {tab: tabid}, + data: {tab: tabid} }) .done(function(data) { $newTab.html(data); -- GitLab