From 80b10bd45bae2c320c0d5627d2ceb598a40743e2 Mon Sep 17 00:00:00 2001 From: flynsarmy Date: Wed, 20 Aug 2014 15:37:10 +1000 Subject: [PATCH] Refs #568 - Inherit the parent framework error function --- modules/backend/assets/js/october.popup.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/backend/assets/js/october.popup.js b/modules/backend/assets/js/october.popup.js index a6749fd0d..fe7b3355c 100644 --- a/modules/backend/assets/js/october.popup.js +++ b/modules/backend/assets/js/october.popup.js @@ -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;