This commit is contained in:
Marc Farré 2025-01-06 14:58:56 +00:00
parent 2e261036ed
commit 4931c0359c
2 changed files with 6 additions and 14 deletions

View File

@ -2,7 +2,7 @@
/**
* This file is generated by the "yii asset" command.
* DO NOT MODIFY THIS FILE DIRECTLY.
* @version 2025-01-02 09:41:07
* @version 2025-01-06 14:58:03
*/
return [
'app' => [
@ -110,6 +110,7 @@ return [
'css' => [],
'depends' => [
'yii\\web\\JqueryAsset',
'yii\\bootstrap5\\BootstrapAsset',
'humhub\\assets\\JuiBootstrapBridgeAsset',
'app',
],
@ -531,4 +532,4 @@ return [
'defer',
],
],
];
];

View File

@ -146,20 +146,11 @@ humhub.module('ui.additions', function (module, require, $) {
// Workaround: Bootstrap bug with dropdowns in responsive tables
// See: https://github.com/twbs/bootstrap/issues/11037
$(document).on('shown.bs.dropdown', '.table-responsive', function (e) {
var t = $(this),
m = $(e.target).find('.dropdown-menu'),
tb = t.offset().top + t.height(),
mb = m.offset().top + m.outerHeight(true),
d = 20; // Space for shadow + scrollbar.
if (t[0].scrollWidth > t.innerWidth()) {
if (mb + d > tb) {
t.css('padding-bottom', ((mb + d) - tb));
}
} else {
var t = $(this);
t.css('overflow', 'visible');
if (t[0].scrollWidth <= t.innerWidth()) {
t.css('overflow', 'visible');
}
}).on('hidden.bs.dropdown', '.table-responsive', function () {
$(this).css({'padding-bottom': '', 'overflow': ''});
});