[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant-frontends] branch master updated: slight JS
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant-frontends] branch master updated: slight JS optimization |
Date: |
Wed, 19 Jul 2017 10:16:15 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository merchant-frontends.
The following commit(s) were added to refs/heads/master by this push:
new 078d6e6 slight JS optimization
078d6e6 is described below
commit 078d6e6bccc003f6a7cc59163abafbd962474684
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Jul 19 10:15:59 2017 +0200
slight JS optimization
---
talerfrontends/blog/static/backoffice.js | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/talerfrontends/blog/static/backoffice.js
b/talerfrontends/blog/static/backoffice.js
index 5c2e0bb..6a77e93 100644
--- a/talerfrontends/blog/static/backoffice.js
+++ b/talerfrontends/blog/static/backoffice.js
@@ -269,23 +269,24 @@ function fill_table(history, execution_time){
}
/**
- * Issue a direrct /track/order, via Web form.
+ * Issue a direrct /track via Web form.
*/
function track_cherry_pick(form){
var types = xpath_get("address@hidden'radio']", form);
- var type = "order";
- for(var i in [0, 1])
- if (types.snapshotItem(i).checked)
- type = types.snapshotItem(i).value;
- if ("order" == type){
- var order_id = xpath_get("address@hidden'order']", form).snapshotItem(0);
- track_order(order_id.value, INSTANCE);
- }
- else{
- var data = xpath_get("address@hidden'transfer']", form);
- var wtid = data.snapshotItem(0);
- var exchange = data.snapshotItem(1);
- track_transfer(exchange.value, wtid.value);
+ for(var i in [0, 1]){
+ if (!types.snapshotItem(i).checked)
+ continue;
+ var type = types.snapshotItem(i).value;
+ if ("order" == type){
+ var order_id = xpath_get("address@hidden'order']", form).snapshotItem(0);
+ track_order(order_id.value, INSTANCE);
+ }
+ else{
+ var data = xpath_get("address@hidden'transfer']", form);
+ var wtid = data.snapshotItem(0);
+ var exchange = data.snapshotItem(1);
+ track_transfer(exchange.value, wtid.value);
+ }
}
}
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-merchant-frontends] branch master updated: slight JS optimization,
gnunet <=