From 5748bc7c4effb59bc5d80d71fc8a28e282755ee7 Mon Sep 17 00:00:00 2001 From: alokhyland Date: Tue, 3 Dec 2024 13:09:35 +0530 Subject: [PATCH] WEBUI-1610: Review comment: javascript:void(0) also exist on other files --- .../nuxeo-actions-menu/nuxeo-actions-menu.stories.js | 2 +- ui/import-href.js | 2 +- ui/nuxeo-aggregation/nuxeo-checkbox-aggregation.js | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/storybook/src/elements/nuxeo-actions-menu/nuxeo-actions-menu.stories.js b/storybook/src/elements/nuxeo-actions-menu/nuxeo-actions-menu.stories.js index 1d4e2394c..496b4eb3b 100644 --- a/storybook/src/elements/nuxeo-actions-menu/nuxeo-actions-menu.stories.js +++ b/storybook/src/elements/nuxeo-actions-menu/nuxeo-actions-menu.stories.js @@ -28,7 +28,7 @@ storiesOf('UI/nuxeo-actions-menu', module).add('Default', () => { ${list.map( (i) => html` - + `, )} diff --git a/ui/import-href.js b/ui/import-href.js index 659ba9cf0..b95206343 100644 --- a/ui/import-href.js +++ b/ui/import-href.js @@ -104,7 +104,7 @@ export const importHref = function(href, onload, onerror, optAsync) { */ export const importHTML = (html) => { const tmpl = document.createElement('template'); - const nuxeoNonceValue = Nuxeo.UI.config.nonce || '' + const nuxeoNonceValue = Nuxeo && Nuxeo.UI && Nuxeo.UI.config && Nuxeo.UI.config.nonce || '' tmpl.innerHTML = html; [...tmpl.content.children].forEach((el) => { if (el.tagName === 'SCRIPT' && !el.src) { diff --git a/ui/nuxeo-aggregation/nuxeo-checkbox-aggregation.js b/ui/nuxeo-aggregation/nuxeo-checkbox-aggregation.js index 413ec35cf..221a197d2 100644 --- a/ui/nuxeo-aggregation/nuxeo-checkbox-aggregation.js +++ b/ui/nuxeo-aggregation/nuxeo-checkbox-aggregation.js @@ -187,7 +187,9 @@ import { AggregationBehavior } from './nuxeo-aggregation-behavior.js'; - [[_computeShowMoreLabel(_showAll, i18n)]] + + [[_computeShowMoreLabel(_showAll, i18n)]] + @@ -280,7 +282,8 @@ import { AggregationBehavior } from './nuxeo-aggregation-behavior.js'; return `hardware:keyboard-arrow-${opened ? 'up' : 'down'}`; } - _toggleShow() { + _toggleShow(e) { + e.preventDefault(); this._set_showAll(!this._showAll); }