自动计算当前页面功能
This commit is contained in:
parent
621d42ee34
commit
e036cea853
|
@ -8,6 +8,7 @@
|
|||
<link href="/js/lib/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" media="screen">
|
||||
<script src="/js/lib/jquery.lasted.js"></script>
|
||||
<script src="/js/lib/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="/js/navi.js"></script>
|
||||
<?= $this->headScript() ?>
|
||||
<?= $this->headLink() ?>
|
||||
<?= $this->headStyle() ?>
|
||||
|
@ -18,6 +19,7 @@
|
|||
<body>
|
||||
<div class="container">
|
||||
<?= $this->render('header.phtml') ?>
|
||||
<!--<div class="breadcrumb"><?= $this->breadcrumb() ?> </div>-->
|
||||
<?= $this->layout()->content ?>
|
||||
<?= $this->render('footer.phtml') ?>
|
||||
</div>
|
||||
|
@ -33,4 +35,5 @@
|
|||
piwikTracker.enableLinkTracking();
|
||||
} catch( err ) {}
|
||||
</script><noscript><p><img src="http://piwik.westgis.ac.cn/piwik.php?idsite=5" style="border:0" alt="" /></p></noscript>
|
||||
<script>setPage();</script>
|
||||
</html>
|
|
@ -15,8 +15,8 @@ function extractPageName(hrefString)
|
|||
{
|
||||
if (arr[i].parentNode.tagName != "DIV")
|
||||
{
|
||||
arr[i].className = "current";
|
||||
arr[i].parentNode.className = "current";
|
||||
arr[i].className = "active";
|
||||
arr[i].parentNode.className = "active";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,6 @@ function extractPageName(hrefString)
|
|||
{
|
||||
hrefString = document.location.href ? document.location.href : document.location;
|
||||
|
||||
if (document.getElementById("divNavi")!=null)
|
||||
setActiveMenu(document.getElementById("divNavi").getElementsByTagName("a"), extractPageName(hrefString));
|
||||
if (document.getElementById("mainmenu")!=null)
|
||||
setActiveMenu(document.getElementById("mainmenu").getElementsByTagName("a"), extractPageName(hrefString));
|
||||
}
|
Loading…
Reference in New Issue