blob: 4a66c8f8ad7951d22143d39a07ba16871484c50a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
STUDIP.domReady(function() {
if (window.MutationObserver !== undefined) {
var observer = new window.MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
if (mutation.attributeName === 'class') {
if (
$(mutation.target)
.attr('class')
.indexOf('open') !== -1
) {
$(mutation.target)
.next()
.find('td')
.slideDown()
.find('.detailscontainer')
.hide()
.slideDown();
} else {
$(mutation.target)
.next()
.css('display', 'table-row')
.find('td')
.slideUp()
.find('.detailscontainer')
.slideUp();
}
}
});
});
$('table.withdetails > tbody > tr:not(.details)').each(function(index, element) {
observer.observe(element, { attributes: true });
});
}
});
STUDIP.ready(function (event) {
$('table.sortable-table:not(.tablesorter)', event.target).each((index, element) => {
STUDIP.Table.enhanceSortableTable(element);
});
});
|