[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant-frontends] branch master updated: Formattin
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant-frontends] branch master updated: Formatting time in JS, enlarging table showing history elements, and justifying 'th' element to the left. |
Date: |
Wed, 01 Mar 2017 13:34:03 +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 7097422 Formatting time in JS, enlarging table showing history
elements, and justifying 'th' element to the left.
7097422 is described below
commit 7097422b3d190464508c931788d392d2aa732df5
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Mar 1 13:33:14 2017 +0100
Formatting time in JS, enlarging table showing history elements,
and justifying 'th' element to the left.
---
talerfrontends/blog/static/backoffice.js | 24 ++++++++++++++++++++----
talerfrontends/blog/static/popup.css | 4 ++++
talerfrontends/blog/static/web-common | 2 +-
talerfrontends/blog/templates/backoffice.html | 2 +-
talerfrontends/donations/static/web-common | 2 +-
5 files changed, 27 insertions(+), 7 deletions(-)
diff --git a/talerfrontends/blog/static/backoffice.js
b/talerfrontends/blog/static/backoffice.js
index 2b0ee59..d3d4729 100644
--- a/talerfrontends/blog/static/backoffice.js
+++ b/talerfrontends/blog/static/backoffice.js
@@ -34,8 +34,7 @@ var INSTANCE = "FSF";
function amount_to_string(amount){
var number = Number(amount.value) + (Number(amount.fraction)/FRACTION);
- var fmt = amount.currency + ":" + number;
- return fmt;
+ return `${number} ${amount.currency}`;
}
function parse_date(date){
@@ -47,7 +46,19 @@ function parse_date(date){
return;
}
var d = new Date(seconds * 1000);
- return d.toDateString();
+ var months = ["Jan",
+ "Feb",
+ "Mar",
+ "Apr",
+ "May",
+ "Jun",
+ "Jul",
+ "Aug",
+ "Sep",
+ "Oct",
+ "Nov",
+ "Dec"];
+ return `${d.getUTCDate()} ${months[d.getUTCMonth()]} ${d.getUTCFullYear()},
${d.getUTCHours()}:${d.getUTCMinutes()}`;
}
function toggle_visible(overlay){
@@ -114,6 +125,11 @@ function track_order(order_id, instance){
*/
function fill_table(history){
var table = document.getElementById("history");
+ var tbody = document.evaluate("tbody",
+ table,
+ null,
+ XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
+ null).snapshotItem(0);
for (var i=0; i<history.length; i++){
var entry = history[i];
var row = document.createElement("tr");
@@ -129,7 +145,7 @@ function fill_table(history){
row.appendChild(td_summary);
row.appendChild(td_amount);
row.appendChild(td_timestamp);
- table.appendChild(row);
+ tbody.appendChild(row);
}
table.style.visibility = "";
}
diff --git a/talerfrontends/blog/static/popup.css
b/talerfrontends/blog/static/popup.css
index 234939f..c12ba70 100644
--- a/talerfrontends/blog/static/popup.css
+++ b/talerfrontends/blog/static/popup.css
@@ -47,6 +47,10 @@
display: inline-block;
}
+th {
+ text-align: left;
+}
+
@media screen and (max-width: 700px){
.box{
width: 70%;
diff --git a/talerfrontends/blog/static/web-common
b/talerfrontends/blog/static/web-common
index aae7c0a..0be9ac9 160000
--- a/talerfrontends/blog/static/web-common
+++ b/talerfrontends/blog/static/web-common
@@ -1 +1 @@
-Subproject commit aae7c0a87a9ff1640c3cd72dd4df0ac590f8b0e4
+Subproject commit 0be9ac9264a3bd9f495c37abf1ac864562e8c598
diff --git a/talerfrontends/blog/templates/backoffice.html
b/talerfrontends/blog/templates/backoffice.html
index 6c35edc..89428dd 100644
--- a/talerfrontends/blog/templates/backoffice.html
+++ b/talerfrontends/blog/templates/backoffice.html
@@ -4,7 +4,7 @@
<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>
- <table id="history" style="visibility: hidden;">
+ <table id="history" width="60%" style="visibility: hidden;">
<tbody>
<tr>
<th>Order ID</th>
diff --git a/talerfrontends/donations/static/web-common
b/talerfrontends/donations/static/web-common
index aae7c0a..0be9ac9 160000
--- a/talerfrontends/donations/static/web-common
+++ b/talerfrontends/donations/static/web-common
@@ -1 +1 @@
-Subproject commit aae7c0a87a9ff1640c3cd72dd4df0ac590f8b0e4
+Subproject commit 0be9ac9264a3bd9f495c37abf1ac864562e8c598
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-merchant-frontends] branch master updated: Formatting time in JS, enlarging table showing history elements, and justifying 'th' element to the left.,
gnunet <=