mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-09-26 03:09:10 +02:00
dashboards.js: Don't use a variable for handle
This commit is contained in:
parent
ff5ae27eb6
commit
9b1f780c4b
@ -134,24 +134,20 @@
|
||||
e.target.querySelectorAll('.dashboard-settings, .dashboard-item-list, .dashlet-item-list')
|
||||
.forEach(sortable => {
|
||||
let groupName = _this.getTypeFor(sortable),
|
||||
draggable,
|
||||
handle;
|
||||
draggable;
|
||||
|
||||
switch (groupName) {
|
||||
case _this.widgetTypes.DashboardHome:
|
||||
groupName = _this.widgetTypes.DashboardHome;
|
||||
draggable = '.home-list-control';
|
||||
handle = 'h1 > .widget-drag-initiator';
|
||||
break;
|
||||
case _this.widgetTypes.Dashboard:
|
||||
groupName = _this.widgetTypes.Dashboard;
|
||||
draggable = '.dashboard-list-control';
|
||||
handle = 'h1 > .widget-drag-initiator'
|
||||
break;
|
||||
case _this.widgetTypes.Dashlet:
|
||||
groupName = _this.widgetTypes.Dashlet;
|
||||
draggable = '.dashlet-list-item';
|
||||
handle = 'h1 > .widget-drag-initiator';
|
||||
}
|
||||
|
||||
let options = {
|
||||
@ -160,7 +156,7 @@
|
||||
dataIdAttr : 'id',
|
||||
direction : 'vertical',
|
||||
draggable : draggable,
|
||||
handle : handle,
|
||||
handle : 'h1 > .widget-drag-initiator',
|
||||
group : { name : groupName },
|
||||
chosenClass : 'draggable-widget-chosen'
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user