mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-09-25 10:57:40 +02:00
JS: Replace jquery.find() with pure js
This commit is contained in:
parent
96c3b31686
commit
d903b902fc
@ -161,8 +161,9 @@
|
|||||||
|
|
||||||
Dashboard.prototype.onRendered = function (e) {
|
Dashboard.prototype.onRendered = function (e) {
|
||||||
let _this = e.data.self;
|
let _this = e.data.self;
|
||||||
$(e.target).find('.dashboard-settings, .dashboard.content, .dashboard-item-list, .dashlet-item-list').each(function () {
|
e.target.querySelectorAll('.dashboard-settings, .dashboard.content, .dashboard-item-list, .dashlet-item-list')
|
||||||
let groupName = _this.getTypeFor(this),
|
.forEach(sortable => {
|
||||||
|
let groupName = _this.getTypeFor(sortable),
|
||||||
draggable,
|
draggable,
|
||||||
handle;
|
handle;
|
||||||
|
|
||||||
@ -181,7 +182,7 @@
|
|||||||
}
|
}
|
||||||
case WIDGET_TYPES.Dashlet: {
|
case WIDGET_TYPES.Dashlet: {
|
||||||
groupName = WIDGET_TYPES.Dashlet;
|
groupName = WIDGET_TYPES.Dashlet;
|
||||||
if (this.matches('.dashboard.content')) {
|
if (sortable.matches('.dashboard.content')) {
|
||||||
draggable = '> .container';
|
draggable = '> .container';
|
||||||
} else {
|
} else {
|
||||||
draggable = '.dashlet-list-item';
|
draggable = '.dashlet-list-item';
|
||||||
@ -205,7 +206,7 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Sortable.create(this, options);
|
Sortable.create(sortable, options);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user