From 1fd4c0511175af6fe9d6050fcb611827a301a311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6kay=20=C5=9Eat=C4=B1r?= Date: Thu, 17 Aug 2023 14:46:41 +0300 Subject: [PATCH] Add "class" property to JSDialogs items. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gökay Şatır Change-Id: I130b28ff40f9adf6bf05e2aed433e8ecc92acb1d --- browser/src/control/Control.JSDialogBuilder.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/browser/src/control/Control.JSDialogBuilder.js b/browser/src/control/Control.JSDialogBuilder.js index a68f87108..9d7bdb59b 100644 --- a/browser/src/control/Control.JSDialogBuilder.js +++ b/browser/src/control/Control.JSDialogBuilder.js @@ -2470,6 +2470,8 @@ L.Control.JSDialogBuilder = L.Control.extend({ controls['container'] = div; div.tabIndex = -1; + if (data.class) + div.classList.add(data.class); var isRealUnoCommand = true; var hasPopUp = false; @@ -2978,6 +2980,9 @@ L.Control.JSDialogBuilder = L.Control.extend({ if (data.command) { var div = builder._createIdentifiable('div', 'unotoolbutton ' + builder.options.cssClass + ' ui-content unospan', parentContainer, data); + if (data.class) + div.classList.add(data.class); + var id = data.command.substr('.uno:'.length); div.id = id; div.tabIndex = -1;