
META-INF.resources.toolbar.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" %>
<%
String searchContainerId = ParamUtil.getString(request, "searchContainerId");
%>
<%
String label = null;
if (journalDisplayContext.isNavigationStructure()) {
label = LanguageUtil.get(request, "structure") + StringPool.COLON + StringPool.SPACE + HtmlUtil.escape(journalDisplayContext.getDDMStructureName());
}
%>
<%
String taglibURL = "javascript:Liferay.fire('" + renderResponse.getNamespace() + "editEntry', {action: 'expireEntries'}); void(0);";
%>
<%
taglibURL = "javascript:Liferay.fire('" + renderResponse.getNamespace() + "editEntry', {action: 'moveEntries'}); void(0);";
%>
function deleteEntries() {
if (<%= TrashUtil.isTrashEnabled(scopeGroupId) %> || confirm(' <%= UnicodeLanguageUtil.get(request, "are-you-sure-you-want-to-delete-the-selected-entries") %>')) {
Liferay.fire(
'<%= renderResponse.getNamespace() %>editEntry',
{
action: '<%= TrashUtil.isTrashEnabled(scopeGroupId) ? "moveEntriesToTrash" : "deleteEntries" %>'
}
);
}
}
$('# structures').on(
'click',
function(event) {
Liferay.Util.openDDMPortlet(
{
basePortletURL: '<%= PortletURLFactoryUtil.create(request, PortletProviderUtil.getPortletId(DDMStructure.class.getName(), PortletProvider.Action.VIEW), themeDisplay.getPlid(), PortletRequest.RENDER_PHASE) %>',
classPK: <%= journalDisplayContext.getDDMStructurePrimaryKey() %>,
dialog: {
destroyOnHide: true
},
eventName: ' selectStructure',
groupId: <%= themeDisplay.getScopeGroupId() %>,
mvcPath: '/select_structure.jsp',
navigationStartsOn: '<%= DDMNavigationHelper.SELECT_STRUCTURE %>',
refererPortletName: '<%= JournalPortletKeys.JOURNAL + ".filterStructure" %>',
<%
Portlet portlet = PortletLocalServiceUtil.getPortletById(portletDisplay.getId());
%>
refererWebDAVToken: '<%= WebDAVUtil.getStorageToken(portlet) %>',
showAncestorScopes: true,
title: '<%= UnicodeLanguageUtil.get(request, "structures") %>'
},
function(event) {
var uri = '<%= viewDDMStructureArticlesURL %>';
uri = Liferay.Util.addParams(' ddmStructureKey=' + event.ddmstructurekey, uri);
location.href = uri;
}
);
}
);
© 2015 - 2025 Weber Informatics LLC | Privacy Policy