
META-INF.resources.message_boards.move_category.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="/message_boards/init.jsp" %>
<%
String redirect = ParamUtil.getString(request, "redirect");
MBCategory category = (MBCategory)request.getAttribute(WebKeys.MESSAGE_BOARDS_CATEGORY);
long categoryId = MBUtil.getCategoryId(request, category);
long parentCategoryId = BeanParamUtil.getLong(category, request, "parentCategoryId", MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID);
boolean portletTitleBasedNavigation = GetterUtil.getBoolean(portletConfig.getInitParameter("portlet-title-based-navigation"));
String headerTitle = LanguageUtil.format(request, "move-x", category.getName(), false);
if (portletTitleBasedNavigation) {
portletDisplay.setShowBackIcon(true);
portletDisplay.setURLBack(redirect);
renderResponse.setTitle(headerTitle);
}
%>
>
<%
String parentCategoryName = StringPool.BLANK;
try {
MBCategory parentCategory = MBCategoryLocalServiceUtil.getCategory(parentCategoryId);
parentCategoryName = parentCategory.getName();
}
catch (NoSuchCategoryException nsce) {
}
%>
<%
String taglibRemoveFolder = "Liferay.Util.removeEntitySelection('parentCategoryId', 'parentCategoryName', this, '" + renderResponse.getNamespace() + "');";
%>
<%
MBBreadcrumbUtil.addPortletBreadcrumbEntries(category, request, renderResponse);
PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(request, "move"), currentURL);
%>
$('# selectCategoryButton').on(
'click',
function(event) {
Liferay.Util.selectEntity(
{
dialog: {
constrain: true,
modal: true,
width: 680
},
id: ' selectCategory',
title: ' ',
uri: ' '
},
function(event) {
var form = $(document. fm);
form.fm('parentCategoryId').val(event.categoryid);
form.fm('parentCategoryName').val(_.unescape(event.name));
Liferay.Util.toggleDisabled('# removeCategoryButton', false);
}
);
}
);
© 2015 - 2025 Weber Informatics LLC | Privacy Policy