Skip to content

Commit

Permalink
WEBUI-1610: Review comment: javascript:void(0) also exist on other files
Browse files Browse the repository at this point in the history
  • Loading branch information
alokhyland committed Dec 11, 2024
1 parent a977641 commit f2b28c0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ storiesOf('UI/nuxeo-actions-menu', module).add('Default', () => {
<nuxeo-actions-menu>
${list.map(
(i) => html`
<nuxeo-link-button href="javascript:void(0)" icon=${i} label=${i}> </nuxeo-link-button>
<nuxeo-link-button href="#" icon=${i} label=${i}> </nuxeo-link-button>
`,
)}
</nuxeo-actions-menu>
Expand Down
2 changes: 1 addition & 1 deletion ui/import-href.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
7 changes: 5 additions & 2 deletions ui/nuxeo-aggregation/nuxeo-checkbox-aggregation.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ import { AggregationBehavior } from './nuxeo-aggregation-behavior.js';
</template>
</dom-repeat>
<span hidden$="[[_hideShowMoreButton(buckets, visibleItems)]]" class="show-more-button">
<a href="javascript:void(0);" on-tap="_toggleShow"> [[_computeShowMoreLabel(_showAll, i18n)]] </a>
<a href="#" on-tap="_toggleShow">
[[_computeShowMoreLabel(_showAll, i18n)]]
</a>
</span>
</template>
</dom-if>
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit f2b28c0

Please sign in to comment.