Rev2166, Mobile friendly notifications

This commit is contained in:
shortcutme 2017-07-28 15:36:49 +02:00
parent 5bdc3b4fb5
commit fa96ab453f
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
5 changed files with 23 additions and 1 deletions

View file

@ -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"

View file

@ -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

View file

@ -175,3 +175,12 @@ a { color: black }
#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 }
}

View file

@ -215,3 +215,12 @@ a { color: black }
#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 }
}

View file

@ -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() {