diff --git a/asset/js/widget/ActionList.js b/asset/js/widget/ActionList.js index c176a0db..73cb3a12 100644 --- a/asset/js/widget/ActionList.js +++ b/asset/js/widget/ActionList.js @@ -1,22 +1,8 @@ -/* Icinga DB Web | (c) 2020 Icinga GmbH | GPLv2 */ - -;(function (Icinga) { +define(["../notjQuery"], function (notjQuery) { "use strict"; - - try { - var notjQuery = require('icinga/icinga-php-library/notjQuery'); - } catch (e) { - console.warn('Unable to provide input enrichments. Libraries not available:', e); - return; - } - - Icinga.Behaviors = Icinga.Behaviors || {}; - - class ActionList extends Icinga.EventListener { - constructor(icinga) { - super(icinga); - + class ActionList { + constructor() { this.on('click', '.action-list [data-action-item]:not(.page-separator), .action-list [data-action-item] a[href]', this.onClick, this); this.on('close-column', '#main > #col2', this.onColumnClose, this); this.on('column-moved', this.onColumnMoved, this); @@ -784,6 +770,6 @@ } } - Icinga.Behaviors.ActionList = ActionList; + return ActionList; -}(Icinga)); +});