diff options
author | Mario <mario@mariovavti.com> | 2023-09-13 15:51:10 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-09-13 15:51:10 +0000 |
commit | 9e42be988408e0b4c7cff57c3923c73f6756e861 (patch) | |
tree | db100bae5e09cc7a1d76c35c065b5a783806cc6d /view/js | |
parent | 75e75b93cff5b2fb5d6243a908ee003b3faf010a (diff) | |
download | volse-hubzilla-9e42be988408e0b4c7cff57c3923c73f6756e861.tar.gz volse-hubzilla-9e42be988408e0b4c7cff57c3923c73f6756e861.tar.bz2 volse-hubzilla-9e42be988408e0b4c7cff57c3923c73f6756e861.zip |
theme fixes
Diffstat (limited to 'view/js')
-rw-r--r-- | view/js/main.js | 23 | ||||
-rw-r--r-- | view/js/mod_hq.js | 3 |
2 files changed, 22 insertions, 4 deletions
diff --git a/view/js/main.js b/view/js/main.js index c463b1f59..ced1a517e 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 */ @@ -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'); |