diff options
author | Mario <mario@mariovavti.com> | 2023-11-25 17:12:28 +0100 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-11-25 17:12:28 +0100 |
commit | 0fd8e02a884a2b040dca62ab5d9674db5f6a070b (patch) | |
tree | 586ee43f32f6f14368c09026f21dcd3244ea24b6 /view/js | |
parent | 82e704ec5b107823c09f1387e9091adee53a4c2d (diff) | |
parent | 55c4bfb67009c598f25b1a8189604bfffa73dfbb (diff) | |
download | volse-hubzilla-0fd8e02a884a2b040dca62ab5d9674db5f6a070b.tar.gz volse-hubzilla-0fd8e02a884a2b040dca62ab5d9674db5f6a070b.tar.bz2 volse-hubzilla-0fd8e02a884a2b040dca62ab5d9674db5f6a070b.zip |
Merge branch '8.8RC'8.8
Diffstat (limited to 'view/js')
-rw-r--r-- | view/js/main.js | 27 | ||||
-rw-r--r-- | view/js/mod_hq.js | 3 |
2 files changed, 24 insertions, 6 deletions
diff --git a/view/js/main.js b/view/js/main.js index c463b1f59..d022ee4a9 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -86,6 +86,10 @@ $(document).ready(function() { $(document).on('click', '.conversation-settings-link', getConversationSettings); $(document).on('click', '#settings_module_ajax_submit', postConversationSettings); + $(document).on('click', '#expand-aside', function() { + toggleAside(); + }); + $(document).on('click focus', '.comment-edit-form textarea', function(e) { if(! this.autocomplete_handled) { /* autocomplete @nicknames */ @@ -1580,7 +1584,7 @@ function zFormError(elm,x) { $(window).scroll(function () { if(typeof buildCmd == 'function') { // This is a content page with items and/or conversations - if($(window).scrollTop() + $(window).height() > $('#conversation-end').position().top) { + if($('#conversation-end').length && ($(window).scrollTop() + $(window).height()) > $('#conversation-end').position().top) { if((pageHasMoreContent) && (! loadingPage)) { next_page++; scroll_next = true; @@ -1591,7 +1595,7 @@ $(window).scroll(function () { } else { // This is some other kind of page - perhaps a directory - if($('#page-end').length && ($(window).scrollTop() + $(window).height() > $('#page-end').position().top)) { + if($('#page-end').length && ($(window).scrollTop() + $(window).height()) > $('#page-end').position().top) { if((pageHasMoreContent) && (! loadingPage) && (! justifiedGalleryActive)) { next_page++; scroll_next = true; @@ -1779,4 +1783,21 @@ function push_notification(title, body, b64mid) { } } - +function toggleAside() { + if ($('main.region_1-on').length) { + $('#expand-aside-icon').addClass('fa-arrow-circle-right').removeClass('fa-arrow-circle-left'); + $('html, body').css({ 'position': '', 'left': '' }); + $('main').removeClass('region_1-on'); + $('#region_1').addClass('d-none'); + $('#region_2').css({ 'min-width': '' }); + $('#overlay').remove(); + } + else { + $('#expand-aside-icon').removeClass('fa-arrow-circle-right').addClass('fa-arrow-circle-left'); + $('html, body').css({ 'position': 'sticky', 'left': '0px'}); + $('main').addClass('region_1-on'); + $('#region_1').removeClass('d-none'); + $('#region_2').css({ 'min-width': window.outerWidth }); + $('<div id="overlay"></div>').appendTo('body').one('click', function() { toggleAside(); }); + } +} diff --git a/view/js/mod_hq.js b/view/js/mod_hq.js index dc274c5bf..1e4c02768 100644 --- a/view/js/mod_hq.js +++ b/view/js/mod_hq.js @@ -20,20 +20,17 @@ $(document).ready(function() { $(document).on('click', '.channel-activities-toggle', function(e) { $(window).scrollTop(0); - $(document).trigger('hz:hqControlsClickAction'); $('#channel-activities').toggleClass('d-none'); $(this).toggleClass('active'); }); $(document).on('click', '.jot-toggle', function(e) { - $(document).trigger('hz:hqControlsClickAction'); $('#jot-popup').toggle(); $('#profile-jot-text').focus().get(0).scrollIntoView({block: 'center'}); $(this).toggleClass('active'); }); $(document).on('click', '.notes-toggle', function(e) { - $(document).trigger('hz:hqControlsClickAction'); $('#personal-notes').toggleClass('d-none'); $('#note-text-html').get(0).scrollIntoView({block: 'center'}); $(this).toggleClass('active'); |