META-INF.resources.asset_list.scope.jsp Maven / Gradle / Ivy
The newest version!
<%--
/**
* SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
--%>
<%@ include file="/init.jsp" %>
<%
List selectedGroups = editAssetListDisplayContext.getSelectedGroups();
%>
<%
ScopeActionDropdownItemsProvider scopeActionDropdownItemsProvider = new ScopeActionDropdownItemsProvider(editAssetListDisplayContext, liferayPortletRequest);
%>
const searchContainer = Liferay.SearchContainer.get(
' groupsSearchContainer'
);
searchContainer.get('contentBox').delegate(
'click',
(event) => {
const link = event.currentTarget;
const tr = link.ancestor('tr');
searchContainer.deleteRow(tr, link.getAttribute('data-rowId'));
searchContainer.updateDataStore();
const groupIds = document.getElementById(
' groupIds'
);
if (groupIds) {
const searchContainerData = searchContainer.getData();
groupIds.setAttribute('value', searchContainerData.split(','));
submitForm(document. fm);
}
},
'.modify-link'
);