Skip to content
Snippets Groups Projects
Commit 07c0db71 authored by Demian Katz's avatar Demian Katz
Browse files

Style fixes.

parent f141c856
No related merge requests found
......@@ -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();
});
......@@ -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;
......
......@@ -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);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment