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: Tracks' p


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant-frontends] branch master updated: Tracks' popup closes upon pressing ESC.
Date: Sat, 22 Apr 2017 17:00:46 +0200

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 2627320  Tracks' popup closes upon pressing ESC.
2627320 is described below

commit 26273206d6cdad3e54ecbfe12bc8d526112a47c0
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Mar 15 16:40:17 2017 +0100

    Tracks' popup closes upon pressing ESC.
---
 talerfrontends/blog/static/backoffice.js   | 14 ++++++++++----
 talerfrontends/blog/static/web-common      |  2 +-
 talerfrontends/donations/static/web-common |  2 +-
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/talerfrontends/blog/static/backoffice.js 
b/talerfrontends/blog/static/backoffice.js
index c410f71..fd491b7 100644
--- a/talerfrontends/blog/static/backoffice.js
+++ b/talerfrontends/blog/static/backoffice.js
@@ -47,7 +47,7 @@ function close_popup(){
     tbody.removeChild(tbody_children.snapshotItem(i));
   }
 
-  toggle_overlay();
+  toggle_overlay(true);
 }
 
 function amount_sum(a1, a2){
@@ -89,9 +89,9 @@ function parse_date(date){
   return `${d.getUTCDate()} ${months[d.getUTCMonth()]} ${d.getUTCFullYear()}, 
${hours}:${minutes}`;
 }
 
-function toggle_overlay(){
+function toggle_overlay(force_close){
   var overlay = document.getElementsByClassName("overlay")[0];
-  if(overlay.style.visibility == "visible"){
+  if(overlay.style.visibility == "visible" || force_close){
     overlay.style.visibility = "hidden";
     overlay.style.opacity = 0;
   }
@@ -262,8 +262,14 @@ function get_history(scroll){
 }
 
 document.addEventListener("DOMContentLoaded", () => get_history(false));
-
 document.addEventListener("scroll", function(){
   if(window.innerHeight + window.scrollY >= document.body.offsetHeight)
     window.setTimeout(()=>get_history(true), 400);
 });
+document.onkeydown = function(e) {
+  if(!e)
+    e = event;
+  if(e.keyCode == 27){
+    close_popup();
+  }
+}
diff --git a/talerfrontends/blog/static/web-common 
b/talerfrontends/blog/static/web-common
index d7e0135..0be9ac9 160000
--- a/talerfrontends/blog/static/web-common
+++ b/talerfrontends/blog/static/web-common
@@ -1 +1 @@
-Subproject commit d7e013594d15388b1a7342a44a0e9c8d4ecca82d
+Subproject commit 0be9ac9264a3bd9f495c37abf1ac864562e8c598
diff --git a/talerfrontends/donations/static/web-common 
b/talerfrontends/donations/static/web-common
index d7e0135..0be9ac9 160000
--- a/talerfrontends/donations/static/web-common
+++ b/talerfrontends/donations/static/web-common
@@ -1 +1 @@
-Subproject commit d7e013594d15388b1a7342a44a0e9c8d4ecca82d
+Subproject commit 0be9ac9264a3bd9f495c37abf1ac864562e8c598

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



reply via email to

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