gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-backoffice] branch master updated: conditional expor


From: gnunet
Subject: [GNUnet-SVN] [taler-backoffice] branch master updated: conditional export
Date: Fri, 12 Jan 2018 14:21:59 +0100

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

marcello pushed a commit to branch master
in repository backoffice.

The following commit(s) were added to refs/heads/master by this push:
     new 2d41f91  conditional export
2d41f91 is described below

commit 2d41f91e2b07d8d6453c95ef01709c860063c6e1
Author: Marcello Stanisci <address@hidden>
AuthorDate: Fri Jan 12 14:21:46 2018 +0100

    conditional export
---
 Makefile.in                                          | 2 +-
 js/backoffice.js                                     | 9 ++++++---
 js/test/main.js                                      | 8 +++++---
 talerbackoffice/backoffice/templates/backoffice.html | 2 +-
 4 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 56e4e1f..b3c330f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -31,7 +31,7 @@ install-js:
        @cp js/*.js talerbackoffice/backoffice/static
 
 .PHONY: install-data
-install-data: $(templates)
+install-data: $(templates) install-js
        @$(INSTALL_DATA) -Dt $(prefix)/share/taler/ backoffice.wsgi
 
 #      @test -n "$$(ls -A talerbank/app/static/web-common/)" || \
diff --git a/js/backoffice.js b/js/backoffice.js
index fc00f77..400c97e 100644
--- a/js/backoffice.js
+++ b/js/backoffice.js
@@ -136,7 +136,7 @@ function make_marker(wtid){
  * 'cb' is a UI transforming function.  Typically, it is set to
  * 'fill_table()'.
  */
-module.exports.track_transfer = function(exchange, wtid, cb){
+var track_transfer = function(exchange, wtid, cb){
   var qs = `/track/transfer?` +
            `exchange=${exchange}&` +
            `wtid=${wtid}&` +
@@ -161,13 +161,12 @@ module.exports.track_transfer = function(exchange, wtid, 
cb){
   req.send();
 }
 
-
 /**
  * Call /track/order API offered by the frontend.  Once data
  * arrives it calls a UI routine which fills the "entries table"
  * in the page.
  */
-module.exports.track_order = function(order_id, cb){
+var track_order = function(order_id, cb){
   var req = new XMLHttpRequest();
   var url = `/track/order?` +
             `order_id=${order_id}&` +
@@ -518,3 +517,7 @@ document.onkeydown = function(e) {
     close_popup();
   }
 }
+
+if (module.exports)
+  module.exports.track_transfer = track_transfer;
+  module.exports.track_order = track_order;
diff --git a/js/test/main.js b/js/test/main.js
index cda4c9f..d54f69f 100644
--- a/js/test/main.js
+++ b/js/test/main.js
@@ -66,11 +66,13 @@ ava.test("Tracking a wire transfer", (t) => {
     execution_time: "/Date(0)/"};
 
   var cb = sinon.spy();
-  t.context.bo.track_transfer("http://exchange.mock/";, "mock-wtid", cb);
+  t.context.bo.track_transfer
+    ("http://exchange.mock/";, "mock-wtid", cb);
   t.context.requests[0].respond(200, "application/json",
                                 JSON.stringify(mock_tracks));
-  sinon.assert.calledWith(cb, true, mock_tracks.deposits_sums,
-                          mock_tracks.execution_time, "mock-wtid");
+  sinon.assert.calledWith
+    (cb, true, mock_tracks.deposits_sums,
+     mock_tracks.execution_time, "mock-wtid");
   t.pass();
 });
 
diff --git a/talerbackoffice/backoffice/templates/backoffice.html 
b/talerbackoffice/backoffice/templates/backoffice.html
index 873c961..6c4a21e 100644
--- a/talerbackoffice/backoffice/templates/backoffice.html
+++ b/talerbackoffice/backoffice/templates/backoffice.html
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "templates/base.html" %}
 {% block main %}
   <h1>Backoffice</h1>
   <p>This page simulates a backoffice facility.  Through it,

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



reply via email to

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