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: Remove ex


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant-frontends] branch master updated: Remove existing list entries upon receiving /track/transfer response.
Date: Mon, 13 Mar 2017 16:35:00 +0100

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 c9dc185  Remove existing list entries upon receiving /track/transfer 
response.
c9dc185 is described below

commit c9dc18500d7805b132d01cdca1337457a5834217
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Mar 13 16:34:37 2017 +0100

    Remove existing list entries upon receiving /track/transfer response.
---
 talerfrontends/blog/static/backoffice.js | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/talerfrontends/blog/static/backoffice.js 
b/talerfrontends/blog/static/backoffice.js
index 716e10b..e52e650 100644
--- a/talerfrontends/blog/static/backoffice.js
+++ b/talerfrontends/blog/static/backoffice.js
@@ -91,10 +91,20 @@ function track_transfer(exchange, wtid){
       if(200 == req.status){
         var tracks = JSON.parse(req.responseText);
         console.log("Transfer tracks", req.responseText);
+        var table = document.getElementById("history");
+        var tbody = xpath_get("tbody", table).snapshotItem(0);
+        console.log("tbody", tbody);
+        var tbody_children = xpath_get("tbody/*[position() > 1]", table);
+        console.log("get children", tbody_children);
+        console.log("children lenght", tbody_children.snapshotLength);
+        for(var i=0; i<tbody_children.snapshotLength; i++){
+          console.log("remove child:", tbody_children.snapshotItem(i));
+          tbody.removeChild(tbody_children.snapshotItem(i));
+        }
+        // TBD.
       }
-    
-    }
     // TBD.
+    }
   }
   req.send();
 }
@@ -156,7 +166,7 @@ function xpath_get(xpath, ctx){
                               null,
                               XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
                               null);
-  return ret.snapshotItem(0);
+  return ret;
 }
 
 /**
@@ -164,7 +174,7 @@ function xpath_get(xpath, ctx){
  */
 function fill_table(history){
   var table = document.getElementById("history");
-  var tbody = xpath_get("tbody", table);
+  var tbody = xpath_get("tbody", table).snapshotItem(0);
   for (var i=0; i<history.length; i++){
     var entry = history[i];
     var row = document.createElement("tr");

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



reply via email to

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