diff --git a/data/web/js/build/012-api.js b/data/web/js/build/012-api.js index 89f2aa4a..8c673f65 100644 --- a/data/web/js/build/012-api.js +++ b/data/web/js/build/012-api.js @@ -318,7 +318,6 @@ $(document).ready(function() { // General API delete actions $(document).on('click', "[data-action='delete_selected']", function(e) { - console.log("delete"); e.preventDefault(); var id = $(this).data('id'); // If clicked element #delete_selected has data-item attribute, it is added to "items" @@ -337,7 +336,6 @@ $(document).ready(function() { if (typeof multi_data[id] == "undefined" || multi_data[id] == "") return; data_array = multi_data[id]; api_url = $(this).data('api-url'); - console.log("delete modal"); $(document).on('show.bs.modal', '#ConfirmDeleteModal', function() { $("#ItemsToDelete").empty(); for (var i in data_array) { diff --git a/data/web/js/build/014-mailcow.js b/data/web/js/build/014-mailcow.js index 6f1682fa..23736844 100644 --- a/data/web/js/build/014-mailcow.js +++ b/data/web/js/build/014-mailcow.js @@ -61,18 +61,38 @@ $(document).ready(function() { // remember last navigation pill (function () { 'use strict'; - if ($('button[data-bs-toggle="tab"]').length) { - $('button[data-bs-toggle="tab"]').on('shown.bs.tab', function (e) { + // remember desktop tabs + $('button[data-bs-toggle="tab"]').on('click', function (e) { if ($(this).data('dont-remember') == 1) { return true; } - var id = $(this).parents('[role="tablist"]').attr('id'); + var id = $(this).attr('id'); var key = 'lastTag'; if (id) { key += ':' + id; } - localStorage.setItem(key, $(e.target).attr('data-bs-target').substring(1)); + + var tab_id = $(e.target).attr('data-bs-target').substring(1); + localStorage.setItem(key, tab_id); }); + // remember mobile tabs + $('button[data-bs-target^="#collapse-tab-"]').on('click', function (e) { + // only remember tab if its being opened + if ($(this).hasClass('collapsed')) return false; + var tab_id = $(this).closest('div[role="tabpanel"]').attr('id'); + + if ($(this).data('dont-remember') == 1) { + return true; + } + var id = $(this).attr('id'); + var key = 'lastTag'; + if (id) { + key += ':' + id; + } + + localStorage.setItem(key, tab_id); + }); + // open last tab $('[role="tablist"]').each(function (idx, elem) { var id = $(elem).attr('id'); var key = 'lastTag'; @@ -81,10 +101,11 @@ $(document).ready(function() { } var lastTab = localStorage.getItem(key); if (lastTab) { - $("[id^=" + lastTab + "]").show(); + $('[data-bs-target="#' + lastTab + '"]').click(); + var tab = $('[id^="' + lastTab + '"]'); + $(tab).find('.card-body.collapse').collapse('show'); } }); - } })(); // IE fix to hide scrollbars when table body is empty diff --git a/data/web/templates/admin/tab-config-admins.twig b/data/web/templates/admin/tab-config-admins.twig index 7d431317..353a903c 100644 --- a/data/web/templates/admin/tab-config-admins.twig +++ b/data/web/templates/admin/tab-config-admins.twig @@ -1,230 +1,230 @@
{{ tfa_data.pretty }}
+ {% include 'tfa_keys.twig' %} +ID | +{{ lang.admin.action }} | +
---|
{{ tfa_data.pretty }}
- {% include 'tfa_keys.twig' %} -ID | -{{ lang.admin.action }} | -
---|