Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
f74f3b56
Commit
f74f3b56
authored
Jul 09, 2017
by
naan1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加菜单点击高亮不会消失的效果
parent
5a0057c3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
src/main/webapp/WEB-INF/view/common/_tab.html
+3
-3
src/main/webapp/static/css/style.css
+6
-0
src/main/webapp/static/js/hplus.js
+12
-1
No files found.
src/main/webapp/WEB-INF/view/common/_tab.html
View file @
f74f3b56
...
...
@@ -33,7 +33,7 @@
@for(title in titles){
@if(tool.isEmpty(title.children)){
<li>
<a
class=
"J_menuItem"
href=
"${ctxPath}${title.url}"
>
<a
class=
"J_menuItem"
href=
"${ctxPath}${title.url}"
name=
"tabMenuItem"
>
<i
class=
"fa ${title.icon}"
></i>
<span
class=
"nav-label"
>
${title.name}
</span>
</a>
...
...
@@ -49,7 +49,7 @@
@for(subTitle in title.children){
@if(tool.isEmpty(subTitle.children)){
<li>
<a
class=
"J_menuItem"
href=
"${ctxPath}${subTitle.url}"
>
${subTitle.name}
</a>
<a
class=
"J_menuItem"
href=
"${ctxPath}${subTitle.url}"
name=
"tabMenuItem"
>
${subTitle.name}
</a>
</li>
@}else{
<li>
...
...
@@ -57,7 +57,7 @@
<ul
class=
"nav nav-third-level"
>
@for(thirdTitle in subTitle.children){
<li>
<a
class=
"J_menuItem"
href=
"${ctxPath}${thirdTitle.url}"
>
${thirdTitle.name}
</a>
<a
class=
"J_menuItem"
href=
"${ctxPath}${thirdTitle.url}"
name=
"tabMenuItem"
>
${thirdTitle.name}
</a>
</li>
@}
</ul>
...
...
src/main/webapp/static/css/style.css
View file @
f74f3b56
...
...
@@ -7890,3 +7890,8 @@ body.skin-3 {
font-size
:
12px
}
}
.tab-menu-selected
{
background-color
:
#293846
!important
;
color
:
white
!important
;
}
\ No newline at end of file
src/main/webapp/static/js/hplus.js
View file @
f74f3b56
...
...
@@ -7,7 +7,6 @@ $(document).ready(function () {
// MetsiMenu
$
(
'#side-menu'
).
metisMenu
();
// 打开右侧边栏
$
(
'.right-sidebar-toggle'
).
click
(
function
()
{
$
(
'#right-sidebar'
).
toggleClass
(
'sidebar-open'
);
...
...
@@ -95,6 +94,12 @@ $(document).ready(function () {
}
});
//点击菜单的时候高亮显示菜单
$
(
"a[name='tabMenuItem']"
).
click
(
function
(){
clearTabMenuItem
();
$
(
this
).
addClass
(
"tab-menu-selected"
);
});
$
(
'.nav-close'
).
click
(
NavToggle
);
//ios浏览器兼容性处理
...
...
@@ -111,6 +116,12 @@ $(window).bind("load resize", function () {
}
});
function
clearTabMenuItem
(){
$
(
"a[name='tabMenuItem']"
).
each
(
function
(){
$
(
this
).
removeClass
(
"tab-menu-selected"
);
});
}
function
NavToggle
()
{
$
(
'.navbar-minimalize'
).
trigger
(
'click'
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment