diff options
author | Marcello Stanisci <marcello.stanisci@inria.fr> | 2015-11-06 00:53:48 +0100 |
---|---|---|
committer | Marcello Stanisci <marcello.stanisci@inria.fr> | 2015-11-06 00:53:48 +0100 |
commit | c7e72a5980dd966e5588f9081a7817c58c63e89f (patch) | |
tree | 7746726083dab0649028205e693f9293e58117c7 | |
parent | e55860d9139702f39ce2b61df5bb0e33e1f30a08 (diff) | |
download | merchant-c7e72a5980dd966e5588f9081a7817c58c63e89f.tar.gz merchant-c7e72a5980dd966e5588f9081a7817c58c63e89f.tar.bz2 merchant-c7e72a5980dd966e5588f9081a7817c58c63e89f.zip |
making homepage following same signals as checkout page does
-rw-r--r-- | src/frontend/checkout.php | 3 | ||||
-rw-r--r-- | src/frontend/index.html | 22 |
2 files changed, 17 insertions, 8 deletions
diff --git a/src/frontend/checkout.php b/src/frontend/checkout.php index ab1c2c28..771730e8 100644 --- a/src/frontend/checkout.php +++ b/src/frontend/checkout.php @@ -11,7 +11,8 @@ The JavaScript code in this page is free software: you can redistribute it and/or modify it under the terms of the GNU - Lesser General Public License (GNU LGPL) as published by the Free Software + Lesser General Public License (GNU LGPL) as published by the + Free Software Foundation, either version 3 of the License, or (at your option) any later version. The code is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS diff --git a/src/frontend/index.html b/src/frontend/index.html index d73683df..c6e033b0 100644 --- a/src/frontend/index.html +++ b/src/frontend/index.html @@ -29,7 +29,7 @@ */ </script> </head> -<body id="css-zen-garden"> +<body id="css-zen-garden" onload="signal_me()"> <div class="supporting" id="welcome" role="main"> <div class="explanation" id="zen-explanation" role="article"> <h1>Welcome to the Taler "Toy" Demonstrator</h1> @@ -141,21 +141,29 @@ b.style.display = 'none'; }; + /* The merchant signals its taler-friendlyness to the client */ + function signal_me() + { + var eve = new Event('taler-checkout-probe'); + document.body.dispatchEvent(eve); + //alert("signaling"); + }; + + function test_without_wallet(){ wallet_installed_cb(); } - test_without_wallet(); - /* Set up a listener to be called whenever a Wallet gets installed so that the user is led towards the demo's steps progressively */ - document.body.addEventListener("taler-wallet-installed", + document.body.addEventListener("taler-wallet-present", wallet_installed_cb, false, false); - /* Setup callback to be called whenever the wallet is uninstalled */ - document.body.addEventListener("taler-unload", - wallet_uninstalled_cb, + /* Setup callback to be called whenever the wallet is loaded/enabled + while the browser is already on this page */ + document.body.addEventListener("taler-load", + signal_me, false); </script> </body> |