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();
%>
">
|
<%
data.put("qa-id", "live");
try {
String liveGroupURL = siteAdministrationPanelCategoryDisplayContext.getLiveGroupURL();
%>
">
<%
}
catch (RemoteExportException | SystemException e) {
if (e instanceof SystemException) {
_log.error(e);
}
%>
new A.Tooltip({
bodyContent: Liferay.Language.get(
'the-connection-to-the-remote-live-site-cannot-be-established-due-to-a-network-problem'
),
position: 'right',
trigger: A.one('# remoteLiveLink'),
visible: false,
zIndex: Liferay.zIndex.TOOLTIP,
}).render();
<%
}
%>
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