[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-backoffice] branch master updated: UX.
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-backoffice] branch master updated: UX. |
Date: |
Tue, 04 Sep 2018 15:36:08 +0200 |
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 565d739 UX.
565d739 is described below
commit 565d73912ec63c0307a01aa9a2554e6998d27df5
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Sep 4 15:35:18 2018 +0200
UX.
Implement form input element equipped with
drop-down menu, useful to remember previous
exchanges used in /track/transfer.
---
js/backoffice.js | 16 ++++++++++++++++
talerbackoffice/backoffice/static/backoffice.css | 1 -
talerbackoffice/backoffice/templates/backoffice.html | 9 ++++++---
3 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/js/backoffice.js b/js/backoffice.js
index 13539b4..295b99b 100644
--- a/js/backoffice.js
+++ b/js/backoffice.js
@@ -28,6 +28,12 @@
"use strict";
/**
+ * Updated list of exchanges base URLs that we have queried.
+ */
+var KNOWN_EXCHANGES = [];
+
+
+/**
* The precision of the amount's fraction, when
* it comes objectified.
*/
@@ -226,6 +232,16 @@ function make_marker(wtid){
*/
var track_transfer = function(exchange, wtid, cb){
+ /* Care about drop-down exchange input field. */
+ if (KNOWN_EXCHANGES.indexOf(exchange) > -1)
+ return;
+ var exchange_list = document.getElementById("exchange_url");
+ var option = document.createElement("option");
+ option.innerHTML = exchange;
+ option.setAttribute("value", exchange);
+ exchange_list.appendChild(option);
+ KNOWN_EXCHANGES.push(exchange);
+
/* Remove potential information bar. */
var info_bar = document.getElementById("information-bar");
info_bar.style.visibility = "hidden";
diff --git a/talerbackoffice/backoffice/static/backoffice.css
b/talerbackoffice/backoffice/static/backoffice.css
index 4cf50e9..70674f9 100644
--- a/talerbackoffice/backoffice/static/backoffice.css
+++ b/talerbackoffice/backoffice/static/backoffice.css
@@ -1,4 +1,3 @@
-
/**
* Next two makes the "langs" menu stick
* to the right side of the screen, avoiding
diff --git a/talerbackoffice/backoffice/templates/backoffice.html
b/talerbackoffice/backoffice/templates/backoffice.html
index cf8a5ab..b5e27cb 100644
--- a/talerbackoffice/backoffice/templates/backoffice.html
+++ b/talerbackoffice/backoffice/templates/backoffice.html
@@ -9,7 +9,6 @@
<p class="clear">{% trans %}This is the Taler backoffice facility.
Through it, the user can see the money flow from Taler transactions
to wire transfers and viceversa.{% endtrans %}</p>
-
<div id="information-bar">
<!-- programmatically filled. -->
</div>
@@ -46,9 +45,13 @@
style="display: none;"></input><br>
<input type="text"
placeholder='{{ _("Exchange") }} URL'
- onkeyup="validate_exchange_url(this);"
+ oninput="validate_exchange_url(this);"
class="transfer"
- style="display: none;"></input><br>
+ style="display: none;"
+ list="exchange_url"></input>
+ <datalist id="exchange_url">
+ <!-- filled by JavaScript; will lose its content upon page refresh.
-->
+ </datalist>
</div>
<div>
<form action="">
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-backoffice] branch master updated: UX.,
gnunet <=