From 0d51d7300583fad744f8c270fd15500d1c0bb0db Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Wed, 26 Jun 2024 09:23:16 +0200 Subject: [PATCH] ActionList: Remove it from icinga behavior --- asset/js/widget/ActionList.js | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) 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)); +});