From 78c847ef7db90dc8dac7724e8671f1219e34befa Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 6 Sep 2018 11:14:08 +0200 Subject: improve notification handling on small screens --- view/tpl/notifications_widget.tpl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'view/tpl/notifications_widget.tpl') diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl index 068441997..99a0191b2 100644 --- a/view/tpl/notifications_widget.tpl +++ b/view/tpl/notifications_widget.tpl @@ -5,10 +5,14 @@ $(document).ready(function() { notifications_parent = $('#notifications_wrapper')[0].parentElement.id; $('.notifications-btn').click(function() { - if($('#notifications_wrapper').hasClass('fs')) + if($('#notifications_wrapper').hasClass('fs')) { $('#notifications_wrapper').prependTo('#' + notifications_parent); - else + $('body').css('overflow', 'visible'); + } + else { $('#notifications_wrapper').prependTo('section'); + $('body').css('overflow', 'hidden'); + } $('#notifications_wrapper').toggleClass('fs'); if($('#navbar-collapse-2').hasClass('show')){ -- cgit v1.2.3 From d31251c54e0be4400465c18cc12a5f51a7b896c6 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 7 Sep 2018 10:07:29 +0200 Subject: overflow should be auto not visible --- view/tpl/notifications_widget.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/tpl/notifications_widget.tpl') diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl index 99a0191b2..b37ef40da 100644 --- a/view/tpl/notifications_widget.tpl +++ b/view/tpl/notifications_widget.tpl @@ -7,7 +7,7 @@ $('.notifications-btn').click(function() { if($('#notifications_wrapper').hasClass('fs')) { $('#notifications_wrapper').prependTo('#' + notifications_parent); - $('body').css('overflow', 'visible'); + $('body').css('overflow', 'auto'); } else { $('#notifications_wrapper').prependTo('section'); -- cgit v1.2.3 From 677ad71b96640a76b6e857d9e3e509d70ad7a9ce Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 9 Sep 2018 19:44:27 +0200 Subject: fix some issues with latest notification improvements --- view/tpl/notifications_widget.tpl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'view/tpl/notifications_widget.tpl') diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl index b37ef40da..9b3d7487e 100644 --- a/view/tpl/notifications_widget.tpl +++ b/view/tpl/notifications_widget.tpl @@ -7,11 +7,14 @@ $('.notifications-btn').click(function() { if($('#notifications_wrapper').hasClass('fs')) { $('#notifications_wrapper').prependTo('#' + notifications_parent); - $('body').css('overflow', 'auto'); + //undo scrollbar remove + $('section').css('height', ''); } else { $('#notifications_wrapper').prependTo('section'); - $('body').css('overflow', 'hidden'); + //remove superfluous scrollbar + //setting overflow to hidden here has issues with some browsers + $('section').css('height', '100vh'); } $('#notifications_wrapper').toggleClass('fs'); -- cgit v1.2.3