All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.edit_asset_list_entry.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" %>

<%
String redirect = ParamUtil.getString(request, "redirect");

if (Validator.isNull(redirect)) {
	PortletURL portletURL = renderResponse.createRenderURL();

	redirect = portletURL.toString();
}

portletDisplay.setShowBackIcon(true);
portletDisplay.setURLBack(redirect);

renderResponse.setTitle(assetListDisplayContext.getAssetListEntryTitle());
%>


	
		

		<%
		String segmentsConfigurationURL = editAssetListDisplayContext.getSegmentsCompanyConfigurationURL();
		%>

		
			
				
			
			
				
			
		
	




	<%
	AssetListEntry assetListEntry = assetListDisplayContext.getAssetListEntry();
	%>

	
		
			
function openSelectSegmentsEntryDialog() { Liferay.Util.openSelectionModal({ id: 'selectEntity', onSelect: function (event) { const valueJSON = JSON.parse(event.value); Liferay.Util.postForm(document.fm, { data: { segmentsEntryId: valueJSON.segmentsEntryId, }, url: '<%= addAssetListEntryVariationURL %>', }); }, selectEventName: 'selectEntity', title: '', url: '<%= editAssetListDisplayContext.getSelectSegmentsEntryURL() %>', }); } function saveSelectBoxes() { var form = document.fm; <% List> assetRendererFactories = ListUtil.sort(AssetRendererFactoryRegistryUtil.getAssetRendererFactories(company.getCompanyId()), new AssetRendererFactoryTypeNameComparator(locale)); for (AssetRendererFactory assetRendererFactory : assetRendererFactories) { ClassTypeReader classTypeReader = assetRendererFactory.getClassTypeReader(); List classTypes = classTypeReader.getAvailableClassTypes(editAssetListDisplayContext.getReferencedModelsGroupIds(), locale); if (classTypes.isEmpty()) { continue; } String className = assetListDisplayContext.getClassName(assetRendererFactory); %> Liferay.Util.setFormValues(form, { classTypeIds<%= className %>: Liferay.Util.getSelectedOptionValues( Liferay.Util.getFormElement( form, '<%= className %>currentClassTypeIds' ) ), }); <% } %> var currentClassNameIdsSelect = Liferay.Util.getFormElement( form, 'currentClassNameIds' ); if (currentClassNameIdsSelect) { Liferay.Util.postForm(form, { data: { classNameIds: Liferay.Util.getSelectedOptionValues( currentClassNameIdsSelect ), }, }); } else { submitForm(form); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy