From fa96ab453f6b5b0a3a694cbc8803e65419d44408 Mon Sep 17 00:00:00 2001 From: shortcutme Date: Fri, 28 Jul 2017 15:36:49 +0200 Subject: [PATCH] Rev2166, Mobile friendly notifications --- src/Config.py | 2 +- src/Ui/media/Notifications.coffee | 1 + src/Ui/media/Wrapper.css | 9 +++++++++ src/Ui/media/all.css | 9 +++++++++ src/Ui/media/all.js | 3 +++ 5 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/Config.py b/src/Config.py index 02be0530..c71f3369 100644 --- a/src/Config.py +++ b/src/Config.py @@ -10,7 +10,7 @@ class Config(object): def __init__(self, argv): self.version = "0.5.7" - self.rev = 2165 + self.rev = 2166 self.argv = argv self.action = None self.config_file = "zeronet.conf" diff --git a/src/Ui/media/Notifications.coffee b/src/Ui/media/Notifications.coffee index 00c66761..9f38921b 100644 --- a/src/Ui/media/Notifications.coffee +++ b/src/Ui/media/Notifications.coffee @@ -57,6 +57,7 @@ class Notifications elem.css({"width": "50px", "transform": "scale(0.01)"}) elem.animate({"scale": 1}, 800, "easeOutElastic") elem.animate({"width": width}, 700, "easeInOutCubic") + $(".body", elem).css("width": (width - 80)) $(".body", elem).cssLater("box-shadow", "0px 0px 5px rgba(0,0,0,0.1)", 1000) # Close button or Confirm button diff --git a/src/Ui/media/Wrapper.css b/src/Ui/media/Wrapper.css index 4859112f..c4764395 100644 --- a/src/Ui/media/Wrapper.css +++ b/src/Ui/media/Wrapper.css @@ -174,4 +174,13 @@ a { color: black } @media print { #inner-iframe { position: fixed; } .progressbar, .fixbutton, .notifications, .loadingscreen { visibility: hidden; } +} + +/* Small screen */ +@media screen and (max-width: 600px) { + .notification .message { white-space: normal; } + .notification .buttons { padding-right: 22px; } + .notification .button { white-space: nowrap; } + .notification { margin: 0px } + .notifications { right: 0px } } \ No newline at end of file diff --git a/src/Ui/media/all.css b/src/Ui/media/all.css index ff64e90b..351a5adc 100644 --- a/src/Ui/media/all.css +++ b/src/Ui/media/all.css @@ -214,4 +214,13 @@ a { color: black } @media print { #inner-iframe { position: fixed; } .progressbar, .fixbutton, .notifications, .loadingscreen { visibility: hidden; } +} + +/* Small screen */ +@media screen and (max-width: 600px) { + .notification .message { white-space: normal; } + .notification .buttons { padding-right: 22px; } + .notification .button { white-space: nowrap; } + .notification { margin: 0px } + .notifications { right: 0px } } \ No newline at end of file diff --git a/src/Ui/media/all.js b/src/Ui/media/all.js index 2791c209..7f9cc03f 100644 --- a/src/Ui/media/all.js +++ b/src/Ui/media/all.js @@ -764,6 +764,9 @@ jQuery.extend( jQuery.easing, elem.animate({ "width": width }, 700, "easeInOutCubic"); + $(".body", elem).css({ + "width": width - 80 + }); $(".body", elem).cssLater("box-shadow", "0px 0px 5px rgba(0,0,0,0.1)", 1000); $(".close, .button", elem).on("click", (function(_this) { return function() {