1
0
قرینه از https://github.com/matomo-org/matomo.git synced 2025-08-22 06:57:53 +00:00
Files
Stefan Giehl aea8f07de8 Use materializecss/materialize instead of Dogfalo/materialize (#19622)
* remove old materialize css

* add new materlialize css

* update paths of materialize css

* fix visibility of normal selects

* fix selected in segmentation layer

* fix style for disabled selects

* update materializecss to 1.2.0

* update/fix some ui tests

* update materializecss to 1.2.1

* Apply patch from https://github.com/materializecss/materialize/pull/331

* update expected test files

* ignore list elements for modal buttons

* update expected test files

* update materializecss to 1.2.2

* fix ui test

* Update UI test screenshots

---------

Co-authored-by: Ben <ben.burgess@innocraft.com>
2023-03-28 11:51:14 +02:00

41 خطوط
1.3 KiB
JavaScript
Vendored

(function($, anim) {
$(document).on('click', '.card', function(e) {
if ($(this).children('.card-reveal').length) {
var $card = $(e.target).closest('.card');
if ($card.data('initialOverflow') === undefined) {
$card.data(
'initialOverflow',
$card.css('overflow') === undefined ? '' : $card.css('overflow')
);
}
let $cardReveal = $(this).find('.card-reveal');
if (
$(e.target).is($('.card-reveal .card-title')) ||
$(e.target).is($('.card-reveal .card-title i'))
) {
// Make Reveal animate down and display none
anim({
targets: $cardReveal[0],
translateY: 0,
duration: 225,
easing: 'easeInOutQuad',
complete: function(anim) {
let el = anim.animatables[0].target;
$(el).css({ display: 'none' });
$card.css('overflow', $card.data('initialOverflow'));
}
});
} else if ($(e.target).is($('.card .activator')) || $(e.target).is($('.card .activator i'))) {
$card.css('overflow', 'hidden');
$cardReveal.css({ display: 'block' });
anim({
targets: $cardReveal[0],
translateY: '-100%',
duration: 300,
easing: 'easeInOutQuad'
});
}
}
});
})(cash, M.anime);