Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
solo
Commits
e4f2ce66
Commit
e4f2ce66
authored
Dec 24, 2012
by
Vanessa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移除 Firefox -moz-linear-gradient
parent
3ddf8bbe
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
254 additions
and
254 deletions
+254
-254
war/src/main/webapp/css/default-admin.css
war/src/main/webapp/css/default-admin.css
+5
-5
war/src/main/webapp/css/default-admin.min.css
war/src/main/webapp/css/default-admin.min.css
+1
-1
war/src/main/webapp/js/admin/latkeAdmin.js
war/src/main/webapp/js/admin/latkeAdmin.js
+247
-247
war/src/main/webapp/top-bar.ftl
war/src/main/webapp/top-bar.ftl
+1
-1
No files found.
war/src/main/webapp/css/default-admin.css
View file @
e4f2ce66
...
...
@@ -18,7 +18,7 @@
* admin style
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @version 1.0.4.
0, Aug 27
, 2012
* @version 1.0.4.
1, Dec 24
, 2012
*/
/* start resset */
...
...
@@ -112,8 +112,8 @@ button.selected {
/* start top-nav */
#top
{
background-color
:
#666
;
background-image
:
linear-gradient
(
top
,
#666666
,
#7F7F7F
);
background-image
:
-moz-linear-gradient
(
top
,
#666666
,
#7F7F7F
);
background-image
:
-ms-linear-gradient
(
top
,
#666666
,
#7F7F7F
);
background-image
:
-o-linear-gradient
(
top
,
#666666
,
#7F7F7F
);
background-image
:
-webkit-gradient
(
linear
,
left
top
,
left
bottom
,
from
(
#666666
),
to
(
#7F7F7F
));
...
...
@@ -281,9 +281,8 @@ button.selected {
min-height
:
160px
;
}
.module-header
{
background-color
:
#f
1f1f1
;
background-color
:
#f
9f9f9
;
background-image
:
linear-gradient
(
top
,
#f9f9f9
,
#ececec
);
background-image
:
-moz-linear-gradient
(
top
,
#f9f9f9
,
#ececec
);
background-image
:
-ms-linear-gradient
(
top
,
#f9f9f9
,
#ececec
);
background-image
:
-o-linear-gradient
(
top
,
#f9f9f9
,
#ececec
);
background-image
:
-webkit-gradient
(
linear
,
left
top
,
left
bottom
,
from
(
#f9f9f9
),
to
(
#ececec
));
...
...
@@ -320,7 +319,8 @@ button.selected {
/* start article */
.markdown-preivew
{
background-image
:
-moz-linear-gradient
(
top
,
#FFFFFF
,
#F3F3F3
);
background-color
:
#fff
;
background-image
:
linear-gradient
(
top
,
#FFFFFF
,
#F3F3F3
);
background-image
:
-ms-linear-gradient
(
top
,
#FFFFFF
,
#F3F3F3
);
background-image
:
-o-linear-gradient
(
top
,
#FFFFFF
,
#F3F3F3
);
background-image
:
-webkit-gradient
(
linear
,
left
top
,
left
bottom
,
from
(
#FFFFFF
),
to
(
#F3F3F3
));
...
...
war/src/main/webapp/css/default-admin.min.css
View file @
e4f2ce66
body
,
input
,
textarea
{
font-family
:
'sans-serif'
,
'\5fae\8f6f\96c5\9ed1'
}
html
,
body
{
height
:
100%
;
min-width
:
1024px
;
background-color
:
#fafafa
}
a
:link
{
color
:
#21759b
}
a
:visited
{
color
:
#551a8b
}
a
:active
{
color
:
#d54121
}
a
:hover
{
color
:
#d54121
}
button
.selected
{
background
:
url("../images/bowknot/completed.png")
no-repeat
scroll
right
bottom
transparent
;
color
:
#d54121
}
.ico-arrow-down
,
.ico-arrow-up
{
background
:
url("../images/arrows.png")
repeat
scroll
0
4px
transparent
;
float
:
right
;
height
:
20px
;
margin
:
2px
3px
0
0
;
width
:
18px
}
.ico-arrow-up
{
background-position
:
0
-30px
}
.aboutIcon
{
background-position
:
-16px
-48px
}
#allPanel
{
height
:
auto
;
min-height
:
100%
;
position
:
relative
}
#tabsPanel
{
margin
:
30px
0
0
162px
;
padding
:
0
12px
}
#tabsPanel
>
div
{
padding-bottom
:
36px
}
.tip
{
font-weight
:
bold
;
margin
:
0
auto
;
overflow
:
hidden
;
padding
:
2px
0
;
position
:
fixed
;
text-align
:
center
;
top
:
5px
;
width
:
100%
;
z-index
:
2
}
.tip-msg
{
top
:
33px
}
#tipMsg
,
#loadMsg
{
background-color
:
#e5e7eb
;
border-radius
:
3px
;
padding
:
2px
0
}
.footer
{
bottom
:
12px
;
position
:
absolute
;
text-align
:
center
;
width
:
100%
}
#top
{
background-image
:
linear-gradient
(
top
,
#666
,
#7f7f7f
);
background-image
:
-moz-linear-gradient
(
top
,
#666
,
#7f7f7f
);
background-image
:
-ms-linear-gradient
(
top
,
#666
,
#7f7f7f
);
background-image
:
-o-linear-gradient
(
top
,
#666
,
#7f7f7f
);
background-image
:
-webkit-gradient
(
linear
,
left
top
,
left
bottom
,
from
(
#666
),
to
(
#7f7f7f
));
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorstr
=
'#666666'
,
endColorstr
=
'#7F7F7F'
)}
#top
a
,
#top
span
span
{
float
:
left
;
line-height
:
18px
;
margin
:
6px
0
;
padding
:
0
6px
;
text-decoration
:
none
;
text-shadow
:
0
-1px
0
#fff
;
font-weight
:
normal
;
border-right
:
1px
solid
#686868
;
color
:
#ccc
;
text-shadow
:
0
-1px
0
#555
}
#top
>
a
{
color
:
#fff
}
#top
a
:hover
,
#top
a
.hover
{
border-radius
:
0
13px
13px
0
;
margin
:
0
;
line-height
:
30px
;
background-color
:
#4c4c4c
;
border-left-color
:
#707070
}
#tabs
{
background-color
:
#ececec
;
border-radius
:
0
5px
5px
0
;
border-right
:
1px
solid
#CCC
;
border-top
:
1px
solid
#DDD
;
bottom
:
0
;
box-shadow
:
6px
0
6px
#ececec
;
min-height
:
468px
;
padding
:
15px
0
;
position
:
absolute
;
top
:
58px
;
width
:
145px
}
#tabs
ul
{
list-style
:
none
}
#tabs
li
{
margin-left
:
0
}
#tabs
a
,
#tabs
>
ul
>
li
>
div
{
color
:
#21759b
;
display
:
block
;
text-decoration
:
none
;
cursor
:
pointer
;
letter-spacing
:
1px
}
#tabs
a
:hover
,
#tabs
>
ul
>
li
>
div
:hover
{
color
:
#d54121
}
#tabs
>
ul
>
li
>
div
{
border-bottom
:
1px
solid
#dfdfdf
;
border-top
:
1px
solid
#f9f9f9
;
font-weight
:
bold
;
padding-left
:
12px
;
line-height
:
30px
;
height
:
30px
}
#tabs
>
ul
>
li
>
div
>
a
.tab-current
{
background-color
:
#777
;
border-bottom
:
1px
solid
#6d6d6d
;
border-top
:
1px
solid
#808080
;
color
:
#fff
;
margin-left
:
-12px
;
padding-left
:
12px
;
text-shadow
:
0
-1px
0
#333
}
#tabs
li
li
a
{
background-color
:
#fff
;
padding-left
:
36px
;
line-height
:
28px
;
height
:
28px
}
#tabs
.tab-current
{
background-color
:
#eaf2fa
;
color
:
#333
;
font-weight
:
bold
}
#tabs
li
li
a
:hover
{
background-color
:
#eaf2fa
;
color
:
#333
}
#tabs
.commentIcon
,
#tabs
.postIcon
,
#tabs
.preferenceIcon
,
#tabs
.usersIcon
,
#tabs
.aboutIcon
{
margin
:
6px
9px
0
0
}
.sub-tabs
{
height
:
30px
}
.sub-tabs
ul
{
float
:
right
;
list-style
:
none
outside
none
;
margin-right
:
24px
}
.sub-tabs
li
{
float
:
left
}
.sub-tabs
li
a
{
background-color
:
#ececec
;
border
:
1px
solid
#dfdfdf
;
border-bottom
:
0
;
border-radius
:
5px
5px
0
0
;
color
:
#333
;
display
:
block
;
line-height
:
29px
;
padding
:
0
12px
;
text-decoration
:
none
}
.sub-tabs
.tab-current
,
.sub-tabs
.tab-current
:hover
{
background-color
:
#fff
;
font-weight
:
bold
;
line-height
:
30px
}
.sub-tabs
a
:hover
{
background-color
:
#f5f5f5
}
.sub-tabs-main
{
background-color
:
#fff
;
border
:
1px
solid
#dfdfdf
;
padding
:
12px
;
border-radius
:
6px
}
.form
>
div
{
margin
:
12px
0
}
.form
>
div
label
{
font-weight
:
bold
;
line-height
:
28px
;
margin-right
:
12px
}
.module-panel
{
border
:
1px
solid
#dfdfdf
;
border-radius
:
3px
3px
3px
3px
;
box-shadow
:
0
1px
0
#fff
inset
;
background-color
:
#f5f5f5
;
margin-bottom
:
36px
;
min-height
:
160px
}
.module-header
{
background-color
:
#f1f1f1
;
background-image
:
linear-gradient
(
top
,
#f9f9f9
,
#ececec
);
background-image
:
-moz-linear-gradient
(
top
,
#f9f9f9
,
#ececec
);
background-image
:
-ms-linear-gradient
(
top
,
#f9f9f9
,
#ececec
);
background-image
:
-o-linear-gradient
(
top
,
#f9f9f9
,
#ececec
);
background-image
:
-webkit-gradient
(
linear
,
left
top
,
left
bottom
,
from
(
#f9f9f9
),
to
(
#ececec
));
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorstr
=
'#f9f9f9'
,
endColorstr
=
'#ececec'
);
border-bottom-color
:
#dfdfdf
;
box-shadow
:
0
1px
0
#fff
;
text-shadow
:
0
1px
0
#fff
;
padding
:
5px
10px
}
.module-header
h2
{
color
:
#464646
;
font-size
:
16px
}
.module-header
a
{
text-decoration
:
none
}
.comment-title
{
background-color
:
#ececec
;
border-bottom
:
1px
solid
#dfdfdf
;
border-top
:
1px
solid
#f9f9f9
;
padding
:
3px
6px
3px
12px
}
#comments
{
height
:
462px
;
overflow
:
auto
}
.markdown-preivew
{
background-image
:
-moz-linear-gradient
(
top
,
#fff
,
#f3f3f3
);
background-image
:
-ms-linear-gradient
(
top
,
#fff
,
#f3f3f3
);
background-image
:
-o-linear-gradient
(
top
,
#fff
,
#f3f3f3
);
background-image
:
-webkit-gradient
(
linear
,
left
top
,
left
bottom
,
from
(
#fff
),
to
(
#f3f3f3
));
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorstr
=
'#FFFFFF'
,
endColorstr
=
'#F3F3F3'
);
border-color
:
#c0c0c0
#D9D9D9
#d9d9d9
;
border-style
:
solid
;
border-width
:
1px
;
float
:
left
;
height
:
500px
;
margin-left
:
20px
;
overflow
:
auto
;
width
:
47%
;
word-wrap
:
break-word
}
.markdown-help.ico-help
,
.markdown-help.ico-close
{
background-image
:
url("../images/icon.png")
;
background-position
:
-16px
-47px
;
cursor
:
pointer
;
float
:
right
;
height
:
17px
;
width
:
17px
}
.markdown-help.ico-close
{
height
:
16px
;
background-position
:
-48px
-16px
}
.markdown-help-main
,
.markdown-preview-main
{
color
:
#21759b
;
padding
:
0
12px
}
.markdown-help-main
dt
{
font-size
:
14px
;
font-weight
:
bold
;
margin
:
12px
0
6px
0
}
.markdown-help-main
dd
{
margin-left
:
12px
}
button
#submitArticle
{
background
:
none
repeat
scroll
0
0
#d54121
;
box-shadow
:
0
0
0
1px
#fff
inset
,
0
1px
1px
rgba
(
0
,
0
,
0
,
0.1
);
text-shadow
:
0
1px
rgba
(
0
,
0
,
0
,
0.1
);
color
:
#FFF
}
#skinsPanel
{
min-width
:
328px
;
width
:
99%
}
.skinPreview
{
cursor
:
pointer
;
height
:
160px
;
margin
:
6px
;
width
:
280px
}
.skinItem
{
background-color
:
#fafafa
;
border-radius
:
3px
;
box-shadow
:
1px
1px
3px
#333
;
line-height
:
16px
;
margin
:
24px
12px
;
padding
:
5px
;
text-align
:
center
}
#skinMain
.skinItem.selected
{
background-color
:
#d54121
}
.skinItem
:hover
{
background-color
:
#EEE
}
.f-blue
,
.error-msg
{
color
:
#36c
}
.signs
button
{
margin
:
0
12px
}
.small-head
{
float
:
left
;
height
:
35px
;
margin
:
3px
9px
0
3px
;
width
:
35px
}
#commentTable
.table-main
td
{
vertical-align
:
top
}
.about-logo
{
float
:
left
;
margin
:
62px
36px
62px
24px
}
.about-margin
{
font-size
:
20px
;
margin
:
20px
0
}
.ico-alipay-me
{
background-image
:
url("../images/alipay-me.png")
;
font-size
:
20px
;
height
:
24px
;
margin
:
20px
0
;
width
:
126px
}
.completed-input
{
margin
:
2px
12px
0
0
}
.completed-panel
{
background-color
:
#ececec
;
border
:
1px
solid
#ccc
;
color
:
#00c
;
display
:
none
;
overflow
:
auto
;
padding
:
2px
;
position
:
absolute
;
z-index
:
10
}
.completed-panel
a
{
display
:
block
;
text-decoration
:
none
}
.completed-panel
a
.selected
{
background-color
:
#fff
;
color
:
#d54121
}
.completed-ck
{
margin-top
:
9px
}
.completed-ck
span
{
background
:
url(../images/icon.png)
repeat
center
bottom
;
border
:
1px
solid
;
border-color
:
#CCc
#bbb
#A0A0A0
;
border-radius
:
4px
;
color
:
#21759b
;
cursor
:
pointer
;
float
:
left
;
height
:
28px
;
line-height
:
26px
;
margin
:
3px
6px
;
padding
:
0
6px
;
vertical-align
:
top
}
.completed-ck
span
:hover
{
border-color
:
#BBB
}
.completed-ck
span
.selected
{
color
:
#d54121
;
background
:
url(../images/bowknot/completed.png)
no-repeat
right
bottom
}
.dialog-background
{
background-color
:
#000
;
display
:
none
;
filter
:
alpha
(
opacity
=
30
);
height
:
100%
;
left
:
0
;
opacity
:
.3
;
position
:
absolute
;
top
:
0
;
width
:
100%
;
z-index
:
90
}
.dialog-panel
{
display
:
none
;
position
:
absolute
;
z-index
:
100
}
.dialog-title
{
color
:
#fff
;
float
:
left
;
font-size
:
12px
;
line-height
:
27px
;
margin-left
:
3px
}
.dialog-header-bg
{
background
:
url("../images/icon.png")
repeat
scroll
center
bottom
#f1f1f1
;
border-color
:
#c0c0c0
#D9D9D9
#d9d9d9
;
border-radius
:
6px
6px
0
0
;
border-style
:
solid
;
border-width
:
1px
1px
0
;
cursor
:
move
;
height
:
34px
}
.dialog-close-icon
{
background
:
url("../images/bowknot/dialog-close.png")
no-repeat
scroll
0
0
transparent
;
cursor
:
pointer
;
float
:
right
;
height
:
18px
;
margin-top
:
6px
;
padding
:
3px
;
width
:
22px
}
.dialog-close-icon
:hover
{
background-image
:
url("../images/bowknot/dialog-close-hover.png")
}
.dialog-main
{
background-color
:
#fff
;
border
:
2px
solid
#666
;
border-color
:
#c0c0c0
#D9D9D9
#d9d9d9
;
border-top-width
:
0
;
padding
:
12px
}
.paginate-paginate
div
,
.paginate-paginate
a
,
.paginate-pageCount
{
float
:
left
;
height
:
20px
;
line-height
:
20px
;
margin
:
0
5px
;
text-decoration
:
none
}
.pagination-pages
{
background
:
url(../images/icon.png)
repeat
center
bottom
;
border
:
1px
solid
;
border-color
:
#CCc
#bbb
#A0A0A0
;
border-radius
:
4px
;
padding
:
0
6px
;
cursor
:
pointer
;
float
:
left
;
height
:
20px
;
line-height
:
20px
;
margin
:
0
5px
}
.pagination-current-page
{
cursor
:
auto
;
font-weight
:
bold
;
border-color
:
#BBB
}
.paginate-inputPage
{
height
:
14px
;
width
:
24px
}
.table-main
{
margin
:
0
;
padding
:
0
;
position
:
relative
}
.table-main
table
{
word-break
:
break-all
;
word-wrap
:
break-word
}
.table-header
{
border
:
1px
solid
#d0d0d0
;
border-bottom
:
0
;
border-radius
:
6px
6px
0
0
}
.table-header
th
{
height
:
34px
;
line-height
:
34px
;
text-align
:
left
;
text-indent
:
6px
;
font-size
:
14px
;
font-weight
:
normal
;
background
:
url("../images/icon.png")
repeat
scroll
center
bottom
#f1f1f1
}
.table-main
td
{
border-bottom
:
1px
solid
#d0d0d0
;
color
:
#333
;
padding
:
3px
0
}
.table-lineHover
.table-hasExpend
td
{
border-bottom
:
0
}
.table-heiglight
td
,
.table-lineHover
td
{
background-color
:
#f3f3f3
;
border-right-color
:
#f3f3f3
}
.table-expendRow
td
{
padding
:
0
0
5px
36px
}
.table-expendRow
td
span
{
margin-left
:
60px
}
.table-expendRow
td
a
{
background-color
:
#999
;
border-radius
:
3px
;
color
:
#FFF
;
font-size
:
12px
;
margin-right
:
5px
;
padding
:
1px
6px
;
text-decoration
:
none
}
.table-expendRow
td
a
:hover
{
background-color
:
#BBB
}
.table-center
{
margin
:
0
auto
}
.table-upIcon
,
.table-downIcon
{
background-image
:
url("../images/icon.png")
;
cursor
:
pointer
;
float
:
left
;
height
:
16px
;
width
:
16px
;
background-position
:
-79px
-32px
}
.table-upIcon
{
background-position
:
-64px
-32px
;
margin-right
:
6px
}
.table-tag
{
color
:
#d54121
;
font-size
:
12px
;
font-style
:
italic
;
margin-left
:
10px
}
.tip-panel
{
background-color
:
#FFF
;
box-shadow
:
0
3px
10px
#8b8b8b
;
display
:
none
;
max-height
:
500px
;
max-width
:
500px
;
overflow
:
hidden
;
padding
:
3px
;
position
:
absolute
;
z-index
:
1
}
\ No newline at end of file
body
,
input
,
textarea
{
font-family
:
'sans-serif'
,
'\5fae\8f6f\96c5\9ed1'
}
html
,
body
{
height
:
100%
;
min-width
:
1024px
;
background-color
:
#fafafa
}
a
:link
{
color
:
#21759b
}
a
:visited
{
color
:
#551a8b
}
a
:active
{
color
:
#d54121
}
a
:hover
{
color
:
#d54121
}
button
.selected
{
background
:
url("../images/bowknot/completed.png")
no-repeat
scroll
right
bottom
transparent
;
color
:
#d54121
}
.ico-arrow-down
,
.ico-arrow-up
{
background
:
url("../images/arrows.png")
repeat
scroll
0
4px
transparent
;
float
:
right
;
height
:
20px
;
margin
:
2px
3px
0
0
;
width
:
18px
}
.ico-arrow-up
{
background-position
:
0
-30px
}
.aboutIcon
{
background-position
:
-16px
-48px
}
#allPanel
{
height
:
auto
;
min-height
:
100%
;
position
:
relative
}
#tabsPanel
{
margin
:
30px
0
0
162px
;
padding
:
0
12px
}
#tabsPanel
>
div
{
padding-bottom
:
36px
}
.tip
{
font-weight
:
bold
;
margin
:
0
auto
;
overflow
:
hidden
;
padding
:
2px
0
;
position
:
fixed
;
text-align
:
center
;
top
:
5px
;
width
:
100%
;
z-index
:
2
}
.tip-msg
{
top
:
33px
}
#tipMsg
,
#loadMsg
{
background-color
:
#e5e7eb
;
border-radius
:
3px
;
padding
:
2px
0
}
.footer
{
bottom
:
12px
;
position
:
absolute
;
text-align
:
center
;
width
:
100%
}
#top
{
background-color
:
#666
;
background-image
:
linear-gradient
(
top
,
#666
,
#7f7f7f
);
background-image
:
-ms-linear-gradient
(
top
,
#666
,
#7f7f7f
);
background-image
:
-o-linear-gradient
(
top
,
#666
,
#7f7f7f
);
background-image
:
-webkit-gradient
(
linear
,
left
top
,
left
bottom
,
from
(
#666
),
to
(
#7f7f7f
));
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorstr
=
'#666666'
,
endColorstr
=
'#7F7F7F'
)}
#top
a
,
#top
span
span
{
float
:
left
;
line-height
:
18px
;
margin
:
6px
0
;
padding
:
0
6px
;
text-decoration
:
none
;
text-shadow
:
0
-1px
0
#fff
;
font-weight
:
normal
;
border-right
:
1px
solid
#686868
;
color
:
#ccc
;
text-shadow
:
0
-1px
0
#555
}
#top
>
a
{
color
:
#fff
}
#top
a
:hover
,
#top
a
.hover
{
border-radius
:
0
13px
13px
0
;
margin
:
0
;
line-height
:
30px
;
background-color
:
#4c4c4c
;
border-left-color
:
#707070
}
#tabs
{
background-color
:
#ececec
;
border-radius
:
0
5px
5px
0
;
border-right
:
1px
solid
#CCC
;
border-top
:
1px
solid
#DDD
;
bottom
:
0
;
box-shadow
:
6px
0
6px
#ececec
;
min-height
:
468px
;
padding
:
15px
0
;
position
:
absolute
;
top
:
58px
;
width
:
145px
}
#tabs
ul
{
list-style
:
none
}
#tabs
li
{
margin-left
:
0
}
#tabs
a
,
#tabs
>
ul
>
li
>
div
{
color
:
#21759b
;
display
:
block
;
text-decoration
:
none
;
cursor
:
pointer
;
letter-spacing
:
1px
}
#tabs
a
:hover
,
#tabs
>
ul
>
li
>
div
:hover
{
color
:
#d54121
}
#tabs
>
ul
>
li
>
div
{
border-bottom
:
1px
solid
#dfdfdf
;
border-top
:
1px
solid
#f9f9f9
;
font-weight
:
bold
;
padding-left
:
12px
;
line-height
:
30px
;
height
:
30px
}
#tabs
>
ul
>
li
>
div
>
a
.tab-current
{
background-color
:
#777
;
border-bottom
:
1px
solid
#6d6d6d
;
border-top
:
1px
solid
#808080
;
color
:
#fff
;
margin-left
:
-12px
;
padding-left
:
12px
;
text-shadow
:
0
-1px
0
#333
}
#tabs
li
li
a
{
background-color
:
#fff
;
padding-left
:
36px
;
line-height
:
28px
;
height
:
28px
}
#tabs
.tab-current
{
background-color
:
#eaf2fa
;
color
:
#333
;
font-weight
:
bold
}
#tabs
li
li
a
:hover
{
background-color
:
#eaf2fa
;
color
:
#333
}
#tabs
.commentIcon
,
#tabs
.postIcon
,
#tabs
.preferenceIcon
,
#tabs
.usersIcon
,
#tabs
.aboutIcon
{
margin
:
6px
9px
0
0
}
.sub-tabs
{
height
:
30px
}
.sub-tabs
ul
{
float
:
right
;
list-style
:
none
outside
none
;
margin-right
:
24px
}
.sub-tabs
li
{
float
:
left
}
.sub-tabs
li
a
{
background-color
:
#ececec
;
border
:
1px
solid
#dfdfdf
;
border-bottom
:
0
;
border-radius
:
5px
5px
0
0
;
color
:
#333
;
display
:
block
;
line-height
:
29px
;
padding
:
0
12px
;
text-decoration
:
none
}
.sub-tabs
.tab-current
,
.sub-tabs
.tab-current
:hover
{
background-color
:
#fff
;
font-weight
:
bold
;
line-height
:
30px
}
.sub-tabs
a
:hover
{
background-color
:
#f5f5f5
}
.sub-tabs-main
{
background-color
:
#fff
;
border
:
1px
solid
#dfdfdf
;
padding
:
12px
;
border-radius
:
6px
}
.form
>
div
{
margin
:
12px
0
}
.form
>
div
label
{
font-weight
:
bold
;
line-height
:
28px
;
margin-right
:
12px
}
.module-panel
{
border
:
1px
solid
#dfdfdf
;
border-radius
:
3px
3px
3px
3px
;
box-shadow
:
0
1px
0
#fff
inset
;
background-color
:
#f5f5f5
;
margin-bottom
:
36px
;
min-height
:
160px
}
.module-header
{
background-color
:
#f9f9f9
;
background-image
:
linear-gradient
(
top
,
#f9f9f9
,
#ececec
);
background-image
:
-ms-linear-gradient
(
top
,
#f9f9f9
,
#ececec
);
background-image
:
-o-linear-gradient
(
top
,
#f9f9f9
,
#ececec
);
background-image
:
-webkit-gradient
(
linear
,
left
top
,
left
bottom
,
from
(
#f9f9f9
),
to
(
#ececec
));
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorstr
=
'#f9f9f9'
,
endColorstr
=
'#ececec'
);
border-bottom-color
:
#dfdfdf
;
box-shadow
:
0
1px
0
#fff
;
text-shadow
:
0
1px
0
#fff
;
padding
:
5px
10px
}
.module-header
h2
{
color
:
#464646
;
font-size
:
16px
}
.module-header
a
{
text-decoration
:
none
}
.comment-title
{
background-color
:
#ececec
;
border-bottom
:
1px
solid
#dfdfdf
;
border-top
:
1px
solid
#f9f9f9
;
padding
:
3px
6px
3px
12px
}
#comments
{
height
:
462px
;
overflow
:
auto
}
.markdown-preivew
{
background-color
:
#fff
;
background-image
:
linear-gradient
(
top
,
#fff
,
#f3f3f3
);
background-image
:
-ms-linear-gradient
(
top
,
#fff
,
#f3f3f3
);
background-image
:
-o-linear-gradient
(
top
,
#fff
,
#f3f3f3
);
background-image
:
-webkit-gradient
(
linear
,
left
top
,
left
bottom
,
from
(
#fff
),
to
(
#f3f3f3
));
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorstr
=
'#FFFFFF'
,
endColorstr
=
'#F3F3F3'
);
border-color
:
#c0c0c0
#D9D9D9
#d9d9d9
;
border-style
:
solid
;
border-width
:
1px
;
float
:
left
;
height
:
500px
;
margin-left
:
20px
;
overflow
:
auto
;
width
:
47%
;
word-wrap
:
break-word
}
.markdown-help.ico-help
,
.markdown-help.ico-close
{
background-image
:
url("../images/icon.png")
;
background-position
:
-16px
-47px
;
cursor
:
pointer
;
float
:
right
;
height
:
17px
;
width
:
17px
}
.markdown-help.ico-close
{
height
:
16px
;
background-position
:
-48px
-16px
}
.markdown-help-main
,
.markdown-preview-main
{
color
:
#21759b
;
padding
:
0
12px
}
.markdown-help-main
dt
{
font-size
:
14px
;
font-weight
:
bold
;
margin
:
12px
0
6px
0
}
.markdown-help-main
dd
{
margin-left
:
12px
}
button
#submitArticle
{
background
:
none
repeat
scroll
0
0
#d54121
;
box-shadow
:
0
0
0
1px
#fff
inset
,
0
1px
1px
rgba
(
0
,
0
,
0
,
0.1
);
text-shadow
:
0
1px
rgba
(
0
,
0
,
0
,
0.1
);
color
:
#FFF
}
#skinsPanel
{
min-width
:
328px
;
width
:
99%
}
.skinPreview
{
cursor
:
pointer
;
height
:
160px
;
margin
:
6px
;
width
:
280px
}
.skinItem
{
background-color
:
#fafafa
;
border-radius
:
3px
;
box-shadow
:
1px
1px
3px
#333
;
line-height
:
16px
;
margin
:
24px
12px
;
padding
:
5px
;
text-align
:
center
}
#skinMain
.skinItem.selected
{
background-color
:
#d54121
}
.skinItem
:hover
{
background-color
:
#EEE
}
.f-blue
,
.error-msg
{
color
:
#36c
}
.signs
button
{
margin
:
0
12px
}
.small-head
{
float
:
left
;
height
:
35px
;
margin
:
3px
9px
0
3px
;
width
:
35px
}
#commentTable
.table-main
td
{
vertical-align
:
top
}
.about-logo
{
float
:
left
;
margin
:
62px
36px
62px
24px
}
.about-margin
{
font-size
:
20px
;
margin
:
20px
0
}
.ico-alipay-me
{
background-image
:
url("../images/alipay-me.png")
;
font-size
:
20px
;
height
:
24px
;
margin
:
20px
0
;
width
:
126px
}
.completed-input
{
margin
:
2px
12px
0
0
}
.completed-panel
{
background-color
:
#ececec
;
border
:
1px
solid
#ccc
;
color
:
#00c
;
display
:
none
;
overflow
:
auto
;
padding
:
2px
;
position
:
absolute
;
z-index
:
10
}
.completed-panel
a
{
display
:
block
;
text-decoration
:
none
}
.completed-panel
a
.selected
{
background-color
:
#fff
;
color
:
#d54121
}
.completed-ck
{
margin-top
:
9px
}
.completed-ck
span
{
background
:
url(../images/icon.png)
repeat
center
bottom
;
border
:
1px
solid
;
border-color
:
#CCc
#bbb
#A0A0A0
;
border-radius
:
4px
;
color
:
#21759b
;
cursor
:
pointer
;
float
:
left
;
height
:
28px
;
line-height
:
26px
;
margin
:
3px
6px
;
padding
:
0
6px
;
vertical-align
:
top
}
.completed-ck
span
:hover
{
border-color
:
#BBB
}
.completed-ck
span
.selected
{
color
:
#d54121
;
background
:
url(../images/bowknot/completed.png)
no-repeat
right
bottom
}
.dialog-background
{
background-color
:
#000
;
display
:
none
;
filter
:
alpha
(
opacity
=
30
);
height
:
100%
;
left
:
0
;
opacity
:
.3
;
position
:
absolute
;
top
:
0
;
width
:
100%
;
z-index
:
90
}
.dialog-panel
{
display
:
none
;
position
:
absolute
;
z-index
:
100
}
.dialog-title
{
color
:
#fff
;
float
:
left
;
font-size
:
12px
;
line-height
:
27px
;
margin-left
:
3px
}
.dialog-header-bg
{
background
:
url("../images/icon.png")
repeat
scroll
center
bottom
#f1f1f1
;
border-color
:
#c0c0c0
#D9D9D9
#d9d9d9
;
border-radius
:
6px
6px
0
0
;
border-style
:
solid
;
border-width
:
1px
1px
0
;
cursor
:
move
;
height
:
34px
}
.dialog-close-icon
{
background
:
url("../images/bowknot/dialog-close.png")
no-repeat
scroll
0
0
transparent
;
cursor
:
pointer
;
float
:
right
;
height
:
18px
;
margin-top
:
6px
;
padding
:
3px
;
width
:
22px
}
.dialog-close-icon
:hover
{
background-image
:
url("../images/bowknot/dialog-close-hover.png")
}
.dialog-main
{
background-color
:
#fff
;
border
:
2px
solid
#666
;
border-color
:
#c0c0c0
#D9D9D9
#d9d9d9
;
border-top-width
:
0
;
padding
:
12px
}
.paginate-paginate
div
,
.paginate-paginate
a
,
.paginate-pageCount
{
float
:
left
;
height
:
20px
;
line-height
:
20px
;
margin
:
0
5px
;
text-decoration
:
none
}
.pagination-pages
{
background
:
url(../images/icon.png)
repeat
center
bottom
;
border
:
1px
solid
;
border-color
:
#CCc
#bbb
#A0A0A0
;
border-radius
:
4px
;
padding
:
0
6px
;
cursor
:
pointer
;
float
:
left
;
height
:
20px
;
line-height
:
20px
;
margin
:
0
5px
}
.pagination-current-page
{
cursor
:
auto
;
font-weight
:
bold
;
border-color
:
#BBB
}
.paginate-inputPage
{
height
:
14px
;
width
:
24px
}
.table-main
{
margin
:
0
;
padding
:
0
;
position
:
relative
}
.table-main
table
{
word-break
:
break-all
;
word-wrap
:
break-word
}
.table-header
{
border
:
1px
solid
#d0d0d0
;
border-bottom
:
0
;
border-radius
:
6px
6px
0
0
}
.table-header
th
{
height
:
34px
;
line-height
:
34px
;
text-align
:
left
;
text-indent
:
6px
;
font-size
:
14px
;
font-weight
:
normal
;
background
:
url("../images/icon.png")
repeat
scroll
center
bottom
#f1f1f1
}
.table-main
td
{
border-bottom
:
1px
solid
#d0d0d0
;
color
:
#333
;
padding
:
3px
0
}
.table-lineHover
.table-hasExpend
td
{
border-bottom
:
0
}
.table-heiglight
td
,
.table-lineHover
td
{
background-color
:
#f3f3f3
;
border-right-color
:
#f3f3f3
}
.table-expendRow
td
{
padding
:
0
0
5px
36px
}
.table-expendRow
td
span
{
margin-left
:
60px
}
.table-expendRow
td
a
{
background-color
:
#999
;
border-radius
:
3px
;
color
:
#FFF
;
font-size
:
12px
;
margin-right
:
5px
;
padding
:
1px
6px
;
text-decoration
:
none
}
.table-expendRow
td
a
:hover
{
background-color
:
#BBB
}
.table-center
{
margin
:
0
auto
}
.table-upIcon
,
.table-downIcon
{
background-image
:
url("../images/icon.png")
;
cursor
:
pointer
;
float
:
left
;
height
:
16px
;
width
:
16px
;
background-position
:
-79px
-32px
}
.table-upIcon
{
background-position
:
-64px
-32px
;
margin-right
:
6px
}
.table-tag
{
color
:
#d54121
;
font-size
:
12px
;
font-style
:
italic
;
margin-left
:
10px
}
.tip-panel
{
background-color
:
#FFF
;
box-shadow
:
0
3px
10px
#8b8b8b
;
display
:
none
;
max-height
:
500px
;
max-width
:
500px
;
overflow
:
hidden
;
padding
:
3px
;
position
:
absolute
;
z-index
:
1
}
\ No newline at end of file
war/src/main/webapp/js/admin/latkeAdmin.js
View file @
e4f2ce66
/*
* Copyright (c) 2009, 2010, 2011, 2012, B3log Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* index for admin
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @version 1.0.2.0, Aug 30, 2012
*/
var
Admin
=
function
()
{
this
.
register
=
{};
// 工具栏下的工具
this
.
tools
=
[
'
#page-list
'
,
'
#file-list
'
,
'
#link-list
'
,
'
#preference
'
,
'
#user-list
'
,
'
#plugin-list
'
,
'
#others
'
];
// 多用户时,一般用户不能使用的功能
this
.
adTools
=
[
'
link-list
'
,
'
preference
'
,
'
file-list
'
,
'
page-list
'
,
'
user-list
'
,
'
plugin-list
'
,
'
others
'
];
};
$
.
extend
(
Admin
.
prototype
,
{
/*
* 登出
*/
logout
:
function
()
{
window
.
location
.
href
=
latkeConfig
.
servePath
+
"
/logout?goto=
"
+
latkeConfig
.
servePath
;
},
/*
* 根据当前页数设置 hash
* @currentPage {string} 当前页
*/
setHashByPage
:
function
(
currentPage
)
{
var
hash
=
window
.
location
.
hash
,
hashList
=
hash
.
split
(
"
/
"
);
if
(
/^
\d
*$/
.
test
(
hashList
[
hashList
.
length
-
1
]))
{
hashList
[
hashList
.
length
-
1
]
=
currentPage
;
}
else
{
hashList
.
push
(
currentPage
);
}
window
.
location
.
hash
=
hashList
.
join
(
"
/
"
);
},
/*
* 设置某个 tab 被选择
* @id tab id
*/
selectTab
:
function
(
id
)
{
window
.
location
.
hash
=
"
#
"
+
id
;
},
/*
* 根据当前 hash 解析出当前页数及 hash 数组。
*/
analyseHash
:
function
()
{
var
hash
=
window
.
location
.
hash
;
var
tag
=
hash
.
substr
(
1
,
hash
.
length
-
1
);
var
tagList
=
tag
.
split
(
"
/
"
);
var
tags
=
{};
tags
.
page
=
1
,
tags
.
hashList
=
[];
for
(
var
i
=
0
;
i
<
tagList
.
length
;
i
++
)
{
if
(
i
===
tagList
.
length
-
1
&&
(
/^
\d
+$/
.
test
(
tagList
[
i
])))
{
tags
.
page
=
tagList
[
i
];
}
else
{
tags
.
hashList
.
push
(
tagList
[
i
]);
}
}
return
tags
;
},
/*
* 根据当前 hash 设置当前 tab
*/
setCurByHash
:
function
()
{
var
tags
=
admin
.
analyseHash
();
var
tab
=
tags
.
hashList
[
1
],
subTab
=
tags
.
hashList
[
2
];
if
(
tags
.
hashList
.
length
===
1
)
{
tab
=
tags
.
hashList
[
0
];
}
if
(
tab
===
""
)
{
return
;
}
// 离开编辑器时进行提示
try
{
// 除更新、发布、取消发布文章,编辑器中无内容外,离开编辑器需进行提示。
if
(
tab
!==
"
article
"
&&
admin
.
article
.
isConfirm
&&
admin
.
editorArticle
.
getContent
().
replace
(
/
\s
/g
,
''
)
!==
""
)
{
if
(
!
confirm
(
Label
.
editorLeaveLabel
))
{
window
.
location
.
hash
=
"
#article/article
"
;
return
;
}
}
// 不离开编辑器,hash 需变为 "#article/article",此时不需要做任何处理。
if
(
tab
===
"
article
"
&&
admin
.
article
.
isConfirm
&&
admin
.
editorArticle
.
getContent
().
replace
(
/
\s
/g
,
''
)
!==
""
)
{
return
;
}
}
catch
(
e
)
{
var
$articleContent
=
$
(
'
#articleContent
'
);
if
(
$articleContent
.
length
>
0
)
{
if
(
tab
!==
"
article
"
&&
admin
.
article
.
isConfirm
&&
$articleContent
.
val
().
replace
(
/
\s
/g
,
''
)
!==
""
)
{
if
(
!
confirm
(
Label
.
editorLeaveLabel
))
{
window
.
location
.
hash
=
"
#article/article
"
;
return
;
}
}
// 不离开编辑器,hash 需变为 "#article/article",此时不需要做任何处理。
if
(
tab
===
"
article
"
&&
admin
.
article
.
isConfirm
&&
$articleContent
.
val
().
replace
(
/
\s
/g
,
''
)
!==
""
)
{
return
;
}
}
}
// clear article
if
(
tab
!==
"
article
"
&&
admin
.
editorArticle
.
setContent
)
{
admin
.
article
.
clear
();
}
admin
.
article
.
isConfirm
=
true
;
$
(
"
#tabs
"
).
tabs
(
"
setCurrent
"
,
tab
);
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
if
(
$
(
"
#tabsPanel_
"
+
tab
).
length
===
1
)
{
if
(
$
(
"
#tabsPanel_
"
+
tab
).
html
().
replace
(
/
\s
/g
,
""
)
===
""
)
{
// 还未加载 HTML
$
(
"
#tabsPanel_
"
+
tab
).
load
(
"
admin-
"
+
tab
+
"
.do
"
,
function
()
{
// 页面加载完后,回调初始函数
if
(
tab
===
"
article
"
&&
admin
.
article
.
status
.
id
)
{
// 当文章页面编辑器未初始化时,调用更新文章需先初始化编辑器
admin
.
register
[
tab
].
init
.
call
(
admin
.
register
[
tab
].
obj
,
admin
.
article
.
getAndSet
);
}
else
{
admin
.
register
[
tab
].
init
.
call
(
admin
.
register
[
tab
].
obj
,
tags
.
page
);
}
// 页面包含子 tab,需根据 hash 定位到相应的 tab
if
(
subTab
)
{
$
(
"
#tab
"
+
tab
.
substring
(
0
,
1
).
toUpperCase
()
+
tab
.
substring
(
1
)).
tabs
(
"
setCurrent
"
,
subTab
);
}
// 根据 hash 调用现有的插件函数
admin
.
plugin
.
setCurByHash
(
tags
);
});
}
else
{
if
(
tab
===
"
article
"
&&
admin
.
article
.
status
.
id
)
{
admin
.
article
.
getAndSet
();
}
// 已加载过 HTML,只需调用刷新函数
if
(
admin
.
register
[
tab
]
&&
admin
.
register
[
tab
].
refresh
)
{
admin
.
register
[
tab
].
refresh
.
call
(
admin
.
register
[
tab
].
obj
,
tags
.
page
);
}
// 页面包含子 tab,需根据 hash 定位到相应的 tab
if
(
subTab
)
{
$
(
"
#tab
"
+
tab
.
substring
(
0
,
1
).
toUpperCase
()
+
tab
.
substring
(
1
)).
tabs
(
"
setCurrent
"
,
subTab
);
}
// 根据 hash 调用现有的插件函数
admin
.
plugin
.
setCurByHash
(
tags
);
}
}
else
{
$
(
"
#tipMsg
"
).
text
(
"
Error: No tab!
"
+
Label
.
reportIssueLabel
);
$
(
"
#loadMsg
"
).
text
(
""
);
}
},
/*
* 初始化整个后台
*/
init
:
function
()
{
//window.onerror = Util.error;
Util
.
killIE
();
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
// 构建 tabs
$
(
"
#tabs
"
).
tabs
();
// tipMsg
setInterval
(
function
()
{
if
(
$
(
"
#tipMsg
"
).
text
()
!==
""
)
{
setTimeout
(
function
()
{
$
(
"
#tipMsg
"
).
text
(
""
);
},
7000
);
}
},
6000
);
$
(
"
#loadMsg
"
).
text
(
""
);
},
/*
* @description tools and article collapse
* @param {bom} it 触发事件对象
*/
collapseNav
:
function
(
it
)
{
var
subNav
=
$
(
it
).
next
();
subNav
.
slideToggle
(
"
normal
"
,
function
()
{
if
(
this
.
style
.
display
!==
"
none
"
)
{
$
(
it
).
find
(
"
.ico-arrow-down
"
)[
0
].
className
=
"
ico-arrow-up
"
;
}
else
{
$
(
it
).
find
(
"
.ico-arrow-up
"
)[
0
].
className
=
"
ico-arrow-down
"
;
}
});
},
/*
* 后台及当前页面所需插件初始化完后,对权限进行控制及当前页面属于 tools 时,tools 选项需展开。
*/
inited
:
function
()
{
// Removes functions with the current user role
if
(
Label
.
userRole
!==
"
adminRole
"
)
{
for
(
var
i
=
0
;
i
<
this
.
adTools
.
length
;
i
++
)
{
$
(
"
#tabs
"
).
tabs
(
"
remove
"
,
this
.
adTools
[
i
]);
}
}
else
{
// 当前 tab 属于 Tools 时,设其展开
for
(
var
j
=
0
;
j
<
this
.
tools
.
length
;
j
++
)
{
if
(
"
#
"
+
window
.
location
.
hash
.
split
(
"
/
"
)[
1
]
===
this
.
tools
[
j
])
{
$
(
"
#tabToolsTitle
"
).
click
();
break
;
}
}
}
this
.
setCurByHash
();
}
});
/*
* Copyright (c) 2009, 2010, 2011, 2012, B3log Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* index for admin
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @version 1.0.2.0, Aug 30, 2012
*/
var
Admin
=
function
()
{
this
.
register
=
{};
// 工具栏下的工具
this
.
tools
=
[
'
#page-list
'
,
'
#file-list
'
,
'
#link-list
'
,
'
#preference
'
,
'
#user-list
'
,
'
#plugin-list
'
,
'
#others
'
];
// 多用户时,一般用户不能使用的功能
this
.
adTools
=
[
'
link-list
'
,
'
preference
'
,
'
file-list
'
,
'
page-list
'
,
'
user-list
'
,
'
plugin-list
'
,
'
others
'
];
};
$
.
extend
(
Admin
.
prototype
,
{
/*
* 登出
*/
logout
:
function
()
{
window
.
location
.
href
=
latkeConfig
.
servePath
+
"
/logout?goto=
"
+
latkeConfig
.
servePath
;
},
/*
* 根据当前页数设置 hash
* @currentPage {string} 当前页
*/
setHashByPage
:
function
(
currentPage
)
{
var
hash
=
window
.
location
.
hash
,
hashList
=
hash
.
split
(
"
/
"
);
if
(
/^
\d
*$/
.
test
(
hashList
[
hashList
.
length
-
1
]))
{
hashList
[
hashList
.
length
-
1
]
=
currentPage
;
}
else
{
hashList
.
push
(
currentPage
);
}
window
.
location
.
hash
=
hashList
.
join
(
"
/
"
);
},
/*
* 设置某个 tab 被选择
* @id tab id
*/
selectTab
:
function
(
id
)
{
window
.
location
.
hash
=
"
#
"
+
id
;
},
/*
* 根据当前 hash 解析出当前页数及 hash 数组。
*/
analyseHash
:
function
()
{
var
hash
=
window
.
location
.
hash
;
var
tag
=
hash
.
substr
(
1
,
hash
.
length
-
1
);
var
tagList
=
tag
.
split
(
"
/
"
);
var
tags
=
{};
tags
.
page
=
1
,
tags
.
hashList
=
[];
for
(
var
i
=
0
;
i
<
tagList
.
length
;
i
++
)
{
if
(
i
===
tagList
.
length
-
1
&&
(
/^
\d
+$/
.
test
(
tagList
[
i
])))
{
tags
.
page
=
tagList
[
i
];
}
else
{
tags
.
hashList
.
push
(
tagList
[
i
]);
}
}
return
tags
;
},
/*
* 根据当前 hash 设置当前 tab
*/
setCurByHash
:
function
()
{
var
tags
=
admin
.
analyseHash
();
var
tab
=
tags
.
hashList
[
1
],
subTab
=
tags
.
hashList
[
2
];
if
(
tags
.
hashList
.
length
===
1
)
{
tab
=
tags
.
hashList
[
0
];
}
if
(
tab
===
""
)
{
return
;
}
// 离开编辑器时进行提示
try
{
// 除更新、发布、取消发布文章,编辑器中无内容外,离开编辑器需进行提示。
if
(
tab
!==
"
article
"
&&
admin
.
article
.
isConfirm
&&
admin
.
editorArticle
.
getContent
().
replace
(
/
\s
/g
,
''
)
!==
""
)
{
if
(
!
confirm
(
Label
.
editorLeaveLabel
))
{
window
.
location
.
hash
=
"
#article/article
"
;
return
;
}
}
// 不离开编辑器,hash 需变为 "#article/article",此时不需要做任何处理。
if
(
tab
===
"
article
"
&&
admin
.
article
.
isConfirm
&&
admin
.
editorArticle
.
getContent
().
replace
(
/
\s
/g
,
''
)
!==
""
)
{
return
;
}
}
catch
(
e
)
{
var
$articleContent
=
$
(
'
#articleContent
'
);
if
(
$articleContent
.
length
>
0
)
{
if
(
tab
!==
"
article
"
&&
admin
.
article
.
isConfirm
&&
$articleContent
.
val
().
replace
(
/
\s
/g
,
''
)
!==
""
)
{
if
(
!
confirm
(
Label
.
editorLeaveLabel
))
{
window
.
location
.
hash
=
"
#article/article
"
;
return
;
}
}
// 不离开编辑器,hash 需变为 "#article/article",此时不需要做任何处理。
if
(
tab
===
"
article
"
&&
admin
.
article
.
isConfirm
&&
$articleContent
.
val
().
replace
(
/
\s
/g
,
''
)
!==
""
)
{
return
;
}
}
}
// clear article
if
(
tab
!==
"
article
"
&&
admin
.
editorArticle
.
setContent
)
{
admin
.
article
.
clear
();
}
admin
.
article
.
isConfirm
=
true
;
$
(
"
#tabs
"
).
tabs
(
"
setCurrent
"
,
tab
);
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
if
(
$
(
"
#tabsPanel_
"
+
tab
).
length
===
1
)
{
if
(
$
(
"
#tabsPanel_
"
+
tab
).
html
().
replace
(
/
\s
/g
,
""
)
===
""
)
{
// 还未加载 HTML
$
(
"
#tabsPanel_
"
+
tab
).
load
(
"
admin-
"
+
tab
+
"
.do
"
,
function
()
{
// 页面加载完后,回调初始函数
if
(
tab
===
"
article
"
&&
admin
.
article
.
status
.
id
)
{
// 当文章页面编辑器未初始化时,调用更新文章需先初始化编辑器
admin
.
register
[
tab
].
init
.
call
(
admin
.
register
[
tab
].
obj
,
admin
.
article
.
getAndSet
);
}
else
{
admin
.
register
[
tab
].
init
.
call
(
admin
.
register
[
tab
].
obj
,
tags
.
page
);
}
// 页面包含子 tab,需根据 hash 定位到相应的 tab
if
(
subTab
)
{
$
(
"
#tab
"
+
tab
.
substring
(
0
,
1
).
toUpperCase
()
+
tab
.
substring
(
1
)).
tabs
(
"
setCurrent
"
,
subTab
);
}
// 根据 hash 调用现有的插件函数
admin
.
plugin
.
setCurByHash
(
tags
);
});
}
else
{
if
(
tab
===
"
article
"
&&
admin
.
article
.
status
.
id
)
{
admin
.
article
.
getAndSet
();
}
// 已加载过 HTML,只需调用刷新函数
if
(
admin
.
register
[
tab
]
&&
admin
.
register
[
tab
].
refresh
)
{
admin
.
register
[
tab
].
refresh
.
call
(
admin
.
register
[
tab
].
obj
,
tags
.
page
);
}
// 页面包含子 tab,需根据 hash 定位到相应的 tab
if
(
subTab
)
{
$
(
"
#tab
"
+
tab
.
substring
(
0
,
1
).
toUpperCase
()
+
tab
.
substring
(
1
)).
tabs
(
"
setCurrent
"
,
subTab
);
}
// 根据 hash 调用现有的插件函数
admin
.
plugin
.
setCurByHash
(
tags
);
}
}
else
{
$
(
"
#tipMsg
"
).
text
(
"
Error: No tab!
"
+
Label
.
reportIssueLabel
);
$
(
"
#loadMsg
"
).
text
(
""
);
}
},
/*
* 初始化整个后台
*/
init
:
function
()
{
//window.onerror = Util.error;
Util
.
killIE
();
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
// 构建 tabs
$
(
"
#tabs
"
).
tabs
();
// tipMsg
setInterval
(
function
()
{
if
(
$
(
"
#tipMsg
"
).
text
()
!==
""
)
{
setTimeout
(
function
()
{
$
(
"
#tipMsg
"
).
text
(
""
);
},
7000
);
}
},
6000
);
$
(
"
#loadMsg
"
).
text
(
""
);
},
/*
* @description tools and article collapse
* @param {bom} it 触发事件对象
*/
collapseNav
:
function
(
it
)
{
var
subNav
=
$
(
it
).
next
();
subNav
.
slideToggle
(
"
normal
"
,
function
()
{
if
(
this
.
style
.
display
!==
"
none
"
)
{
$
(
it
).
find
(
"
.ico-arrow-down
"
)[
0
].
className
=
"
ico-arrow-up
"
;
}
else
{
$
(
it
).
find
(
"
.ico-arrow-up
"
)[
0
].
className
=
"
ico-arrow-down
"
;
}
});
},
/*
* 后台及当前页面所需插件初始化完后,对权限进行控制及当前页面属于 tools 时,tools 选项需展开。
*/
inited
:
function
()
{
// Removes functions with the current user role
if
(
Label
.
userRole
!==
"
adminRole
"
)
{
for
(
var
i
=
0
;
i
<
this
.
adTools
.
length
;
i
++
)
{
$
(
"
#tabs
"
).
tabs
(
"
remove
"
,
this
.
adTools
[
i
]);
}
}
else
{
// 当前 tab 属于 Tools 时,设其展开
for
(
var
j
=
0
;
j
<
this
.
tools
.
length
;
j
++
)
{
if
(
"
#
"
+
window
.
location
.
hash
.
split
(
"
/
"
)[
1
]
===
this
.
tools
[
j
])
{
$
(
"
#tabToolsTitle
"
).
click
();
break
;
}
}
}
this
.
setCurByHash
();
}
});
var
admin
=
new
Admin
();
/*
* Copyright (c) 2009, 2010, 2011, 2012, B3log Team
*
...
...
war/src/main/webapp/top-bar.ftl
View file @
e4f2ce66
<style type="text/css">
#top {
background-color: #FFF;
background-image: linear-gradient(top,#FFFFFF,#E5E5E5);
background-image: -moz-linear-gradient(top,#FFFFFF,#E5E5E5);
background-image: -ms-linear-gradient(top,#FFFFFF,#E5E5E5);
background-image: -o-linear-gradient(top,#FFFFFF,#E5E5E5);
background-image: -webkit-gradient(linear,left top,left bottom,from(#FFFFFF),to(#E5E5E5));
...
...
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