gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-merchant-frontends] 02/02: fix histry table getting


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant-frontends] 02/02: fix histry table getting the first row alway eaten upon new results.
Date: Mon, 24 Apr 2017 15:43:52 +0200

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

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

commit 2911f730803d438b58b380ab8bb0b42ccd113972
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Apr 24 15:43:33 2017 +0200

    fix histry table getting the first row alway eaten upon
    new results.
---
 talerfrontends/blog/static/backoffice.js      | 10 +++++++---
 talerfrontends/blog/templates/backoffice.html | 14 ++++++++------
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/talerfrontends/blog/static/backoffice.js 
b/talerfrontends/blog/static/backoffice.js
index 5402f6a..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];
@@ -252,7 +256,7 @@ function get_history(scroll, cherryPick){
   var qs = `/history?instance=${INSTANCE}&delta=${DELTA}`;
   if(cherryPick){
     var cp = document.getElementById("cherry-pick");
-    qs = `/history?order_id=${cp.value}`
+    qs = `/history?order_id=${cp.value}&instance=${INSTANCE}`
   }
   if(scroll){
     START = LAST;
diff --git a/talerfrontends/blog/templates/backoffice.html 
b/talerfrontends/blog/templates/backoffice.html
index ff89f24..6786acc 100644
--- a/talerfrontends/blog/templates/backoffice.html
+++ b/talerfrontends/blog/templates/backoffice.html
@@ -4,17 +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>
-  <form action="">
-    <input id="cherry-pick" type="text"></input>
-    <input type="button" value="submit" onclick='get_history(false, 
true)'></input>
-  </form>
+  <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>

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



reply via email to

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