[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Administrator 5 * @subpackage mod_stats_admin 6 * 7 * @copyright (C) 2012 Open Source Matters, Inc. <https://www.joomla.org> 8 * @license GNU General Public License version 2 or later; see LICENSE.txt 9 */ 10 11 defined('_JEXEC') or die; 12 13 \Joomla\CMS\Factory::getApplication()->getDocument()->addScriptDeclaration(' 14 (function() { 15 document.addEventListener(\'DOMContentLoaded\', function() { 16 var elms = document.querySelectorAll("a.js-revert"); 17 18 if (elms.length) { 19 elms.forEach(function(el) { 20 el.addEventListener("click", function(e) { 21 e.preventDefault(); 22 e.stopPropagation(); 23 24 var activeTab = []; 25 activeTab.push("#" + e.target.href.split("#")[1]); 26 var path = window.location.pathname; 27 localStorage.removeItem(e.target.href.replace(/&return=[a-zA-Z0-9%]+/, "").replace(/&[a-zA-Z-_]+=[0-9]+/, "")); 28 localStorage.setItem(path + e.target.href.split("index.php")[1].split("#")[0], JSON.stringify(activeTab)); 29 return window.location.href = e.target.href.split("#")[0]; 30 }); 31 }); 32 } 33 }); 34 })(); 35 '); 36 ?> 37 <ul class="list-group list-group-flush stats-module"> 38 <?php foreach ($list as $item) : ?> 39 <li class="list-group-item"> 40 <span class="me-2 icon-<?php echo $item->icon; ?> icon-fw" aria-hidden="true"></span> <?php echo $item->title; ?> 41 42 <?php if (isset($item->link)) : ?> 43 <a class="btn btn-info btn-sm js-revert" href="<?php echo $item->link; ?>"><?php echo $item->data; ?></a> 44 <?php else : ?> 45 <?php echo $item->data; ?> 46 <?php endif; ?> 47 </li> 48 <?php endforeach; ?> 49 </ul>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |