Refs #568 - Inherit the parent framework error function

This commit is contained in:
flynsarmy 2014-08-20 15:37:10 +10:00
parent d2e2e1ffff
commit 80b10bd45b
1 changed files with 7 additions and 5 deletions

View File

@ -1,6 +1,6 @@
/*
* Ajax Popup plugin
*
*
* Data attributes:
* - data-control="popup" - enables the ajax popup plugin
* - data-ajax="popup-content.htm" - ajax content to load
@ -104,9 +104,11 @@
self.triggerEvent('popupComplete')
},
error: function(jqXHR, textStatus, errorThrown) {
alert(jqXHR.responseText.length ? jqXHR.responseText : jqXHR.statusText)
self.hide()
self.triggerEvent('popupError')
this.error(jqXHR, textStatus, errorThrown).done(function(){
alert(jqXHR.responseText.length ? jqXHR.responseText : jqXHR.statusText)
self.hide()
self.triggerEvent('popupError')
})
}
})
@ -168,7 +170,7 @@
this.$backdrop = null;
}
}
Popup.prototype.setLoading = function(val) {
if (!this.$backdrop)
return;