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
e6ff7899
Commit
e6ff7899
authored
Jun 28, 2012
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决冲突
parent
c79fbf5d
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
3117 additions
and
6195 deletions
+3117
-6195
CHANGE_LOGS.html
CHANGE_LOGS.html
+2
-0
core/src/main/java/org/b3log/solo/service/TagQueryService.java
...src/main/java/org/b3log/solo/service/TagQueryService.java
+0
-1
core/src/main/java/org/b3log/solo/util/Articles.java
core/src/main/java/org/b3log/solo/util/Articles.java
+1
-1
war/src/main/webapp/CHANGE_LOGS.html
war/src/main/webapp/CHANGE_LOGS.html
+349
-693
war/src/main/webapp/css/default-admin.css
war/src/main/webapp/css/default-admin.css
+675
-1339
war/src/main/webapp/css/default-base.css
war/src/main/webapp/css/default-base.css
+518
-1029
war/src/main/webapp/css/default-init.css
war/src/main/webapp/css/default-init.css
+251
-486
war/src/main/webapp/js/admin/admin.js
war/src/main/webapp/js/admin/admin.js
+255
-517
war/src/main/webapp/js/admin/editorKindEditor.js
war/src/main/webapp/js/admin/editorKindEditor.js
+99
-204
war/src/main/webapp/js/admin/editorTinyMCE.js
war/src/main/webapp/js/admin/editorTinyMCE.js
+126
-258
war/src/main/webapp/js/admin/pageList.js
war/src/main/webapp/js/admin/pageList.js
+436
-880
war/src/main/webapp/js/admin/preference.js
war/src/main/webapp/js/admin/preference.js
+270
-501
war/src/main/webapp/js/admin/tablePaginate.js
war/src/main/webapp/js/admin/tablePaginate.js
+114
-235
war/src/main/webapp/js/lib/jquery/jquery.bowknot.min.js
war/src/main/webapp/js/lib/jquery/jquery.bowknot.min.js
+21
-51
No files found.
CHANGE_LOGS.html
View file @
e6ff7899
...
...
@@ -14,6 +14,8 @@
<li><a
href=
"https://github.com/b3log/b3log-solo/issues/23"
>
23 偏好设定关键参数校验
</a></li>
<li><a
href=
"https://github.com/b3log/b3log-solo/issues/27"
>
27 自定义导航后台链接问题
</a></li>
<li><a
href=
"https://github.com/b3log/b3log-solo/issues/32"
>
32 升级 FreeMarker 到 2.3.19
</a></li>
<li><a
href=
"https://github.com/b3log/b3log-solo/issues/34"
>
34 升级 GAE SDK 到 1.7.0
</a></li>
<li><a
href=
"https://github.com/b3log/b3log-solo/issues/36"
>
36 加入博客关键信息获取接口
</a></li>
</ul>
<h2>
Release 0.4.5 - Jun 1, 2012
</h2>
<ul>
...
...
core/src/main/java/org/b3log/solo/service/TagQueryService.java
View file @
e6ff7899
...
...
@@ -102,7 +102,6 @@ public final class TagQueryService {
}
/**
>>>>>>> origin/0.4.6
* Gets all tags.
*
* @return for example,
...
...
core/src/main/java/org/b3log/solo/util/Articles.java
View file @
e6ff7899
...
...
@@ -131,7 +131,7 @@ public final class Articles {
return
true
;
}
/*
/*
*
* Gets time of the recent updated article.
*
* @return time of the recent updated article, returns {@code 0} if not found
...
...
war/src/main/webapp/CHANGE_LOGS.html
View file @
e6ff7899
This diff is collapsed.
Click to expand it.
war/src/main/webapp/css/default-admin.css
View file @
e6ff7899
This diff is collapsed.
Click to expand it.
war/src/main/webapp/css/default-base.css
View file @
e6ff7899
<<<<<<<
HEAD
<<<<<<<
HEAD
/**
* base style
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @version 1.0.2.1, Mar 28, 2012
*/
html
,
body
,
div
,
ul
,
li
,
h1
,
h2
,
h3
,
h4
,
h5
,
h6
,
p
,
dd
,
dl
,
ol
{
margin
:
0
;
padding
:
0
;
}
body
{
background-color
:
#FFF
;
color
:
#000
;
font-family
:
Helvetica
,
Arial
,
sans-serif
,
\
5
fae
\
8
f6f
\
96
c5
\
9
ed1
;
font-size
:
small
;
}
img
{
border
:
medium
none
;
margin
:
0
;
padding
:
0
;
vertical-align
:
middle
;
}
h1
{
font-size
:
160%
;
}
h2
{
font-size
:
140%
;
}
h3
{
font-size
:
120%
;
}
h4
{
font-size
:
110%
;
}
textarea
{
overflow
:
auto
;
}
li
{
margin-left
:
12px
;
}
button
,
.button
{
background
:
url(../images/icon.png)
repeat
center
bottom
;
border
:
1px
solid
;
border-color
:
#CCC
#BBBBBB
#A0A0A0
;
border-radius
:
4px
;
height
:
28px
;
margin
:
0
;
padding
:
0
6px
;
vertical-align
:
top
;
}
button
:hover
,
.button
:hover
{
border-color
:
#BBB
;
}
.padding12
{
padding
:
12px
;
}
.paddingBottom12
{
padding-bottom
:
12px
!important
;
}
.paddingTop12
{
padding-top
:
12px
!important
;
}
.margin12
{
margin
:
12px
;
}
.marginTop12
{
margin-top
:
12px
!important
;
}
.marginBottom12
{
margin-bottom
:
12px
!important
;
}
.marginLeft12
{
margin-left
:
12px
!important
;
;
}
.marginLeft6
{
margin-left
:
6px
!important
;
;
}
.marginRight12
{
margin-right
:
12px
!important
;
;
}
.f-bold
{
font-weight
:
bold
!important
;
}
.nowrap
{
white-space
:
nowrap
;
}
.left
{
float
:
left
;
}
.right
{
float
:
right
;
}
.clear
{
background-color
:
transparent
;
border
:
0
;
clear
:
both
;
display
:
block
;
font-size
:
0
;
height
:
0
;
line-height
:
0
;
overflow
:
hidden
;
}
.none
{
display
:
none
;
}
.pointer
{
cursor
:
pointer
;
}
.no-underline
{
text-decoration
:
none
!important
;
}
.red
{
color
:
red
;
}
.contentBody
{
margin-bottom
:
12px
;
padding
:
3px
12px
;
}
/* start form */
.form
th
{
text-align
:
right
;
white-space
:
nowrap
;
}
.form
input
[
type
=
'text'
],
.form
input
[
type
=
'password'
],
.form
textarea
{
border-color
:
#C0C0C0
#D9D9D9
#D9D9D9
;
border-right
:
1px
solid
#D9D9D9
;
border-style
:
solid
;
border-width
:
1px
;
font-family
:
Helvetica
,
Arial
,
sans-serif
;
font-size
:
12px
;
outline
:
medium
none
;
width
:
99%
;
padding
:
0
3px
;
}
.form
input
{
height
:
24px
;
}
.form
input
[
type
=
'checkbox'
]
{
border
:
0px
;
vertical-align
:
middle
;
}
.form
input
.normalInput
{
width
:
auto
;
}
.form
input
[
type
=
'checkbox'
]
:focus
{
border
:
0px
;
}
.form
input
:focus
,
.form
textarea
:focus
{
box-shadow
:
0
1px
2px
rgba
(
0
,
0
,
0
,
0.3
)
inset
;
}
.form
textarea
{
padding
:
3px
;
overflow
:
auto
;
resize
:
vertical
;
}
/* end form */
.logo
{
padding
:
0
5px
;
text-decoration
:
none
;
text-shadow
:
0
0
1px
#EEEEEE
;
}
/* start icon */
.putTopIcon
,
.notPutTopIcon
,
.deleteIcon
,
.updateIcon
,
.commentIcon
,
.homeIcon
,
.adminIcon
,
.loginIcon
,
.logoutIcon
,
.calendarIcon
,
.browserIcon
,
.postIcon
,
.articlesIcon
,
.draftsIcon
,
.usersIcon
,
.linkIcon
,
.preferenceIcon
,
.pageIcon
,
.trueIcon
,
.falseIcon
,
.fileIcon
,
.othersIcon
,
.goTopIcon
,
.goBottomIcon
,
.cacheIcon
,
.aboutIcon
{
background-image
:
url("../images/icon.png")
;
cursor
:
pointer
;
height
:
16px
;
width
:
16px
;
}
.adminIcon
,
.loginIcon
,
.logoutIcon
,
.homeIcon
{
margin-top
:
3px
;
}
.pageIcon
{
background-position
:
-144px
0px
;
}
.postIcon
{
background-position
:
-16px
0
;
}
.linkIcon
{
background-position
:
-32px
0
;
}
.preferenceIcon
{
background-position
:
-48px
0
;
}
.articlesIcon
{
background-position
:
-64px
0
;
}
.trueIcon
{
background-position
:
-80px
0
;
cursor
:
auto
;
}
.falseIcon
{
background-position
:
-96px
0
;
cursor
:
auto
;
}
.fileIcon
{
background-position
:
-112px
0
;
}
.deleteIcon
{
background-position
:
0
-16px
;
}
.updateIcon
{
background-position
:
-16px
-16px
;
}
.commentIcon
{
background-position
:
-32px
-16px
;
}
.homeIcon
{
background-position
:
-64px
-16px
;
}
.adminIcon
{
background-position
:
-80px
-16px
;
}
.logoutIcon
{
background-position
:
-96px
-16px
;
}
.loginIcon
{
background-position
:
-112px
-16px
;
}
.browserIcon
{
background-position
:
-128px
-16px
;
}
.calendarIcon
{
background-position
:
-144px
-16px
;
}
.putTopIcon
{
background-position
:
-16px
-32px
;
float
:
left
;
}
.notPutTopIcon
{
background-position
:
-32px
-32px
;
float
:
left
;
}
.othersIcon
{
background-position
:
-48px
-32px
;
}
.cacheIcon
{
background-position
:
-96px
-32px
;
}
.draftsIcon
{
background-position
:
-96px
-32px
;
}
.usersIcon
{
background-position
:
-112px
-32px
;
}
.goTopIcon
{
background-position
:
-64px
-32px
;
position
:
fixed
;
right
:
20px
;
top
:
45%
;
}
.goBottomIcon
{
background-position
:
-80px
-32px
;
bottom
:
40%
;
position
:
fixed
;
right
:
20px
;
}
.article-body
{
overflow
:
hidden
;
line-height
:
145%
;
word-wrap
:
break-word
;
}
.article-body
blockquote
{
border
:
1px
dotted
#98A47F
;
font-style
:
italic
;
margin
:
12px
;
padding
:
12px
;
}
.article-body
h1
{
font-size
:
2em
;
margin
:
.67em
0
;
}
.article-body
h2
{
font-size
:
1.5em
;
margin
:
.75em
0
;
}
.article-body
h3
{
font-size
:
1.17em
;
margin
:
.83em
0
;
}
.article-body
h4
,
.article-body
p
,
.article-body
blockquote
,
.article-body
ul
,
.article-body
fieldset
,
.article-body
form
,
.article-body
ol
,
.article-body
dl
,
.article-body
dir
,
.article-body
menu
{
margin
:
1.12em
0
;
}
.article-body
h5
{
font-size
:
.83em
;
margin
:
1.5em
0
;
}
.article-body
h6
{
font-size
:
.75em
;
margin
:
1.67em
0
;
}
.article-body
blockquote
{
margin-left
:
40px
;
margin-right
:
40px
;
}
.article-body
ol
,
.article-body
ul
,
.article-body
dir
,
.article-body
menu
,
.article-body
dd
{
margin-left
:
40px
;
}
/* start icon */
/* start emotions */
.em00
,
.em01
,
.em02
,
.em03
,
.em04
,
.em05
,
.em06
,
.em07
,
.em08
,
.em09
,
.em10
,
.em11
,
.em12
,
.em13
,
.em14
{
background-image
:
url("../images/emotions/classic/emotions-classic.png")
;
float
:
left
;
height
:
24px
;
margin-right
:
5px
;
width
:
24px
;
}
#emotions
span
{
cursor
:
pointer
;
}
.em01
{
background-position
:
-24px
0
;
}
.em02
{
background-position
:
-48px
0
;
}
.em03
{
background-position
:
-72px
0
;
}
.em04
{
background-position
:
-96px
0
;
}
.em05
{
background-position
:
0px
-24px
;
}
.em06
{
background-position
:
-24px
-24px
;
}
.em07
{
background-position
:
-48px
-24px
;
}
.em08
{
background-position
:
-72px
-24px
;
}
.em09
{
background-position
:
-96px
-24px
;
}
.em10
{
background-position
:
0
-48px
;
}
.em11
{
background-position
:
-24px
-48px
;
}
.em12
{
background-position
:
-48px
-48px
;
}
.em13
{
background-position
:
-72px
-48px
;
}
.em14
{
background-position
:
-96px
-48px
;
}
/* end emotions */
/* start tags */
#tags
{
list-style
:
none
;
}
#tags
li
{
float
:
left
;
list-style
:
none
;
height
:
38px
;
}
#tags
a
:hover
{
text-shadow
:
0
0
2px
#555555
;
}
#tags
a
{
border-radius
:
3px
3px
3px
3px
;
box-shadow
:
1px
1px
3px
#555555
;
float
:
left
;
margin
:
3px
6px
;
padding
:
3px
12px
;
text-decoration
:
none
;
}
#tags
.tags1
{
font-size
:
12px
;
font-weight
:
normal
;
}
#tags
.tags2
{
font-size
:
14px
;
font-weight
:
normal
;
}
#tags
.tags3
{
font-size
:
16px
;
font-weight
:
normal
;
}
#tags
.tags4
{
font-size
:
18px
;
font-weight
:
bold
;
}
#tags
.tags5
{
font-size
:
20px
;
font-weight
:
bold
;
}
/* end tags */
/* start comment */
#captcha
,
#captchaReply
{
cursor
:
pointer
;
}
=======
=======
>>>>>>>
origin
/
0
.4.6
/*
* Copyright (c) 2009, 2010, 2011, 2012, B3log Team
*
...
...
@@ -1023,8 +516,4 @@ button:hover,.button:hover {
#captcha
,
#captchaReply
{
cursor
:
pointer
;
}
<<<<<<<
HEAD
>>>>>>>
origin
/
0
.4.6
=======
>>>>>>>
origin
/
0
.4.6
/* end comment */
\ No newline at end of file
war/src/main/webapp/css/default-init.css
View file @
e6ff7899
<<<<<<<
HEAD
<<<<<<<
HEAD
/**
* 403, 500, article-pwd, init, login and kill-browser page style.
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @version 1.0.1.0, May 11, 2012
*/
html
{
height
:
100%
;
overflow
:
hidden
;
}
*,
html
,
body
{
margin
:
0
;
padding
:
0
;
}
body
{
background-color
:
#F3F1E5
;
color
:
#4D505D
;
font-family
:
\
5
fae
\
8
f6f
\
96
c5
\
9
ed1
;
font-size
:
small
;
height
:
100%
;
}
button
{
background
:
url(../images/icon.png)
repeat
center
bottom
;
border
:
1px
solid
;
border-color
:
#CCC
#BBBBBB
#A0A0A0
;
border-radius
:
4px
;
height
:
28px
;
margin
:
0
;
padding
:
0
6px
;
vertical-align
:
top
;
float
:
right
;
margin
:
12px
0
0
24px
;
outline
:
none
;
}
input
{
background
:
none
repeat
scroll
0
0
#FBFBFB
;
border
:
1px
solid
#E5E5E5
;
box-shadow
:
1px
1px
2px
rgba
(
200
,
200
,
200
,
0.2
)
inset
;
color
:
#4D505D
;
font-family
:
Helvetica
,
Arial
,
sans-serif
,
\
5
fae
\
8
f6f
\
96
c5
\
9
ed1
;
font-size
:
20px
;
font-weight
:
200
;
height
:
28px
;
margin-top
:
10px
;
outline
:
medium
none
;
padding
:
3px
;
width
:
280px
;
}
input
:focus
{
box-shadow
:
0px
0px
5px
rgba
(
200
,
200
,
200
,
0.9
);
}
.clear
{
background-color
:
transparent
;
border
:
0px
;
clear
:
both
;
display
:
block
;
font-size
:
0px
;
height
:
0px
;
line-height
:
0px
;
overflow
:
hidden
;
}
.none
{
display
:
none
;
}
.icon
{
position
:
absolute
;
right
:
0px
;
top
:
0px
;
width
:
16px
;
height
:
16px
;
}
.solo
{
color
:
orangered
;
font-weight
:
bold
;
}
.logo
{
float
:
left
;
padding
:
162px
12px
0
;
width
:
153px
;
}
.wrapper
{
height
:
auto
;
min-height
:
100%
;
position
:
relative
;
}
.wrap
{
border-top
:
5px
solid
#E6E5D9
;
min-height
:
400px
;
}
.content
{
background
:
url("../images/zz.jpg")
repeat-x
scroll
center
bottom
white
;
border-color
:
#E6E5D9
;
border-style
:
solid
solid
none
;
border-width
:
1px
;
margin
:
0
auto
;
position
:
relative
;
width
:
700px
;
top
:
60px
;
}
.main
{
border-left
:
1px
solid
#E6E5D9
;
float
:
right
;
font-size
:
15px
;
margin
:
24px
0
;
padding
:
12px
24px
;
width
:
470px
;
height
:
338px
;
}
.main
a
{
text-decoration
:
none
;
}
.main
ul
{
margin-bottom
:
73px
;
}
.main
li
{
margin
:
6px
0
6px
16px
;
}
.main
p
{
margin
:
12px
0
;
}
.mian
tr
{
height
:
54px
;
}
.footerWrapper
{
background-color
:
#FFFFFF
;
border-top
:
1px
solid
#E6E5D9
;
bottom
:
0
;
padding
:
12px
0
;
position
:
absolute
;
text-align
:
center
;
width
:
100%
;
}
.footerWrapper
a
{
text-decoration
:
none
;
}
/* start article-pwd */
.article-pwd
>
div
{
margin-bottom
:
10px
;
max-height
:
264px
;
overflow
:
auto
;
word-wrap
:
break-word
;
}
.article-pwd
#confirm
{
margin-top
:
6px
;
}
/* end article-pwd */
/* start error */
.error
{
height
:
auto
;
margin
:
60px
0pt
;
}
.error
ul
{
width
:
50%
;
margin
:
12px
0
0
12px
;
float
:
left
;
}
.error
.img-forbidden
{
margin
:
38px
10px
0
0
;
width
:
96px
;
height
:
96px
;
float
:
right
;
}
/* end 500 */
/* start login */
.login
table
{
margin
:
66px
auto
;
}
/* end login */
/* start kill */
.kill
{
position
:
absolute
;
right
:
40px
;
top
:
230px
;
}
/* end kill */
/* start init and login */
#init
{
position
:
absolute
;
top
:
102px
;
width
:
470px
;
}
#sys
p
{
height
:
166px
;
}
#initButton
{
margin-right
:
10px
;
}
#tip
{
color
:
#21759B
;
float
:
right
;
font-weight
:
bold
;
margin-top
:
18px
;
}
=======
=======
>>>>>>>
origin
/
0
.4.6
/*
* Copyright (c) 2009, 2010, 2011, 2012, B3log Team
*
...
...
@@ -479,8 +248,4 @@ input:focus {
font-weight
:
bold
;
margin-top
:
18px
;
}
<<<<<<<
HEAD
>>>>>>>
origin
/
0
.4.6
=======
>>>>>>>
origin
/
0
.4.6
/* end init and login */
war/src/main/webapp/js/admin/admin.js
View file @
e6ff7899
<<<<<<<
HEAD
<<<<<<<
HEAD
/*
* 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.1.8, May 4, 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
'
];
};
$
.
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
=
this
.
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
"
;
}
});
/*if (subNav.className === "none") {
$(it).find(".ico-arrow-down")[0].className = "ico-arrow-up";
subNav.className = "collapsed";
} else {
$(it).find(".ico-arrow-up")[0].className = "ico-arrow-down";
subNav.className = "none";
}*/
},
/*
* 后台及当前页面所需插件初始化完后,对权限进行控制及当前页面属于 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
]);
}
$
(
"
#tabs>ul>li
"
).
last
().
remove
();
}
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
();
}
});
=======
=======
>>>>>>>
origin
/
0.4
.
6
/*
* Copyright (c) 2009, 2010, 2011, 2012, B3log Team
*
...
...
@@ -511,8 +252,5 @@ $.extend(Admin.prototype, {
this
.
setCurByHash
();
}
});
<<<<<<<
HEAD
>>>>>>>
origin
/
0.4
.
6
=======
>>>>>>>
origin
/
0.4
.
6
var
admin
=
new
Admin
();
\ No newline at end of file
war/src/main/webapp/js/admin/editorKindEditor.js
View file @
e6ff7899
<<<<<<<
HEAD
<<<<<<<
HEAD
/*
* 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.
*/
/**
* @fileoverview KindEditor
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @version 1.0.0.1, May 2, 2012
*/
admin
.
editors
.
KindEditor
=
{
/*
* @description 初始化编辑器
* @param conf 编辑器初始化参数
* @param conf.kind 编辑器类型
* @param conf.id 编辑器渲染元素 id
* @param conf.fun 编辑器首次加载完成后回调函数
*/
init
:
function
(
conf
)
{
var
language
=
"
zh_CN
"
;
if
(
"
en_US
"
===
Label
.
localeString
)
{
language
=
"
en
"
}
if
(
conf
.
kind
&&
conf
.
kind
===
"
simple
"
)
{
try
{
this
[
conf
.
id
]
=
KindEditor
.
create
(
'
#
'
+
conf
.
id
,
{
langType
:
language
,
resizeType
:
0
,
items
:
[
"
bold
"
,
"
italic
"
,
"
underline
"
,
"
strikethrough
"
,
"
|
"
,
"
undo
"
,
"
redo
"
,
"
|
"
,
"
insertunorderedlist
"
,
"
insertorderedlist
"
,
]
});
}
catch
(
e
)
{
$
(
"
#tipMsg
"
).
text
(
"
KindEditor load fail
"
);
}
}
else
{
try
{
this
[
conf
.
id
]
=
KindEditor
.
create
(
'
#
'
+
conf
.
id
,
{
langType
:
language
,
items
:
[
"
formatblock
"
,
"
fontname
"
,
"
fontsize
"
,
"
|
"
,
"
bold
"
,
"
italic
"
,
"
underline
"
,
"
strikethrough
"
,
"
forecolor
"
,
"
|
"
,
"
link
"
,
"
unlink
"
,
"
image
"
,
"
media
"
,
"
|
"
,
"
pagebreak
"
,
"
emoticons
"
,
"
code
"
,
"
/
"
,
"
undo
"
,
"
redo
"
,
"
|
"
,
"
insertunorderedlist
"
,
"
insertorderedlist
"
,
"
indent
"
,
"
outdent
"
,
"
|
"
,
"
justifyleft
"
,
"
justifycenter
"
,
"
justifyright
"
,
"
justifyfull
"
,
"
|
"
,
"
plainpaste
"
,
"
wordpaste
"
,
"
|
"
,
"
clearhtml
"
,
"
source
"
,
"
preview
"
],
afterCreate
:
function
()
{
if
(
typeof
(
conf
.
fun
)
===
"
function
"
)
{
conf
.
fun
();
}
}
});
}
catch
(
e
)
{
$
(
"
#tipMsg
"
).
text
(
"
KindEditor load fail
"
);
}
}
},
/*
* @description 获取编辑器值
* @param {string} id 编辑器id
* @returns {string} 编辑器值
*/
getContent
:
function
(
id
)
{
var
content
=
""
;
try
{
content
=
this
[
id
].
html
();
}
catch
(
e
)
{
content
=
$
(
"
#
"
+
id
).
val
();
}
return
content
;
},
/*
* @description 设置编辑器值
* @param {string} id 编辑器 id
* @param {string} content 设置编辑器值
*/
setContent
:
function
(
id
,
content
)
{
try
{
this
[
id
].
html
(
content
);
}
catch
(
e
)
{
$
(
"
#
"
+
id
).
val
(
content
);
}
}
=======
=======
>>>>>>>
origin
/
0.4
.
6
/*
* Copyright (c) 2009, 2010, 2011, 2012, B3log Team
*
...
...
@@ -197,8 +96,4 @@ admin.editors.KindEditor = {
$
(
"
#
"
+
id
).
val
(
content
);
}
}
<<<<<<<
HEAD
>>>>>>>
origin
/
0.4
.
6
=======
>>>>>>>
origin
/
0.4
.
6
};
war/src/main/webapp/js/admin/editorTinyMCE.js
View file @
e6ff7899
<<<<<<<
HEAD
<<<<<<<
HEAD
/*
* 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.
*/
/**
* @fileoverview tinyMCE editor
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @version 1.0.0.4, May 9, 2012
*/
admin
.
editors
.
tinyMCE
=
{
/*
* @description 初始化编辑器
* @param conf 编辑器初始化参数
* @param conf.kind 编辑器类型
* @param conf.id 编辑器渲染元素 id
* @param conf.fun 编辑器首次加载完成后回调函数
*/
init
:
function
(
conf
)
{
var
language
=
Label
.
localeString
.
substring
(
0
,
2
);
if
(
language
===
"
zh
"
)
{
language
=
"
zh-cn
"
;
}
if
(
conf
.
kind
&&
conf
.
kind
===
"
simple
"
)
{
try
{
tinyMCE
.
init
({
// General options
language
:
language
,
mode
:
"
exact
"
,
elements
:
conf
.
id
,
theme
:
"
advanced
"
,
// Theme options
theme_advanced_buttons1
:
"
bold,italic,underline,strikethrough,|,undo,redo,|,bullist,numlist
"
,
theme_advanced_buttons2
:
""
,
theme_advanced_buttons3
:
""
,
theme_advanced_toolbar_location
:
"
top
"
,
theme_advanced_toolbar_align
:
"
left
"
,
valid_children
:
"
+body[style]
"
});
}
catch
(
e
)
{
$
(
"
#tipMsg
"
).
text
(
"
TinyMCE load fail
"
);
}
}
else
{
try
{
tinyMCE
.
init
({
// General options
language
:
language
,
mode
:
"
exact
"
,
elements
:
conf
.
id
,
theme
:
"
advanced
"
,
plugins
:
"
autosave,style,advhr,advimage,advlink,preview,inlinepopups,media,paste,syntaxhl,wordcount
"
,
// Theme options
theme_advanced_buttons1
:
"
formatselect,fontselect,fontsizeselect,|,bold,italic,underline,strikethrough,forecolor,|,advhr,blockquote,syntaxhl,
"
,
theme_advanced_buttons2
:
"
undo,redo,|,bullist,numlist,outdent,indent,|,justifyleft,justifycenter,justifyright,justifyfull,|,pastetext,pasteword,|,link,unlink,image,iespell,media,|,cleanup,code,preview,
"
,
theme_advanced_buttons3
:
""
,
theme_advanced_toolbar_location
:
"
top
"
,
theme_advanced_toolbar_align
:
"
left
"
,
theme_advanced_resizing
:
true
,
theme_advanced_statusbar_location
:
"
bottom
"
,
extended_valid_elements
:
"
link[type|rel|href|charset],pre[name|class],iframe[src|width|height|name|align],+a[*]
"
,
valid_children
:
"
+body[style]
"
,
relative_urls
:
false
,
remove_script_host
:
false
,
oninit
:
function
()
{
if
(
typeof
(
conf
.
fun
)
===
"
function
"
)
{
conf
.
fun
();
}
}
});
}
catch
(
e
)
{
$
(
"
#tipMsg
"
).
text
(
"
TinyMCE load fail
"
);
}
}
},
/*
* @description 获取编辑器值
* @param {string} id 编辑器id
* @returns {string} 编辑器值
*/
getContent
:
function
(
id
)
{
var
content
=
""
;
try
{
content
=
tinyMCE
.
get
(
id
).
getContent
();
}
catch
(
e
)
{
content
=
$
(
"
#
"
+
id
).
val
();
}
return
content
;
},
/*
* @description 设置编辑器值
* @param {string} id 编辑器 id
* @param {string} content 设置编辑器值
*/
setContent
:
function
(
id
,
content
)
{
try
{
if
(
tinyMCE
.
get
(
id
))
{
tinyMCE
.
get
(
id
).
setContent
(
content
);
}
else
{
$
(
"
#
"
+
id
).
val
(
content
);
}
}
catch
(
e
)
{
$
(
"
#
"
+
id
).
val
(
content
);
}
}
=======
=======
>>>>>>>
origin
/
0.4
.
6
/*
* Copyright (c) 2009, 2010, 2011, 2012, B3log Team
*
...
...
@@ -251,8 +123,4 @@ admin.editors.tinyMCE = {
$
(
"
#
"
+
id
).
val
(
content
);
}
}
<<<<<<<
HEAD
>>>>>>>
origin
/
0.4
.
6
=======
>>>>>>>
origin
/
0.4
.
6
};
war/src/main/webapp/js/admin/pageList.js
View file @
e6ff7899
This diff is collapsed.
Click to expand it.
war/src/main/webapp/js/admin/preference.js
View file @
e6ff7899
This diff is collapsed.
Click to expand it.
war/src/main/webapp/js/admin/tablePaginate.js
View file @
e6ff7899
<<<<<<<
HEAD
<<<<<<<
HEAD
/*
* 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.
*/
/**
* table and paginate util
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @version 1.0.0.7, Nov 8, 2011
*/
var
TablePaginate
=
function
(
id
)
{
this
.
id
=
id
;
this
.
currentPage
=
1
;
};
$
.
extend
(
TablePaginate
.
prototype
,
{
/*
* 构建 table 框架
* @colModel table 列宽,标题等数据
*/
buildTable
:
function
(
colModel
,
noExpend
)
{
var
tableData
=
{
colModel
:
colModel
,
noDataTip
:
Label
.
noDataLabel
}
if
(
!
noExpend
)
{
tableData
.
expendRow
=
{
index
:
"
expendRow
"
}
}
$
(
"
#
"
+
this
.
id
+
"
Table
"
).
table
(
tableData
);
},
/*
* 初始化分页
*/
initPagination
:
function
()
{
var
id
=
this
.
id
;
$
(
"
#
"
+
id
+
"
Pagination
"
).
paginate
({
"
bind
"
:
function
(
currentPage
)
{
admin
.
setHashByPage
(
currentPage
);
return
true
;
},
"
currentPage
"
:
1
,
"
errorMessage
"
:
Label
.
inputErrorLabel
,
"
nextPageText
"
:
Label
.
nextPagePabel
,
"
previousPageText
"
:
Label
.
previousPageLabel
,
"
goText
"
:
Label
.
gotoLabel
,
"
type
"
:
"
custom
"
,
"
custom
"
:
[
1
],
"
pageCount
"
:
1
});
},
/*
* 初始化评论对话框
*/
initCommentsDialog
:
function
()
{
var
that
=
this
;
$
(
"
#
"
+
this
.
id
+
"
Comments
"
).
dialog
({
width
:
700
,
height
:
500
,
"
modal
"
:
true
,
"
hideFooter
"
:
true
,
"
close
"
:
function
()
{
admin
[
that
.
id
+
"
List
"
].
getList
(
that
.
currentPage
);
return
true
;
}
});
},
/*
* 更新 table & paginateion
*/
updateTablePagination
:
function
(
data
,
currentPage
,
pageInfo
)
{
currentPage
=
parseInt
(
currentPage
);
if
(
currentPage
>
pageInfo
.
paginationPageCount
&&
currentPage
>
1
)
{
$
(
"
#tipMsg
"
).
text
(
Label
.
pageLabel
+
"
:
"
+
currentPage
+
"
"
+
Label
.
noDataLable
);
$
(
"
#loadMsg
"
).
text
(
""
);
return
;
}
$
(
"
#
"
+
this
.
id
+
"
Table
"
).
table
(
"
update
"
,
{
data
:
[{
groupName
:
"
all
"
,
groupData
:
data
}]
});
if
(
pageInfo
.
paginationPageCount
===
0
)
{
pageInfo
.
paginationPageCount
=
1
;
}
$
(
"
#
"
+
this
.
id
+
"
Pagination
"
).
paginate
(
"
update
"
,
{
pageCount
:
pageInfo
.
paginationPageCount
,
currentPage
:
currentPage
,
custom
:
pageInfo
.
paginationPageNums
});
this
.
currentPage
=
currentPage
;
}
=======
=======
>>>>>>>
origin
/
0.4
.
6
/*
* Copyright (c) 2009, 2010, 2011, 2012, B3log Team
*
...
...
@@ -228,8 +111,4 @@ $.extend(TablePaginate.prototype, {
});
this
.
currentPage
=
currentPage
;
}
<<<<<<<
HEAD
>>>>>>>
origin
/
0.4
.
6
=======
>>>>>>>
origin
/
0.4
.
6
});
war/src/main/webapp/js/lib/jquery/jquery.bowknot.min.js
View file @
e6ff7899
This diff is collapsed.
Click to expand it.
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