gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-merchant-frontends] branch master updated (c981246 -


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant-frontends] branch master updated (c981246 -> 2911f73)
Date: Mon, 24 Apr 2017 15:43:50 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a change to branch master
in repository merchant-frontends.

    from c981246  remove dead code
     new 7759c1b  adding form for cherry-picking proposals in history.
     new 2911f73  fix histry table getting the first row alway eaten upon new 
results.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 talerfrontends/blog/static/backoffice.js      | 22 ++++++++++++++++++----
 talerfrontends/blog/static/web-common         |  2 +-
 talerfrontends/blog/templates/backoffice.html | 11 ++++++++---
 talerfrontends/donations/static/web-common    |  2 +-
 4 files changed, 28 insertions(+), 9 deletions(-)

diff --git a/talerfrontends/blog/static/backoffice.js 
b/talerfrontends/blog/static/backoffice.js
index 2e63857..e998b13 100644
--- a/talerfrontends/blog/static/backoffice.js
+++ b/talerfrontends/blog/static/backoffice.js
@@ -201,8 +201,12 @@ function fill_table(history, execution_time){
     return;
   }
 
-  /* Remove the "no results" message */
-  tbody.removeChild(xpath_get("tr[1]", tbody).snapshotItem(0));
+  /* remove "no records" message */
+  var nr = xpath_get("address@hidden'no-records']", tbody).snapshotItem(0)
+  if (nr)
+    tbody.removeChild(nr);
+  /* Make table's header visible */
+  xpath_get("address@hidden'headers']", 
tbody).snapshotItem(0).style.visibility = "";
 
   for (var i=0; i<history.length; i++){
     var entry = history[i];
@@ -240,10 +244,20 @@ function fill_table(history, execution_time){
   window.setTimeout(remove_loader, 900);
 }
 
-function get_history(scroll){
+/**
+ * - cherryPick if true, the user wants to cherry-pick a
+ *   particular proposal he entered in the form.
+ * - scroll if true, the logic tries to retrieve the
+ *   "next page" of all the proposals known to the merchant.
+ */
+function get_history(scroll, cherryPick){
   var loader = document.getElementsByClassName("loader")[0]; 
   loader.style.visibility = "visible";
-  var qs = `/history?&instance=${INSTANCE}&delta=${DELTA}`;
+  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/static/web-common 
b/talerfrontends/blog/static/web-common
index d7e0135..0be9ac9 160000
--- a/talerfrontends/blog/static/web-common
+++ b/talerfrontends/blog/static/web-common
@@ -1 +1 @@
-Subproject commit d7e013594d15388b1a7342a44a0e9c8d4ecca82d
+Subproject commit 0be9ac9264a3bd9f495c37abf1ac864562e8c598
diff --git a/talerfrontends/blog/templates/backoffice.html 
b/talerfrontends/blog/templates/backoffice.html
index 1578989..6786acc 100644
--- a/talerfrontends/blog/templates/backoffice.html
+++ b/talerfrontends/blog/templates/backoffice.html
@@ -4,13 +4,19 @@
   <p>This page simulates a backoffice facility.  Through it,
   the user can see the money flow from Taler transactions to
   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>
+    </form>
+  </div>
   <div id="history-container">
     <table id="history" width="60%" style="visibility: hidden;">
       <tbody>
-        <tr>
+        <tr class="no-records">
           <th colspan="3">No records found</th>
         </tr>
-        <tr style="visibility: hidden">
+        <tr class="headers" style="visibility: hidden">
           <th class="order-id">Order ID</th>
           <th class="amount">Amount</th>
           <th class="date">Date</th>
@@ -39,7 +45,6 @@
       </div>
     </div>
   </div>
-  <a href="#" onclick="get_history(true);" style="margin-left: 90%;">Fake 
scroll</a>
 {% endblock main %}
 
 {% block styles %}
diff --git a/talerfrontends/donations/static/web-common 
b/talerfrontends/donations/static/web-common
index d7e0135..0be9ac9 160000
--- a/talerfrontends/donations/static/web-common
+++ b/talerfrontends/donations/static/web-common
@@ -1 +1 @@
-Subproject commit d7e013594d15388b1a7342a44a0e9c8d4ecca82d
+Subproject commit 0be9ac9264a3bd9f495c37abf1ac864562e8c598

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]