mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 22:28:51 +01:00
Fixed problem with dropdown menus in responsive tables (grids)
This commit is contained in:
parent
246b6c38ab
commit
4e432faf6d
@ -101,6 +101,26 @@ 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 {
|
||||||
|
t.css('overflow', 'visible');
|
||||||
|
}
|
||||||
|
}).on('hidden.bs.dropdown', '.table-responsive', function () {
|
||||||
|
$(this).css({'padding-bottom': '', 'overflow': ''});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// workaround for jp-player since it sets display to inline which results in a broken view...
|
// workaround for jp-player since it sets display to inline which results in a broken view...
|
||||||
$(document).on('click.humhub-jp-play', '.jp-play', function () {
|
$(document).on('click.humhub-jp-play', '.jp-play', function () {
|
||||||
$(this).closest('.jp-controls').find('.jp-pause').css('display', 'block');
|
$(this).closest('.jp-controls').find('.jp-pause').css('display', 'block');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user