Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
c322a590
Commit
c322a590
authored
Aug 01, 2018
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台 菜单优化
parent
3626adff
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
10 deletions
+38
-10
frame_tpl.html
application/index/view/global/frame_tpl.html
+1
-1
public.css
public/resource/css/public.css
+27
-2
icon_down_hide@2x.png
public/resource/image/icon_down_hide@2x.png
+0
-0
public.js
public/resource/js/public.js
+6
-5
menu_template_tpl.html
public/resource/template/menu_template_tpl.html
+4
-2
No files found.
application/index/view/global/frame_tpl.html
View file @
c322a590
...
...
@@ -34,7 +34,7 @@
<!--添加隐藏按钮-->
<div
id=
"hide_menu"
>
<span
class=
"width-136-hide"
>
隐藏
隐藏
<img
src=
"/resource/image/icon_down@2x.png"
class=
"text-icon-hide"
/>
</span>
</div>
...
...
public/resource/css/public.css
View file @
c322a590
...
...
@@ -129,13 +129,38 @@ a:hover{
}
/*菜单图标的样式*/
#icon_more_menu
{
width
:
1
2
px
;
height
:
1
3
px
;
width
:
1
3
px
;
height
:
1
4
px
;
margin-left
:
10px
;
float
:
right
;
margin-top
:
2px
;
background-image
:
url(/resource/image/icon_more@2x.png)
;
background-position
:
center
;
background-repeat
:
no-repeat
;
background-size
:
13px
14px
;
}
.open
>
a
#icon_more_menu
{
width
:
14px
;
height
:
11px
;
margin-left
:
10px
;
float
:
right
;
margin-top
:
2px
;
background-image
:
url(/resource/image/icon_down02@2x.png)
;
background-position
:
center
;
background-repeat
:
no-repeat
;
background-size
:
14px
11px
;
}
.glyphicon-zhanwei
{
margin-left
:
10px
;
}
/*隐藏 图标 样式*/
.text-icon-hide
{
width
:
16px
;
height
:
9px
;
margin-left
:
4px
;
}
.sidebar-nav
li
{
border-bottom
:
1px
solid
#1a1a1a
;
}
...
...
public/resource/image/icon_down_hide@2x.png
0 → 100644
View file @
c322a590
1.23 KB
public/resource/js/public.js
View file @
c322a590
...
...
@@ -32,7 +32,9 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function
var
_hash
=
location
.
pathname
.
replace
(
'/admin.php/'
,
'/'
);
var
_tempObj
=
$
(
'[data-href="'
+
_hash
+
'"]'
);
_tempObj
.
addClass
(
'active-a'
).
siblings
().
removeClass
(
'active-a'
);
_tempObj
.
closest
(
'.dropdown-menu'
).
prev
().
attr
(
'aria-expanded'
,
true
).
parents
().
addClass
(
'open'
).
siblings
().
removeClass
(
'open'
);
_tempObj
.
closest
(
'.dropdown-menu'
).
prev
().
attr
(
'aria-expanded'
,
true
).
parents
().
addClass
(
'open'
).
siblings
().
removeClass
(
'open'
);
console
.
log
(
_tempObj
.
closest
(
'.dropdown-menu'
).
prev
().
attr
(
'aria-expanded'
,
true
).
parents
().
attr
(
"class"
));
});
function
menu_bar
(
fn
)
{
...
...
@@ -94,15 +96,14 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
if
(
$
.
trim
(
_this
.
html
())
==
'隐藏'
){
if
(
$
.
trim
(
_this
.
html
())
.
indexOf
(
"隐藏"
)
!=-
1
){
$
(
'#sidebar-wrapper'
).
hide
();
$
(
'.width-136-hide'
).
html
(
'显示'
);
_this
.
html
(
'显示'
);
_this
.
html
(
'显示<img src="/resource/image/icon_down_hide@2x.png" class="text-icon-hide"/>'
);
console
.
log
(
2
);
// $("#page-content-wrapper").css("width","88%");
}
else
{
$
(
'#sidebar-wrapper'
).
show
();
_this
.
html
(
'隐藏'
);
_this
.
html
(
'隐藏
<img src="/resource/image/icon_down@2x.png" class="text-icon-hide"/>
'
);
// $("#page-content-wrapper").css("width","88%");
}
...
...
public/resource/template/menu_template_tpl.html
View file @
c322a590
...
...
@@ -6,8 +6,10 @@
<
a
href
=
"javascript:;"
><
span
class
=
"glyphicon glyphicon-credit-card"
aria
-
hidden
=
"true"
><
/span> <span class="span-list">
[
%= it[item
][
"title"
]
%]</
span
><
/a
>
[
%
}
else
{
%
]
<
a
href
=
"javascript:;"
class
=
"dropdown-toggle"
data
-
toggle
=
"dropdown"
>
<
span
class
=
"glyphicon glyphicon-credit-card"
aria
-
hidden
=
"true"
><
/span><span class="span-list">
[
%= it[item
][
"title"
]
%]</
span
>
<
span
class
=
"glyphicon glyphicon-hand-down"
aria
-
hidden
=
"true"
><
/span></
a
>
<!--<
img
src
=
"/resource/image/icon_more@2x.png"
id
=
"icon_more_menu"
/>-->
<!--<
span
class
=
"glyphicon glyphicon-chevron-down"
aria
-
hidden
=
"true"
><
/span>--
>
<
span
id
=
"icon_more_menu"
>
<
/span></
a
>
<!--<
img
src
=
"/resource/image/icon_more@2x.png"
id
=
""
/>-->
<
ul
class
=
"dropdown-menu"
role
=
"menu"
>
[
%
for
(
var
item_menu
in
it
[
item
][
"_child"
]){
%
]
<
li
><
a
href
=
"javascript:;"
target
=
"_blank"
class
=
"menu-sub-alink"
data
-
href
=
"/[%= it[item]['_child'][item_menu]['name'] %]"
><
span
class
=
"glyphicon-zhanwei"
><
/span> <span class="span-list">
[
%= it[item
][
"_child"
][
item_menu
][
'title'
]
%]</
span
><
/a></
li
>
...
...
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