Reuse abortAjax function on aspectNavigation widget
This commit is contained in:
parent
37c67c23cf
commit
4f17dbf36e
1 changed files with 3 additions and 6 deletions
|
|
@ -47,6 +47,7 @@
|
||||||
if (self.aspectLis.not(".active").length === 0) {
|
if (self.aspectLis.not(".active").length === 0) {
|
||||||
self.aspectLis.removeClass("active");
|
self.aspectLis.removeClass("active");
|
||||||
self.abortAjax();
|
self.abortAjax();
|
||||||
|
self.fadeIn();
|
||||||
} else {
|
} else {
|
||||||
self.aspectLis.addClass("active");
|
self.aspectLis.addClass("active");
|
||||||
self.performAjax();
|
self.performAjax();
|
||||||
|
|
@ -101,12 +102,9 @@
|
||||||
history.pushState(null, document.title, newURL);
|
history.pushState(null, document.title, newURL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(self.jXHR) {
|
self.abortAjax();
|
||||||
self.jXHR.abort();
|
|
||||||
self.jXHR = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
self.fadeOut();
|
self.fadeOut();
|
||||||
|
|
||||||
self.jXHR = $.getScript(newURL, function(data) {
|
self.jXHR = $.getScript(newURL, function(data) {
|
||||||
var textarea = $("#publisher textarea"),
|
var textarea = $("#publisher textarea"),
|
||||||
photozone = $("#photodropzone");
|
photozone = $("#photodropzone");
|
||||||
|
|
@ -133,7 +131,6 @@
|
||||||
self.jXHR.abort();
|
self.jXHR.abort();
|
||||||
self.jXHR = null;
|
self.jXHR = null;
|
||||||
}
|
}
|
||||||
self.fadeIn();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.fadeOut = function() {
|
this.fadeOut = function() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue