[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant-frontends] branch master updated: various f
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant-frontends] branch master updated: various fixes around the cherry-pick tracking form: the one where the backoffice user enters order ids and wtids in order to directly track them. |
Date: |
Mon, 24 Apr 2017 16:51:05 +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 4be5fee various fixes around the cherry-pick tracking form: the one
where the backoffice user enters order ids and wtids in order to directly track
them.
4be5fee is described below
commit 4be5fee3e1c290a8459710dc580bccaa848d8972
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Apr 24 16:50:32 2017 +0200
various fixes around the cherry-pick tracking form: the one
where the backoffice user enters order ids and wtids in order
to directly track them.
---
talerfrontends/blog/static/backoffice.js | 46 +++++++++++++++++++++++----
talerfrontends/blog/templates/backoffice.html | 15 +++++++--
2 files changed, 52 insertions(+), 9 deletions(-)
diff --git a/talerfrontends/blog/static/backoffice.js
b/talerfrontends/blog/static/backoffice.js
index e998b13..36a3c81 100644
--- a/talerfrontends/blog/static/backoffice.js
+++ b/talerfrontends/blog/static/backoffice.js
@@ -175,6 +175,8 @@ function track_order(order_id, instance){
track_content.innerHTML = "This order is still waiting to be paid
back.";
toggle_overlay();
}
+ if (404 == req.status)
+ alert("Order ID unknown");
}
}
req.send();
@@ -245,19 +247,49 @@ function fill_table(history, execution_time){
}
/**
- * - cherryPick if true, the user wants to cherry-pick a
- * particular proposal he entered in the form.
+ * Issue a direrct /track/order, 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;
+ var txt = xpath_get("address@hidden'text']", form).snapshotItem(0);
+ if ("order" == type)
+ track_order(txt, INSTANCE);
+ else
+ alert("transfer tracking TBD");
+}
+
+/**
+ * Restore the cherry-pick form to the initial state.
+ * In other words, it formats the form so that /track/order
+ * can be called.
+ */
+function cherry_pick_form_order(){
+
+
+}
+
+/**
+ * Change the cherry-pick form to the format useful for
+ * tracking wire transfers.
+ */
+function cherry_pick_form_transfer(){
+
+
+}
+
+
+/**
* - scroll if true, the logic tries to retrieve the
* "next page" of all the proposals known to the merchant.
*/
-function get_history(scroll, cherryPick){
+function get_history(scroll){
var loader = document.getElementsByClassName("loader")[0];
loader.style.visibility = "visible";
var qs = `/history?instance=${INSTANCE}&delta=${DELTA}`;
- if(cherryPick){
- var cp = document.getElementById("cherry-pick");
- qs = `/history?order_id=${cp.value}&instance=${INSTANCE}`
- }
if(scroll){
START = LAST;
qs += `&start=${START}`;
diff --git a/talerfrontends/blog/templates/backoffice.html
b/talerfrontends/blog/templates/backoffice.html
index 6786acc..f4f66ae 100644
--- a/talerfrontends/blog/templates/backoffice.html
+++ b/talerfrontends/blog/templates/backoffice.html
@@ -6,8 +6,19 @@
wire transfers and viceversa.</p>
<div>
<form action="">
- <input id="cherry-pick" type="text"></input>
- <input type="button" value="submit" onclick='get_history(false,
true)'></input>
+ <input type="text"></input><br>
+ <input type="radio"
+ name="track-type"
+ value="order"
+ onclick="cherry_pick_form_order(this.parentNode)"
+ checked>Track order id</input><br>
+ <input type="radio"
+ name="track-type"
+ value="wtid"
+ onclick="cherry_pick_form_transfer(this.parentNode)">Track wire
transfer</input><br>
+ <input type="button"
+ value="submit"
+ onclick='track_cherry_pick(this.parentNode)'></input>
</form>
</div>
<div id="history-container">
--
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: various fixes around the cherry-pick tracking form: the one where the backoffice user enters order ids and wtids in order to directly track them.,
gnunet <=