Skip to content

Commit

Permalink
LPS-133773 Prefix with portletNamespace to make sure the selector is …
Browse files Browse the repository at this point in the history
…unique
  • Loading branch information
victorg1991 authored and brianchandotcom committed Jun 16, 2021
1 parent 1e9f178 commit 7cd2901
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ String layoutTemplateIdPrefix = (String)request.getAttribute("liferay-ui:layout-
List<LayoutTemplate> layoutTemplates = (List<LayoutTemplate>)request.getAttribute("liferay-ui:layout-templates-list:layoutTemplates");
%>

<div class="container-fluid lfr-page-layouts">
<div class="container-fluid <portlet:namespace />layout-template-list lfr-page-layouts">
<ul class="card-page">

<%
Expand Down Expand Up @@ -72,7 +72,7 @@ List<LayoutTemplate> layoutTemplates = (List<LayoutTemplate>)request.getAttribut
<aui:script require="frontend-js-web/liferay/delegate/delegate.es as delegateModule">
const delegate = delegateModule.default;

const delegateHandler = delegate(document.querySelector('.lfr-page-layouts'), 'click', '.lfr-layout-template', (event) => {
const delegateHandler = delegate(document.querySelector('.<portlet:namespace />layout-template-list.lfr-page-layouts'), 'click', '.lfr-layout-template', (event) => {
const layoutTemplateInput = event.delegateTarget.querySelector('input');

if (layoutTemplateInput) {
Expand Down

0 comments on commit 7cd2901

Please sign in to comment.