diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-05-31 09:56:35 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-05-31 09:56:35 +0200 |
commit | 47d55694a4c84b6c12c0db61a69bcac8b671b20e (patch) | |
tree | b15e96f4ea67e2214a66a9d28dafaf53d25b98ec /view/theme/redbasic/js/redbasic.js | |
parent | 087f9784e3c5a860ed2b86e7f9e8e9f312038546 (diff) | |
parent | f0e615dee529e031663576286345141ad2996974 (diff) | |
download | volse-hubzilla-2.4.tar.gz volse-hubzilla-2.4.tar.bz2 volse-hubzilla-2.4.zip |
Merge branch '2.4RC'2.4
Diffstat (limited to 'view/theme/redbasic/js/redbasic.js')
-rw-r--r-- | view/theme/redbasic/js/redbasic.js | 41 |
1 files changed, 15 insertions, 26 deletions
diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 81a95c68b..14b977b80 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -16,14 +16,21 @@ $(document).ready(function() { } $('#css3-calc').remove(); // Remove the test element + + if($(window).width() > 767) { $('#left_aside_wrapper').stick_in_parent({ - offset_top: $('nav').outerHeight(true), + offset_top: $('nav').outerHeight(true) + 10, parent: '#region_1', spacer: '#left_aside_spacer' }); } + if(($(window).width() < 767) && ($('#left_aside_wrapper .widget, #left_aside_wrapper .vcard').length > 0)) + $('#expand-aside').show(); + else + $('#expand-aside').hide(); + $('#expand-aside').on('click', toggleAside); $('section').on('click', function() { @@ -41,29 +48,14 @@ $(document).ready(function() { } }); - if($('#left_aside_wrapper').length && $('#left_aside_wrapper').html().length === 0) { - $('#expand-aside').hide(); - } - - $('#expand-tabs').click(function() { - if(!$('#tabs-collapse-1').hasClass('in')){ - $('html, body').animate({ scrollTop: 0 }, 'slow'); + $('.usermenu').click(function() { + if($('#navbar-collapse-1, #navbar-collapse-2').hasClass('show')){ + $('#navbar-collapse-1, #navbar-collapse-2').removeClass('show'); } - $('#expand-tabs-icon').toggleClass('fa-arrow-circle-down').toggleClass('fa-arrow-circle-up'); }); - $('.usermenu-head').click(function() { - if($('#navbar-collapse-1, #navbar-collapse-2').hasClass('in')){ - $('#navbar-collapse-1, #navbar-collapse-2').removeClass('in'); - } - }); - - if($('#tabs-collapse-1').length === 0) { - $('#expand-tabs').hide(); - } - $("input[data-role=cat-tagsinput]").tagsinput({ - tagClass: 'label label-primary' + tagClass: 'badge badge-pill badge-warning' }); var doctitle = document.title; @@ -81,17 +73,14 @@ $(document).ready(function() { function makeFullScreen(full) { if(typeof full=='undefined' || full == true) { - $('main').css({'transition': 'none'}).addClass('fullscreen'); - $('header, nav, aside, #fullscreen-btn').hide(); - $('#tabs-collapse-1').css({'visibility': 'hidden'}); + $('main').addClass('fullscreen'); + $('header, nav, aside, #fullscreen-btn').attr('style','display:none !important'); $('#inline-btn').show(); } else { $('main').removeClass('fullscreen'); $('header, nav, aside, #fullscreen-btn').show(); - $('#tabs-collapse-1').css({'visibility': ''}); $('#inline-btn').hide(); - $('main').css({'transition': ''}); $(document.body).trigger("sticky_kit:recalc"); } } @@ -109,7 +98,7 @@ function toggleAside() { $('main').addClass('region_1-on') $('<div id="overlay"></div>').appendTo('section'); $('#left_aside_wrapper').stick_in_parent({ - offset_top: $('nav').outerHeight(true) - 10, + offset_top: $('nav').outerHeight(true) + 10, parent: '#region_1', spacer: '#left_aside_spacer' }); |