
META-INF.resources.configuration_manual.jsp Maven / Gradle / Ivy
<%--
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
--%>
<%@ include file="/init.jsp" %>
<%
PortletURL configurationRenderURL = (PortletURL)request.getAttribute("configuration.jsp-configurationRenderURL");
String selectScope = (String)request.getAttribute("configuration.jsp-selectScope");
String selectStyle = (String)request.getAttribute("configuration.jsp-selectStyle");
String eventName = "_" + HtmlUtil.escapeJS(assetPublisherDisplayContext.getPortletResource()) + "_selectAsset";
%>
<%= selectStyle %>
<%= selectScope %>
<%
List assetEntries = AssetPublisherUtil.getAssetEntries(renderRequest, portletPreferences, permissionChecker, assetPublisherDisplayContext.getGroupIds(), true, assetPublisherDisplayContext.isEnablePermissions(), true);
%>
<%
AssetRendererFactory> assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(assetEntry.getClassName());
AssetRenderer> assetRenderer = assetRendererFactory.getAssetRenderer(assetEntry.getClassPK(), AssetRendererFactory.TYPE_LATEST);
%>
<%= HtmlUtil.escape(assetRenderer.getTitle(locale)) %>
( )
<%
long[] groupIds = assetPublisherDisplayContext.getGroupIds();
for (long groupId : groupIds) {
Group group = GroupLocalServiceUtil.getGroup(groupId);
%>
<%
}
%>
<%@ include file="/display_settings.jspf" %>
<%@ include file="/email_subscription_settings.jspf" %>
function selectAsset(assetEntryId, assetClassName, assetType, assetEntryTitle, groupName) {
document. fm. <%= Constants.CMD %>.value = 'add-selection';
document. fm. redirect.value = '<%= HtmlUtil.escapeJS(currentURL) %>';
document. fm. assetEntryId.value = assetEntryId;
document. fm. assetEntryType.value = assetClassName;
submitForm(document. fm);
}
$('body').on(
'click',
'.asset-selector a',
function(event) {
event.preventDefault();
var currentTarget = $(event.currentTarget);
Liferay.Util.selectEntity(
{
dialog: {
constrain: true,
destroyOnHide: true,
modal: true
},
eventName: '<%= eventName %>',
id: '<%= eventName %>' + currentTarget.attr('id'),
title: currentTarget.data('title'),
uri: currentTarget.data('href')
},
function(event) {
selectAsset(event.assetentryid, event.assetclassname, event.assettype, event.assettitle, event.groupdescriptivename);
}
);
}
);
© 2015 - 2025 Weber Informatics LLC | Privacy Policy