1/*1790827706000*/ 2/** 3 * Copyright (c) 2000-present Liferay, Inc. All rights reserved. 4 * 5 * This library is free software; you can redistribute it and/or modify it under 6 * the terms of the GNU Lesser General Public License as published by the Free 7 * Software Foundation; either version 2.1 of the License, or (at your option) 8 * any later version. 9 * 10 * This library is distributed in the hope that it will be useful, but WITHOUT 11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 12 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 13 * details. 14 */ 15 16/* 17 * This function gets loaded when all the HTML, not including the portlets, is 18 * loaded. 19 */ 20AUI().ready(function () {}); 21 22/* 23 * This function gets loaded after each and every portlet on the page. 24 * 25 * portletId: the current portlet's id 26 * node: the Alloy Node object of the current portlet 27 */ 28Liferay.Portlet.ready(function (_portletId, _node) {}); 29 30/* 31 * This function gets loaded when everything, including the portlets, is on 32 * the page. 33 */ 34Liferay.on('allPortletsReady', function () { 35 const banner = document.getElementById('banner'); 36 37 initMainNav(); 38 39 function initMainNav() { 40 if (!banner) { 41 return 42 } 43 44 const nav = banner.querySelector('.list-menu'); 45 46 if (nav) { 47 const navItems = nav.querySelectorAll('.lfr-nav-item'); 48 49 navItems.forEach((navItem) => { 50 navItem.addEventListener('click', () => { 51 if (navItem.children.length && navItem.children[0].tagName === 'A') { 52 const a = navItem.children[0]; 53 54 a.click(); 55 56 } 57 }); 58 59 if (navItem.classList.contains('active')) { 60 const ancestors = AUI().one(navItem).ancestors('.lfr-nav-item').getDOM(); 61 62 ancestors.forEach((e) => { 63 e.classList.add('active'); 64 }); 65 66 } 67 }); 68 69 } 70 } 71 72});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.