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
3ed98725
Commit
3ed98725
authored
May 22, 2018
by
xishifeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
暂存
parent
d1c170ef
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
41 deletions
+32
-41
public.css
public/resource/css/public.css
+9
-38
public.js
public/resource/js/public.js
+20
-0
menu_template_tpl.html
public/resource/template/menu_template_tpl.html
+3
-3
No files found.
public/resource/css/public.css
View file @
3ed98725
...
...
@@ -54,9 +54,6 @@ a:hover{
.nav
.open
>
a
{
background-color
:
transparent
;
}
.nav
.open
>
a
:hover
{
background-color
:
transparent
;
}
.nav
.open
>
a
:focus
{
background-color
:
transparent
;
}
...
...
@@ -118,38 +115,21 @@ a:hover{
position
:
relative
;
width
:
100%
;
}
.sidebar-nav
li
:before
{
background-color
:
#ff9419
;
content
:
''
;
height
:
100%
;
left
:
0
;
position
:
absolute
;
top
:
0
;
-webkit-transition
:
width
0.2s
ease-in
;
transition
:
width
0.2s
ease-in
;
width
:
0px
;
z-index
:
-1
;
}
.sidebar-nav
.dropdown-menu
li
:before
{
background
:
rgba
(
255
,
148
,
25
,
0.1
)
!important
;
.menu-main-li.active-main-li
>
a
{
background-color
:
yellow
;
}
.sidebar-nav
li
:hover:before
{
-webkit-transition
:
width
0.2s
ease-in
;
transition
:
width
0.2s
ease-in
;
width
:
100%
;
.menu-main-li
:hover
>
a
{
background-color
:
#ff9419
!important
;
}
.sidebar-nav
li
a
{
color
:
#dddddd
;
display
:
block
;
padding
:
13px
15px
13px
30px
;
text-decoration
:
none
;
}
.sidebar-nav
li
.open
:hover
before
{
-webkit-transition
:
width
0.2s
ease-in
;
transition
:
width
0.2s
ease-in
;
width
:
100%
;
}
.sidebar-nav
.dropdown-menu
{
background-color
:
#222222
;
border-radius
:
0
;
...
...
@@ -160,16 +140,7 @@ a:hover{
position
:
relative
;
width
:
100%
;
}
.sidebar-nav
li
a
:hover
,
.sidebar-nav
li
a
:active
,
.sidebar-nav
li
a
:focus
,
.sidebar-nav
li
.open
a
:hover
,
.sidebar-nav
li
.open
a
:active
,
.sidebar-nav
li
.open
a
:focus
{
background-color
:
transparent
;
color
:
#ffffff
;
text-decoration
:
none
;
}
.sidebar-nav
>
.sidebar-brand
{
font-size
:
20px
;
height
:
65px
;
...
...
@@ -181,8 +152,8 @@ a:hover{
.span-list
{
margin-left
:
6px
;
}
.dropdown-menu
>
li
>
a
:hover
,
.dropdown-menu
>
li
>
a
:focus
,
.dropdown-menu
>
.active
>
a
,
.dropdown-menu
>
.active
>
a
:hover
,
.dropdown-menu
>
.active
>
a
:focus
{
background
:
rgba
(
255
,
148
,
25
,
0.1
)
!important
;
.dropdown-menu
>
li
>
a
.active-sub-li
{
background
:
rgba
(
255
,
148
,
25
,
0.1
)
!important
;
}
.successModel
{
display
:
none
;
...
...
public/resource/js/public.js
View file @
3ed98725
...
...
@@ -47,6 +47,8 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html'], function (doT, $,t
data
:
""
,
dataType
:
'json'
,
success
:
function
(
data
)
{
var
_indexMain
=
sessionStorage
.
getItem
(
'menuMainIndex'
);
var
_indexSub
=
sessionStorage
.
getItem
(
'menuSubIndex'
);
var
temp
=
document
.
getElementById
(
'menu_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
$
(
"#menu_bar"
).
html
(
doTtmpl
(
data
.
data
.
menu
));
...
...
@@ -59,6 +61,24 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html'], function (doT, $,t
$
(
"#logout"
).
click
(
function
()
{
sessionStorage
.
removeItem
(
'pcUserInfo'
);
});
var
_doc
=
$
(
document
);
_doc
.
on
(
'click'
,
'.menu-sub-alink'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
sessionStorage
.
setItem
(
'menuMainIndex'
,
_this
.
parent
().
index
());
sessionStorage
.
setItem
(
'menuSubIndex'
,
_this
.
closest
(
'.menu-main-li'
).
index
());
location
.
href
=
_this
.
data
(
'href'
);
});
_doc
.
on
(
'click'
,
'.menu-main-li'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
_this
.
addClass
(
'active-main-li'
).
siblings
().
removeClass
(
'active-main-li'
);
});
});
function
getUrlParam
(
name
)
{
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
);
...
...
public/resource/template/menu_template_tpl.html
View file @
3ed98725
<script
id=
"menu_tpl"
type=
"text/template"
>
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
<
li
class
=
"dropdown"
>
<
li
class
=
"dropdown
menu-main-li
"
>
[
%
if
(
it
[
item
][
"_child"
]
==
undefined
||
it
[
item
][
"_child"
].
length
==
0
)
{
%
]
<
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
=
""
class
=
"dropdown-toggle"
data
-
toggle
=
"dropdown"
>
<
span
class
=
"glyphicon glyphicon-credit-card"
aria
-
hidden
=
"true"
><
/span><span class="span-list">
[
%= it[item
][
"title"
]
%]</
span
>
<
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
>
<
ul
class
=
"dropdown-menu"
role
=
"menu"
>
[
%
for
(
var
item_menu
in
it
[
item
][
"_child"
]){
%
]
<
li
><
a
href
=
"/[%= it[item]['_child'][item_menu]['name'] %]"
><
span
class
=
"glyphicon glyphicon-dashboard"
aria
-
hidden
=
"true"
><
/span> <span class="span-list">
[
%= it[item
][
"_child"
][
item_menu
][
'title'
]
%]</
span
><
/a></
li
>
<
li
><
a
href
=
"
javascript:;"
class
=
"menu-sub-alink"
data
-
href
=
"
/[%= it[item]['_child'][item_menu]['name'] %]"
><
span
class
=
"glyphicon glyphicon-dashboard"
aria
-
hidden
=
"true"
><
/span> <span class="span-list">
[
%= it[item
][
"_child"
][
item_menu
][
'title'
]
%]</
span
><
/a></
li
>
[
%
}
%
]
<
/ul
>
[
%
}
%
]
...
...
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