Skip to content

Commit

Permalink
Scope navbar toggling to not interfere with Tiki elements
Browse files Browse the repository at this point in the history
  • Loading branch information
josaphatim committed Nov 23, 2024
1 parent b4cd0f0 commit 661f812
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
22 changes: 11 additions & 11 deletions modules/core/navigation/navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ $(() => {

$('.mobile nav').before(menuToggle);

$(document).on('click', '.menu-toggle', showMobileNavbar);
$(document).on('click', 'nav .menu-toggle', hideMobileNavbar)
$(document).on('click', '.cypht-layout .menu-toggle', showMobileNavbar);
$(document).on('click', '.cypht-layout nav .menu-toggle', hideMobileNavbar)
} else {
$(document).on('click', '.menu-toggle', function() {
$('nav').toggleClass('collapsed');
if ($('nav').hasClass('collapsed')) {
$(document).on('click', '.cypht-layout .menu-toggle', function() {
$('.cypht-layout nav').toggleClass('collapsed');
if ($('.cypht-layout nav').hasClass('collapsed')) {
document.documentElement.style.setProperty('--nav-size', 'var(--nav-collapsed-size)');
} else {
document.documentElement.style.setProperty('--nav-size', 'var(--nav-expanded-size)');
Expand All @@ -28,13 +28,13 @@ $(() => {
})

function hideMobileNavbar() {
$('nav').css('transform', 'translateX(-120%)');
$('main').css('max-height', 'unset');
$('main').css('overflow', 'unset');
$('.cypht-layout nav').css('transform', 'translateX(-120%)');
$('.cypht-layout main').css('max-height', 'unset');
$('.cypht-layout main').css('overflow', 'unset');
}

function showMobileNavbar() {
$('nav').css('transform', 'translateX(0)');
$('main').css('max-height', 'calc(100vh - 3.5rem)');
$('main').css('overflow', 'hidden');
$('.cypht-layout nav').css('transform', 'translateX(0)');
$('.cypht-layout main').css('max-height', 'calc(100vh - 3.5rem)');
$('.cypht-layout main').css('overflow', 'hidden');
}
7 changes: 2 additions & 5 deletions modules/imap/hm-imap.php
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,8 @@ private function map_permissions($rights_string) {
't' => 'Take',
'e' => 'Examine',
'c' => 'Create',
'd' => 'Delete'
'd' => 'Delete',
'd' => 'Look'
];

foreach (str_split($rights_string) as $char) {
Expand Down Expand Up @@ -1434,10 +1435,6 @@ public function get_message_headers($uid, $message_part=false, $raw=false) {
$results[$vals[0]] = $vals[1];
}
}
if ($flags && is_array($results['Flags'])) {
$results['Flags'] = array_unique($results['Flags']);
$results['Flags'] = implode(' ', $results['Flags']);
}
if ($status) {
return $this->cache_return_val($results, $cache_command);
}
Expand Down
2 changes: 1 addition & 1 deletion modules/imap/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,7 @@ $(document).on('submit', '#shareForm', function(e) {
if ($('#accessRead').is(':checked')) permissions += 'r';
if ($('#accessWrite').is(':checked')) permissions += 'w';
if ($('#accessDelete').is(':checked')) permissions += 'd';
if ($('#accessOther').is(':checked')) permissions += 'a';
if ($('#accessOther').is(':checked')) permissions += 'l';
// If no permissions are selected, call DELETEACL elser call SETACL
const action = permissions === '' ? 'remove' : 'add';
Hm_Ajax.request(
Expand Down

0 comments on commit 661f812

Please sign in to comment.