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

META-INF.resources.item.selector.wiki_pages.jsp Maven / Gradle / Ivy

There is a newer version: 7.0.121
Show 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="/item/selector/init.jsp" %>

<%
WikiPageItemSelectorViewDisplayContext wikiPageItemSelectorViewDisplayContext = (WikiPageItemSelectorViewDisplayContext)request.getAttribute(WikiItemSelectorWebKeys.WIKI_PAGE_ITEM_SELECTOR_VIEW_DISPLAY_CONTEXT);

SearchContainer wikiPagesSearchContainer = wikiPageItemSelectorViewDisplayContext.getSearchContainer(request, liferayPortletResponse, renderRequest);
%>


	.portlet-item-selector .wiki-page-item {
		cursor: pointer;
	}


<%
String searchURL = HttpComponentsUtil.removeParameter(
	PortletURLBuilder.create(
		PortletURLUtil.clone(currentURLObj, liferayPortletResponse)
	).setParameter(
		"resetCur", true
	).buildString(),
	liferayPortletResponse.getNamespace() + "keywords");
%>




	
		

		
			

			

				<%
				Date modifiedDate = curPage.getModifiedDate();

				String modifiedDateDescription = LanguageUtil.getTimeDescription(request, System.currentTimeMillis() - modifiedDate.getTime(), true);
				%>

				
<% WikiPageItemSelectorReturnTypeResolver wikiPageItemSelectorReturnTypeResolver = wikiPageItemSelectorViewDisplayContext.getWikiPageItemSelectorReturnTypeResolver(); %>
var Util = Liferay.Util; var searchContainer = Liferay.SearchContainer.get( 'wikiPagesSearchContainer' ); var searchContainerContentBox = searchContainer.get('contentBox'); searchContainerContentBox.delegate( 'click', (event) => { var selectedItem = event.currentTarget; var linkItem = selectedItem.one('.wiki-page'); Util.getOpener().Liferay.fire( '<%= wikiPageItemSelectorViewDisplayContext.getItemSelectedEventName() %>', { data: { title: linkItem.attr('data-title'), value: linkItem.attr('data-value'), }, } ); selectedItem.siblings().removeClass('active'); selectedItem.addClass('active'); }, '.list-group-item' );




© 2015 - 2024 Weber Informatics LLC | Privacy Policy