diff options
author | Marcello Stanisci <marcello.stanisci@inria.fr> | 2015-10-20 20:49:40 +0200 |
---|---|---|
committer | Marcello Stanisci <marcello.stanisci@inria.fr> | 2015-10-20 20:49:40 +0200 |
commit | 7bd7330afaf05a3ff535dbf0437d6f3ae321373a (patch) | |
tree | c8a28256e1d00328ef12d5e7341edd9e621ee2ed | |
parent | 2e4b1eb7a968833300b8a582835ef97ff11e82c4 (diff) | |
download | merchant-7bd7330afaf05a3ff535dbf0437d6f3ae321373a.tar.gz merchant-7bd7330afaf05a3ff535dbf0437d6f3ae321373a.tar.bz2 merchant-7bd7330afaf05a3ff535dbf0437d6f3ae321373a.zip |
allowing the button to get uncolored
-rw-r--r-- | src/frontend/checkout.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/frontend/checkout.php b/src/frontend/checkout.php index 9ba371e6..0e06922a 100644 --- a/src/frontend/checkout.php +++ b/src/frontend/checkout.php @@ -153,7 +153,6 @@ function has_taler_wallet_cb(aEvent) }; - /* Function called when the Taler extension was unloaded, here we disable the option */ function taler_wallet_unload_cb(aEvent) @@ -181,6 +180,15 @@ test_without_wallet(); // first event document.body.addEventListener("taler-wallet-mfirst", has_taler_wallet_cb, false); +// The following callback is used to allow the button to change its +// color whenever the user navigates away from this page +document.body.addEventListener("taler-shutdown", + function(){ + var unloadEvent = new Event('taler-unload'); + document.body.dispatchEvent(unloadEvent); + }, + false); + // event awaited by the wallet to change its button's color // alert("sending"); // var eve = new Event('taler-payment-mfirst'); |