Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: deploying esco-hamburger-menu from quickstart #239

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
<channel fname="portal-greeting" unremovable="false" hidden="false" immutable="false" ID="n130"/>
<channel fname="logout-launcher" unremovable="false" hidden="false" immutable="false" ID="n140"/>
<channel fname="session-timeout" unremovable="false" hidden="false" immutable="false" ID="n150"/>
<channel fname="content-menu" unremovable="false" hidden="false" immutable="false" ID="n160"/>
</folder>
<folder ID="s300" hidden="false" immutable="true" name="Customize folder" type="customize" unremovable="true">
<channel fname="personalization-gallery" unremovable="false" hidden="false" immutable="false" ID="n310"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@
<readOnly>false</readOnly>
<value>
<![CDATA[
<script src="/resource-server/webjars/vue/dist/vue.min.js"></script>
<script type="text/javascript" src="/resource-server/webjars/uportal__esco-content-menu/dist/esco.min.js" defer></script>

<esco-content-grid
portlet-api-url="/uPortal/api/v4-3/dlm/portletRegistry.json?category=Administration"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<portlet-definition version="4.0" xsi:schemaLocation="https://source.jasig.org/schemas/uportal/io/portlet-definition https://source.jasig.org/schemas/uportal/io/portlet-definition/portlet-definition-4.0.xsd" xmlns:ns2="https://source.jasig.org/schemas/uportal" xmlns="https://source.jasig.org/schemas/uportal/io/portlet-definition" xmlns:ns4="https://source.jasig.org/schemas/uportal/io/portlet-type" xmlns:ns3="https://source.jasig.org/schemas/uportal/io/subscribed-fragment" xmlns:ns5="https://source.jasig.org/schemas/uportal/io/event-aggregation" xmlns:ns6="https://source.jasig.org/schemas/uportal/io/user" xmlns:ns7="https://source.jasig.org/schemas/uportal/io/stylesheet-descriptor" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns8="https://source.jasig.org/schemas/uportal/io/permission-owner">
<title>Menu Header</title>
<name>Menu Header</name>
<fname>content-menu</fname>
<desc>New kind of header menu</desc>
<type>Portlet</type>
<timeout>12000</timeout>
<portlet-descriptor>
<ns2:isFramework>true</ns2:isFramework>
<ns2:portletName>JspInvoker</ns2:portletName>
</portlet-descriptor>
<group>Everyone</group>
<parameter>
<name>disableDynamicTitle</name>
<value>true</value>
</parameter>
<portlet-preference>
<name>JspInvokerPortletController.viewLocation</name>
<readOnly>false</readOnly>
<value>/jsp/Invoker/content-menu</value>
</portlet-preference>
<portlet-preference>
<name>JspInvokerPortletController.beans</name>
<readOnly>false</readOnly>
<value>personManager</value>
</portlet-preference>
<portlet-preference>
<name>portalLogoutUrl</name>
<readOnly>false</readOnly>
<value>/uPortal/Logout</value>
</portlet-preference>
<portlet-preference>
<name>alternativeBanner</name>
<readOnly>true</readOnly>
<value>https://www.toureiffel.paris/sites/default/files/styles/1440x810/public/2017-10/monument-landing-header-bg_0.jpg?itok=_dSLLBlZ</value>
</portlet-preference>
<portlet-preference>
<name>favoriteApiUrl</name>
<readOnly>true</readOnly>
<value>/uPortal/api/layout</value>
</portlet-preference>
<portlet-preference>
<name>layoutApiUrl</name>
<readOnly>true</readOnly>
<value>/uPortal/api/v4-3/dlm/layout.json</value>
</portlet-preference>
<portlet-preference>
<name>portletApiUrl</name>
<readOnly>true</readOnly>
<value>/uPortal/api/v4-3/dlm/portletRegistry.json?category=All%20categories</value>
</portlet-preference>
<portlet-preference>
<name>userInfoApiUrl</name>
<readOnly>true</readOnly>
<value>/uPortal/api/v5-1/userinfo</value>
</portlet-preference>
<portlet-preference>
<name>favoritesPortletCardSize</name>
<readOnly>true</readOnly>
<value>small</value>
</portlet-preference>
<portlet-preference>
<name>gridPortletCardSize</name>
<readOnly>true</readOnly>
<value>auto</value>
</portlet-preference>
<portlet-preference>
<name>hideActionMode</name>
<readOnly>true</readOnly>
<value>never</value>
</portlet-preference>
<portlet-preference>
<name>hidePortalNav</name>
<readOnly>true</readOnly>
<value>false</value>
</portlet-preference>
<!--
<portlet-preference>
<name>organizationApiUrl</name>
<readOnly>true</readOnly>
<value>/context/rest/orgsInfos/</value>
</portlet-preference>
<portlet-preference>
<name>moreUserInfoUrl</name>
<readOnly>true</readOnly>
<value>/uPortal/p/</value>
</portlet-preference>
<portlet-preference>
<name>orgInfoUrl</name>
<readOnly>true</readOnly>
<value>/uPortal/p/etablissement-swapper</value>
</portlet-preference>
-->
</portlet-definition>
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<%--

Licensed to Apereo under one or more contributor license
agreements. See the NOTICE file distributed with this work
for additional information regarding copyright ownership.
Apereo licenses this file to you under the Apache License,
Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a
copy of the License at the following location:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.

--%>
<%@ include file="/WEB-INF/jsp/include.jsp" %>

<c:set var="request" value="${pageContext.request}" />
<c:set var="ctxPath" value="${request.contextPath}" />

<script src="/resource-server/webjars/vue/dist/vue.min.js" type="text/javascript"></script>
<script src="/resource-server/webjars/uportal__esco-content-menu/dist/esco.min.js" type="text/javascript" defer></script>

<div id="content-menu">
<esco-hamburger-menu
context-api-url="${ctxPath}"
sign-out-url="${portalLogoutUrl[0]}"
default-org-logo="${alternativeBanner[0]}"
favorite-api-url="${favoriteApiUrl[0]}"
layout-api-url="${layoutApiUrl[0]}"
organization-api-url="${organizationApiUrl[0]}"
portlet-api-url="${portletApiUrl[0]}"
user-info-api-url="${userInfoApiUrl[0]}"
user-info-portlet-url="${moreUserInfoUrl[0]}"
switch-org-portlet-url="${orgInfoUrl[0]}"
favorites-portlet-card-size="${favoritesPortletCardSize[0]}"
grid-portlet-card-size="${gridPortletCardSize[0]}"
hide-action-mode="${hideActionMode[0]}"
show-favorites-in-slider="true"
></esco-hamburger-menu>
</div>

<script type="text/javascript">
/** this part is needed to move the menu on left from uPortal menu. */
if (!Element.prototype.matches)
Element.prototype.matches = Element.prototype.msMatchesSelector ||
Element.prototype.webkitMatchesSelector;
if (!Element.prototype.closest)
Element.prototype.closest = function(s) {
var el = this;
if (!document.documentElement.contains(el)) return null;
do {
if (el.matches(s)) return el;
el = el.parentElement || el.parentNode;
} while (el !== null);
return null;
};
document.querySelector('#content-menu').closest("section").setAttribute("style", "float: left;");
</script>

<c:if test="${hidePortalNav[0]}">
<style type="text/css">
.portal .row-offcanvas #wrapper .portal-header #up-sticky-nav .portal-global a.menu-toggle, .portal .row-offcanvas #wrapper .portal-header nav.portal-nav {
display: none;
}
.portal .row-offcanvas.active {
transform: none;
}
</style>
</c:if>