diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-11-14 22:35:58 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-11-14 22:35:58 +0100 |
commit | 8d9c47acdf5644c6522cd4c0715891fab0a765dc (patch) | |
tree | 3119c8dcc596867ff7aed9d14d9cda8e359fd6b4 /view | |
parent | 9d69792e08dd4366c5d1c97e29b5ef587822d6a0 (diff) | |
download | volse-hubzilla-8d9c47acdf5644c6522cd4c0715891fab0a765dc.tar.gz volse-hubzilla-8d9c47acdf5644c6522cd4c0715891fab0a765dc.tar.bz2 volse-hubzilla-8d9c47acdf5644c6522cd4c0715891fab0a765dc.zip |
move notifications full-screen handling to notifications widget
Diffstat (limited to 'view')
-rw-r--r-- | view/theme/redbasic/js/redbasic.js | 14 | ||||
-rw-r--r-- | view/tpl/notifications_widget.tpl | 16 |
2 files changed, 16 insertions, 14 deletions
diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 3fee0f282..ed9ef02aa 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -2,7 +2,6 @@ * redbasic theme specific JavaScript */ -var notifications_parent; $(document).ready(function() { // CSS3 calc() fallback (for unsupported browsers) @@ -84,19 +83,6 @@ $(document).ready(function() { } }); - notifications_parent = $('#notifications_wrapper')[0].parentElement.id; - $('#notifications-btn').click(function() { - if($('#notifications_wrapper').hasClass('fs')) - $('#notifications_wrapper').prependTo('#' + notifications_parent); - else - $('#notifications_wrapper').prependTo('section'); - - $('#notifications_wrapper').toggleClass('fs'); - if($('#navbar-collapse-2').hasClass('show')){ - $('#navbar-collapse-2').removeClass('show'); - } - }); - $("input[data-role=cat-tagsinput]").tagsinput({ tagClass: 'badge badge-pill badge-warning text-dark' }); diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl index 0ece84891..29892ba79 100644 --- a/view/tpl/notifications_widget.tpl +++ b/view/tpl/notifications_widget.tpl @@ -28,6 +28,22 @@ {{if $module == 'display'}} <script> + var notifications_parent; + $(document).ready(function() { + notifications_parent = $('#notifications_wrapper')[0].parentElement.id; + $('#notifications-btn').click(function() { + if($('#notifications_wrapper').hasClass('fs')) + $('#notifications_wrapper').prependTo('#' + notifications_parent); + else + $('#notifications_wrapper').prependTo('section'); + + $('#notifications_wrapper').toggleClass('fs'); + if($('#navbar-collapse-2').hasClass('show')){ + $('#navbar-collapse-2').removeClass('show'); + } + }); + }); + $(document).on('click', '.notification', function(e) { var b64mid = $(this).data('b64mid'); var path = $(this)[0].pathname.substr(1,7); |