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

META-INF.resources.sites.site_administration_body.jsp Maven / Gradle / Ivy

<%--
/**
 * 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" %>

<%
PanelCategory panelCategory = (PanelCategory)request.getAttribute(ApplicationListWebKeys.PANEL_CATEGORY);

SiteAdministrationPanelCategoryDisplayContext siteAdministrationPanelCategoryDisplayContext = new SiteAdministrationPanelCategoryDisplayContext(liferayPortletRequest, null);
%>


	
		
			

				<%
				Map data = HashMapBuilder.put(
					"qa-id", "staging"
				).build();
				%>

				
			

			
				
			

			
				
			
		
	

	
		
	



	
		var pagesTreeToggle = document.getElementById(
			'pagesTreeSidenavToggleId'
		);

		pagesTreeToggle.addEventListener('click', (event) => {
			Liferay.Portlet.destroy('#p_p_id', true);

			Liferay.Util.Session.set(
				'com.liferay.product.navigation.product.menu.web_pagesTreeState',
				'open'
			).then(() => {
				Liferay.Util.fetch(
					'<%= siteAdministrationPanelCategoryDisplayContext.getPageTreeURL() %>'
				)
					.then((response) => {
						if (!response.ok) {
							throw new Error(
								''
							);
						}

						return response.text();
					})
					.then((response) => {
						var sidebar = document.querySelector(
							'.lfr-product-menu-sidebar .sidebar-body'
						);

						sidebar.innerHTML = '';

						var range = document.createRange();
						range.selectNode(sidebar);

						var fragment = range.createContextualFragment(response);

						var pagesTree = document.createElement('div');
						pagesTree.setAttribute('class', 'pages-tree');
						pagesTree.appendChild(fragment);

						sidebar.appendChild(pagesTree);
					});
			});
		});
	


<%!
private static final Log _log = LogFactoryUtil.getLog("com_liferay_product_navigation_site_administration.sites.site_administration_body_jsp");
%>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy