mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 22:34:24 +02:00
Revert "js: Avoid usage of .matches()
as it isn't available with IE11"
This reverts commit cc0c6fc71b06c6883b8af2ae11b40f6b995569d1.
This commit is contained in:
parent
b64d205e6b
commit
a4d2397dd1
@ -67,7 +67,7 @@
|
|||||||
var toCollapse = [];
|
var toCollapse = [];
|
||||||
|
|
||||||
$.each(document.querySelectorAll('.collapsible'), function (_, collapsible) {
|
$.each(document.querySelectorAll('.collapsible'), function (_, collapsible) {
|
||||||
if ($(collapsible).is('.can-collapse')) {
|
if (collapsible.matches('.can-collapse')) {
|
||||||
if (! _this.canCollapse(collapsible)) {
|
if (! _this.canCollapse(collapsible)) {
|
||||||
var toggleSelector = collapsible.dataset.toggleElement;
|
var toggleSelector = collapsible.dataset.toggleElement;
|
||||||
if (! toggleSelector) {
|
if (! toggleSelector) {
|
||||||
@ -98,7 +98,7 @@
|
|||||||
Collapsible.prototype.onExpand = function(collapsiblePath) {
|
Collapsible.prototype.onExpand = function(collapsiblePath) {
|
||||||
var collapsible = $(collapsiblePath)[0];
|
var collapsible = $(collapsiblePath)[0];
|
||||||
|
|
||||||
if (collapsible && $(collapsible).is('.can-collapse')) {
|
if (collapsible && collapsible.matches('.can-collapse')) {
|
||||||
this.expand(collapsible);
|
this.expand(collapsible);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -134,7 +134,7 @@
|
|||||||
_this.icinga.logger.error(
|
_this.icinga.logger.error(
|
||||||
'[Collapsible] Collapsible control has no associated .collapsible: ', $target[0]);
|
'[Collapsible] Collapsible control has no associated .collapsible: ', $target[0]);
|
||||||
} else if (typeof collapsible.dataset.noPersistence !== 'undefined') {
|
} else if (typeof collapsible.dataset.noPersistence !== 'undefined') {
|
||||||
if ($(collapsible).is('.collapsed')) {
|
if (collapsible.matches('.collapsed')) {
|
||||||
_this.expand(collapsible);
|
_this.expand(collapsible);
|
||||||
} else {
|
} else {
|
||||||
_this.collapse(collapsible, _this.calculateCollapsedHeight(collapsible));
|
_this.collapse(collapsible, _this.calculateCollapsedHeight(collapsible));
|
||||||
@ -200,9 +200,9 @@
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (collapsible.tagName === 'TABLE') {
|
if (collapsible.matches('table')) {
|
||||||
return '> tbody > tr';
|
return '> tbody > tr';
|
||||||
} else if (collapsible.tagName === 'UL' || collapsible.tagName === 'OL') {
|
} else if (collapsible.matches('ul, ol')) {
|
||||||
return '> li:not(.collapsible-control)';
|
return '> li:not(.collapsible-control)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user