Awight has uploaded a new change for review.
https://gerrit.wikimedia.org/r/279077
Change subject: Stop spinning onunload
......................................................................
Stop spinning onunload
Change-Id: I8b57414845011c368d46dd02fc3d8d8bdec4759e
FIXME: This might be browser-dependent. Works on FF 44.
---
M astropay_gateway/astropay.js
1 file changed, 7 insertions(+), 0 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface
refs/changes/77/279077/1
diff --git a/astropay_gateway/astropay.js b/astropay_gateway/astropay.js
index a13a4a1..1ced6cd 100644
--- a/astropay_gateway/astropay.js
+++ b/astropay_gateway/astropay.js
@@ -1,3 +1,4 @@
+// TODO: move to a forms/js directory.
$( document ).ready( function() {
var form = $( '#payment-form' )[0];
// If a submethod is already selected on page load, show the continue
button
@@ -24,4 +25,10 @@
$( '#overlay' ).show();
form.submit();
}
+
+ // Magic to hopefully disable the spinner in case we are returnd to this
+ // page via the Back button.
+ $( window ).on( 'unload', function() {
+ $( '#overlay' ).hide();
+ } );
});
--
To view, visit https://gerrit.wikimedia.org/r/279077
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b57414845011c368d46dd02fc3d8d8bdec4759e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits