mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-09-25 02:47:38 +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) {
|
||||
let _this = e.data.self;
|
||||
$(e.target).find('.dashboard-settings, .dashboard.content, .dashboard-item-list, .dashlet-item-list').each(function () {
|
||||
let groupName = _this.getTypeFor(this),
|
||||
e.target.querySelectorAll('.dashboard-settings, .dashboard.content, .dashboard-item-list, .dashlet-item-list')
|
||||
.forEach(sortable => {
|
||||
let groupName = _this.getTypeFor(sortable),
|
||||
draggable,
|
||||
handle;
|
||||
|
||||
@ -181,7 +182,7 @@
|
||||
}
|
||||
case WIDGET_TYPES.Dashlet: {
|
||||
groupName = WIDGET_TYPES.Dashlet;
|
||||
if (this.matches('.dashboard.content')) {
|
||||
if (sortable.matches('.dashboard.content')) {
|
||||
draggable = '> .container';
|
||||
} else {
|
||||
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