Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo-1
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-1
Commits
ad982f7c
Unverified
Commit
ad982f7c
authored
Sep 13, 2018
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
⬆
Fix #12507
parent
9fa88970
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
25 additions
and
33 deletions
+25
-33
pom.xml
pom.xml
+2
-2
src/main/resources/docker/local.properties.h2
src/main/resources/docker/local.properties.h2
+1
-3
src/main/resources/docker/local.properties.mysql
src/main/resources/docker/local.properties.mysql
+1
-3
src/main/resources/local.properties
src/main/resources/local.properties
+1
-3
src/main/webapp/js/admin/latkeAdmin.js
src/main/webapp/js/admin/latkeAdmin.js
+17
-17
src/main/webapp/js/admin/latkeAdmin.min.js
src/main/webapp/js/admin/latkeAdmin.min.js
+1
-1
src/main/webapp/js/common.min.js
src/main/webapp/js/common.min.js
+1
-1
src/test/resources/local.properties
src/test/resources/local.properties
+1
-3
No files found.
pom.xml
View file @
ad982f7c
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!--
<!--
Description: Solo POM.
Description: Solo POM.
Version: 3.18.3.1
8, Sep 6
, 2018
Version: 3.18.3.1
9, Sep 13
, 2018
Author: <a href="http://88250.b3log.org">Liang Ding</a>
Author: <a href="http://88250.b3log.org">Liang Ding</a>
Author: <a href="http://www.annpeter.cn">Ann Peter</a>
Author: <a href="http://www.annpeter.cn">Ann Peter</a>
Author: <a href="http://vanessa.b3log.org">Vanessa</a>
Author: <a href="http://vanessa.b3log.org">Vanessa</a>
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
<properties>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<org.b3log.latke.version>
2.4.1
2
</org.b3log.latke.version>
<org.b3log.latke.version>
2.4.1
3
</org.b3log.latke.version>
<servlet.version>
3.1.0
</servlet.version>
<servlet.version>
3.1.0
</servlet.version>
<slf4j.version>
1.7.5
</slf4j.version>
<slf4j.version>
1.7.5
</slf4j.version>
...
...
src/main/resources/docker/local.properties.h2
View file @
ad982f7c
#
#
# Description: Solo local environment configurations for test.
# Description: Solo local environment configurations for test.
# Version: 1.1.3.
9, Sep 13, 2016
# Version: 1.1.3.
10, Sep 13, 2018
# Author: Liang Ding
# Author: Liang Ding
#
#
...
@@ -10,7 +10,6 @@ jdbc.username=root
...
@@ -10,7 +10,6 @@ jdbc.username=root
jdbc.password=
jdbc.password=
jdbc.driver=org.h2.Driver
jdbc.driver=org.h2.Driver
jdbc.URL=jdbc:h2:/opt/b3log/backup/solo_h2/db
jdbc.URL=jdbc:h2:/opt/b3log/backup/solo_h2/db
jdbc.pool=h2
#### MySQL runtime ####
#### MySQL runtime ####
# runtimeDatabase=MYSQL
# runtimeDatabase=MYSQL
...
@@ -18,7 +17,6 @@ jdbc.pool=h2
...
@@ -18,7 +17,6 @@ jdbc.pool=h2
# jdbc.password={{DATABASE_PASSWORD}}
# jdbc.password={{DATABASE_PASSWORD}}
# jdbc.driver=com.mysql.jdbc.Driver
# jdbc.driver=com.mysql.jdbc.Driver
# jdbc.URL=jdbc:mysql://{{DATABASE_HOST}}:{{DATABASE_PORT}}/{{DATABASE_NAME}}?useUnicode=yes&characterEncoding=utf8
# jdbc.URL=jdbc:mysql://{{DATABASE_HOST}}:{{DATABASE_PORT}}/{{DATABASE_NAME}}?useUnicode=yes&characterEncoding=utf8
# jdbc.pool=druid
# The minConnCnt MUST larger or equal to 3
# The minConnCnt MUST larger or equal to 3
jdbc.minConnCnt=5
jdbc.minConnCnt=5
...
...
src/main/resources/docker/local.properties.mysql
View file @
ad982f7c
#
#
# Description: Solo local environment configurations for test.
# Description: Solo local environment configurations for test.
# Version: 1.1.3.
9, Sep 13, 2016
# Version: 1.1.3.
10, Sep 13, 2018
# Author: Liang Ding
# Author: Liang Ding
#
#
...
@@ -10,7 +10,6 @@
...
@@ -10,7 +10,6 @@
# jdbc.password=
# jdbc.password=
# jdbc.driver=org.h2.Driver
# jdbc.driver=org.h2.Driver
# jdbc.URL=jdbc:h2:~/solo_h2/db
# jdbc.URL=jdbc:h2:~/solo_h2/db
# jdbc.pool=h2
#### MySQL runtime ####
#### MySQL runtime ####
runtimeDatabase=MYSQL
runtimeDatabase=MYSQL
...
@@ -18,7 +17,6 @@ jdbc.username={{DATABASE_USERNAME}}
...
@@ -18,7 +17,6 @@ jdbc.username={{DATABASE_USERNAME}}
jdbc.password={{DATABASE_PASSWORD}}
jdbc.password={{DATABASE_PASSWORD}}
jdbc.driver=com.mysql.jdbc.Driver
jdbc.driver=com.mysql.jdbc.Driver
jdbc.URL=jdbc:mysql://{{DATABASE_HOST}}:{{DATABASE_PORT}}/{{DATABASE_NAME}}?useUnicode=yes&characterEncoding=utf8
jdbc.URL=jdbc:mysql://{{DATABASE_HOST}}:{{DATABASE_PORT}}/{{DATABASE_NAME}}?useUnicode=yes&characterEncoding=utf8
jdbc.pool=druid
# The minConnCnt MUST larger or equal to 3
# The minConnCnt MUST larger or equal to 3
jdbc.minConnCnt=5
jdbc.minConnCnt=5
...
...
src/main/resources/local.properties
View file @
ad982f7c
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
#
#
# Description: Solo local environment configurations for test.
# Description: Solo local environment configurations for test.
# Version: 1.1.3.
9, Sep 13, 2016
# Version: 1.1.3.
10, Sep 13, 2018
# Author: Liang Ding
# Author: Liang Ding
#
#
...
@@ -28,7 +28,6 @@ jdbc.username=root
...
@@ -28,7 +28,6 @@ jdbc.username=root
jdbc.password
=
jdbc.password
=
jdbc.driver
=
org.h2.Driver
jdbc.driver
=
org.h2.Driver
jdbc.URL
=
jdbc:h2:~/solo_h2/db
jdbc.URL
=
jdbc:h2:~/solo_h2/db
jdbc.pool
=
h2
#### MySQL runtime ####
#### MySQL runtime ####
#runtimeDatabase=MYSQL
#runtimeDatabase=MYSQL
...
@@ -36,7 +35,6 @@ jdbc.pool=h2
...
@@ -36,7 +35,6 @@ jdbc.pool=h2
#jdbc.password=
#jdbc.password=
#jdbc.driver=com.mysql.jdbc.Driver
#jdbc.driver=com.mysql.jdbc.Driver
#jdbc.URL=jdbc:mysql://localhost:3306/solo?useUnicode=yes&characterEncoding=utf8
#jdbc.URL=jdbc:mysql://localhost:3306/solo?useUnicode=yes&characterEncoding=utf8
#jdbc.pool=druid
# The minConnCnt MUST larger or equal to 3
# The minConnCnt MUST larger or equal to 3
jdbc.minConnCnt
=
5
jdbc.minConnCnt
=
5
...
...
src/main/webapp/js/admin/latkeAdmin.js
View file @
ad982f7c
...
@@ -1053,7 +1053,7 @@ $.extend(TablePaginate.prototype, {
...
@@ -1053,7 +1053,7 @@ $.extend(TablePaginate.prototype, {
*
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.5.
0.1, Apr 5
, 2018
* @version 1.5.
1.0, Sep 10
, 2018
*/
*/
admin
.
article
=
{
admin
.
article
=
{
currentEditorType
:
''
,
currentEditorType
:
''
,
...
@@ -1151,7 +1151,7 @@ admin.article = {
...
@@ -1151,7 +1151,7 @@ admin.article = {
* @param {String} title 文章标题
* @param {String} title 文章标题
*/
*/
del
:
function
(
id
,
fromId
,
title
)
{
del
:
function
(
id
,
fromId
,
title
)
{
var
isDelete
=
confirm
(
Label
.
confirmRemoveLabel
+
Label
.
articleLabel
+
'
"
'
+
title
+
'
"?
'
);
var
isDelete
=
confirm
(
Label
.
confirmRemoveLabel
+
Label
.
articleLabel
+
'
"
'
+
Util
.
htmlDecode
(
title
)
+
'
"?
'
);
if
(
isDelete
)
{
if
(
isDelete
)
{
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
$
(
"
#tipMsg
"
).
text
(
""
);
$
(
"
#tipMsg
"
).
text
(
""
);
...
@@ -1934,7 +1934,7 @@ admin.articleList = {
...
@@ -1934,7 +1934,7 @@ admin.articleList = {
var
topClass
=
articles
[
i
].
articlePutTop
?
Label
.
cancelPutTopLabel
:
Label
.
putTopLabel
;
var
topClass
=
articles
[
i
].
articlePutTop
?
Label
.
cancelPutTopLabel
:
Label
.
putTopLabel
;
articleData
[
i
].
expendRow
=
"
<a target='_blank' href='
"
+
latkeConfig
.
servePath
+
articles
[
i
].
articlePermalink
+
"
'>
"
+
Label
.
viewLabel
+
"
</a>
\
articleData
[
i
].
expendRow
=
"
<a target='_blank' href='
"
+
latkeConfig
.
servePath
+
articles
[
i
].
articlePermalink
+
"
'>
"
+
Label
.
viewLabel
+
"
</a>
\
<a href='javascript:void(0)' onclick=
\"
admin.article.get('
"
+
articles
[
i
].
oId
+
"
', true)
\"
>
"
+
Label
.
updateLabel
+
"
</a>
\
<a href='javascript:void(0)' onclick=
\"
admin.article.get('
"
+
articles
[
i
].
oId
+
"
', true)
\"
>
"
+
Label
.
updateLabel
+
"
</a>
\
<a href='javascript:void(0)' onclick=
\"
admin.article.del('
"
+
articles
[
i
].
oId
+
"
', 'article', '
"
+
articles
[
i
].
articleTitle
+
"
')
\"
>
"
+
Label
.
removeLabel
+
"
</a>
\
<a href='javascript:void(0)' onclick=
\"
admin.article.del('
"
+
articles
[
i
].
oId
+
"
', 'article', '
"
+
encodeURIComponent
(
articles
[
i
].
articleTitle
)
+
"
')
\"
>
"
+
Label
.
removeLabel
+
"
</a>
\
<a href='javascript:void(0)' onclick=
\"
admin.articleList.popTop(this, '
"
+
articles
[
i
].
oId
+
"
')
\"
>
"
+
topClass
+
"
</a>
\
<a href='javascript:void(0)' onclick=
\"
admin.articleList.popTop(this, '
"
+
articles
[
i
].
oId
+
"
')
\"
>
"
+
topClass
+
"
</a>
\
<a href='javascript:void(0)' onclick=
\"
admin.comment.open('
"
+
articles
[
i
].
oId
+
"
', 'article')
\"
>
"
+
Label
.
commentLabel
+
"
</a>
"
;
<a href='javascript:void(0)' onclick=
\"
admin.comment.open('
"
+
articles
[
i
].
oId
+
"
', 'article')
\"
>
"
+
Label
.
commentLabel
+
"
</a>
"
;
}
}
...
@@ -2011,7 +2011,7 @@ admin.register["article-list"] = {
...
@@ -2011,7 +2011,7 @@ admin.register["article-list"] = {
*
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.
1.5, Apr 5
, 2018
* @version 1.0.
2.0, Sep 10
, 2018
*/
*/
/* draft-list 相关操作 */
/* draft-list 相关操作 */
...
@@ -2085,7 +2085,7 @@ admin.draftList = {
...
@@ -2085,7 +2085,7 @@ admin.draftList = {
articles
[
i
].
articlePermalink
+
"
' target='_blank'>
"
+
articles
[
i
].
articlePermalink
+
"
' target='_blank'>
"
+
articles
[
i
].
articleTitle
+
"
</a><span class='table-tag'>
"
+
articles
[
i
].
articleTags
+
"
</span>
"
;
articles
[
i
].
articleTitle
+
"
</a><span class='table-tag'>
"
+
articles
[
i
].
articleTags
+
"
</span>
"
;
articleData
[
i
].
expendRow
=
"
<a href='javascript:void(0)' onclick=
\"
admin.article.get('
"
+
articles
[
i
].
oId
+
"
', false);
\"
>
"
+
Label
.
updateLabel
+
"
</a>
\
articleData
[
i
].
expendRow
=
"
<a href='javascript:void(0)' onclick=
\"
admin.article.get('
"
+
articles
[
i
].
oId
+
"
', false);
\"
>
"
+
Label
.
updateLabel
+
"
</a>
\
<a href='javascript:void(0)' onclick=
\"
admin.article.del('
"
+
articles
[
i
].
oId
+
"
', 'draft', '
"
+
articles
[
i
].
articleTitle
+
"
')
\"
>
"
+
Label
.
removeLabel
+
"
</a>
\
<a href='javascript:void(0)' onclick=
\"
admin.article.del('
"
+
articles
[
i
].
oId
+
"
', 'draft', '
"
+
encodeURIComponent
(
articles
[
i
].
articleTitle
)
+
"
')
\"
>
"
+
Label
.
removeLabel
+
"
</a>
\
<a href='javascript:void(0)' onclick=
\"
admin.comment.open('
"
+
articles
[
i
].
oId
+
"
', 'draft')
\"
>
"
+
Label
.
commentLabel
+
"
</a>
"
;
<a href='javascript:void(0)' onclick=
\"
admin.comment.open('
"
+
articles
[
i
].
oId
+
"
', 'draft')
\"
>
"
+
Label
.
commentLabel
+
"
</a>
"
;
}
}
...
@@ -2126,7 +2126,7 @@ admin.register["draft-list"] = {
...
@@ -2126,7 +2126,7 @@ admin.register["draft-list"] = {
*
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.2.
3.7, Apr 5
, 2018
* @version 1.2.
4.0, Sep 10
, 2018
*/
*/
/* page-list 相关操作 */
/* page-list 相关操作 */
...
@@ -2274,7 +2274,7 @@ admin.pageList = {
...
@@ -2274,7 +2274,7 @@ admin.pageList = {
pageData
[
i
].
comments
=
pages
[
i
].
pageCommentCount
;
pageData
[
i
].
comments
=
pages
[
i
].
pageCommentCount
;
pageData
[
i
].
expendRow
=
"
<span><a href='
"
+
pages
[
i
].
pagePermalink
+
"
' target='_blank'>
"
+
Label
.
viewLabel
+
"
</a>
\
pageData
[
i
].
expendRow
=
"
<span><a href='
"
+
pages
[
i
].
pagePermalink
+
"
' target='_blank'>
"
+
Label
.
viewLabel
+
"
</a>
\
<a href='javascript:void(0)' onclick=
\"
admin.pageList.get('
"
+
pages
[
i
].
oId
+
"
')
\"
>
"
+
Label
.
updateLabel
+
"
</a>
\
<a href='javascript:void(0)' onclick=
\"
admin.pageList.get('
"
+
pages
[
i
].
oId
+
"
')
\"
>
"
+
Label
.
updateLabel
+
"
</a>
\
<a href='javascript:void(0)' onclick=
\"
admin.pageList.del('
"
+
pages
[
i
].
oId
+
"
', '
"
+
pages
[
i
].
pageTitle
+
"
')
\"
>
"
+
Label
.
removeLabel
+
"
</a>
\
<a href='javascript:void(0)' onclick=
\"
admin.pageList.del('
"
+
pages
[
i
].
oId
+
"
', '
"
+
encodeURIComponent
(
pages
[
i
].
pageTitle
)
+
"
')
\"
>
"
+
Label
.
removeLabel
+
"
</a>
\
<a href='javascript:void(0)' onclick=
\"
admin.comment.open('
"
+
pages
[
i
].
oId
+
"
', 'page')
\"
>
"
+
Label
.
commentLabel
+
"
</a></span>
"
;
<a href='javascript:void(0)' onclick=
\"
admin.comment.open('
"
+
pages
[
i
].
oId
+
"
', 'page')
\"
>
"
+
Label
.
commentLabel
+
"
</a></span>
"
;
}
}
...
@@ -2335,7 +2335,7 @@ admin.pageList = {
...
@@ -2335,7 +2335,7 @@ admin.pageList = {
* @title 自定义页面标题
* @title 自定义页面标题
*/
*/
del
:
function
(
id
,
title
)
{
del
:
function
(
id
,
title
)
{
var
isDelete
=
confirm
(
Label
.
confirmRemoveLabel
+
Label
.
navLabel
+
'
"
'
+
title
+
'
"?
'
);
var
isDelete
=
confirm
(
Label
.
confirmRemoveLabel
+
Label
.
navLabel
+
'
"
'
+
Util
.
htmlDecode
(
title
)
+
'
"?
'
);
if
(
isDelete
)
{
if
(
isDelete
)
{
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
$
(
"
#tipMsg
"
).
text
(
""
);
$
(
"
#tipMsg
"
).
text
(
""
);
...
@@ -2773,7 +2773,7 @@ admin.register.others = {
...
@@ -2773,7 +2773,7 @@ admin.register.others = {
*
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.1.
1.5, Apr 5
, 2018
* @version 1.1.
2.0, Sep 10
, 2018
*/
*/
/* link-list 相关操作 */
/* link-list 相关操作 */
...
@@ -2877,7 +2877,7 @@ admin.linkList = {
...
@@ -2877,7 +2877,7 @@ admin.linkList = {
linkData
[
i
].
linkDescription
=
links
[
i
].
linkDescription
;
linkData
[
i
].
linkDescription
=
links
[
i
].
linkDescription
;
linkData
[
i
].
expendRow
=
"
<span><a href='
"
+
links
[
i
].
linkAddress
+
"
' target='_blank'>
"
+
Label
.
viewLabel
+
"
</a>
\
linkData
[
i
].
expendRow
=
"
<span><a href='
"
+
links
[
i
].
linkAddress
+
"
' target='_blank'>
"
+
Label
.
viewLabel
+
"
</a>
\
<a href='javascript:void(0)' onclick=
\"
admin.linkList.get('
"
+
links
[
i
].
oId
+
"
')
\"
>
"
+
Label
.
updateLabel
+
"
</a>
\
<a href='javascript:void(0)' onclick=
\"
admin.linkList.get('
"
+
links
[
i
].
oId
+
"
')
\"
>
"
+
Label
.
updateLabel
+
"
</a>
\
<a href='javascript:void(0)' onclick=
\"
admin.linkList.del('
"
+
links
[
i
].
oId
+
"
', '
"
+
links
[
i
].
linkTitle
+
"
')
\"
>
"
+
Label
.
removeLabel
+
"
</a></span>
"
;
<a href='javascript:void(0)' onclick=
\"
admin.linkList.del('
"
+
links
[
i
].
oId
+
"
', '
"
+
encodeURIComponent
(
links
[
i
].
linkTitle
)
+
"
')
\"
>
"
+
Label
.
removeLabel
+
"
</a></span>
"
;
}
}
that
.
tablePagination
.
updateTablePagination
(
linkData
,
pageNum
,
result
.
pagination
);
that
.
tablePagination
.
updateTablePagination
(
linkData
,
pageNum
,
result
.
pagination
);
...
@@ -3007,7 +3007,7 @@ admin.linkList = {
...
@@ -3007,7 +3007,7 @@ admin.linkList = {
* @title 链接标题
* @title 链接标题
*/
*/
del
:
function
(
id
,
title
)
{
del
:
function
(
id
,
title
)
{
var
isDelete
=
confirm
(
Label
.
confirmRemoveLabel
+
Label
.
permalinkLabel
+
'
"
'
+
title
+
'
"?
'
);
var
isDelete
=
confirm
(
Label
.
confirmRemoveLabel
+
Label
.
permalinkLabel
+
'
"
'
+
Util
.
htmlDecode
(
title
)
+
'
"?
'
);
if
(
isDelete
)
{
if
(
isDelete
)
{
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
$
(
"
#tipMsg
"
).
text
(
""
);
$
(
"
#tipMsg
"
).
text
(
""
);
...
@@ -3605,7 +3605,7 @@ admin.register["plugin-list"] = {
...
@@ -3605,7 +3605,7 @@ admin.register["plugin-list"] = {
*
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.1.
1.8, Apr 5
, 2018
* @version 1.1.
2.0, Sep 10
, 2018
*/
*/
/* user-list 相关操作 */
/* user-list 相关操作 */
...
@@ -3694,7 +3694,7 @@ admin.userList = {
...
@@ -3694,7 +3694,7 @@ admin.userList = {
}
else
{
}
else
{
userData
[
i
].
expendRow
=
"
<a href='javascript:void(0)' onclick=
\"
admin.userList.get('
"
+
userData
[
i
].
expendRow
=
"
<a href='javascript:void(0)' onclick=
\"
admin.userList.get('
"
+
users
[
i
].
oId
+
"
', '
"
+
users
[
i
].
userRole
+
"
')
\"
>
"
+
Label
.
updateLabel
+
"
</a>
\
users
[
i
].
oId
+
"
', '
"
+
users
[
i
].
userRole
+
"
')
\"
>
"
+
Label
.
updateLabel
+
"
</a>
\
<a href='javascript:void(0)' onclick=
\"
admin.userList.del('
"
+
users
[
i
].
oId
+
"
', '
"
+
users
[
i
].
userName
+
"
')
\"
>
"
+
Label
.
removeLabel
+
"
</a>
"
+
<a href='javascript:void(0)' onclick=
\"
admin.userList.del('
"
+
users
[
i
].
oId
+
"
', '
"
+
encodeURIComponent
(
users
[
i
].
userName
)
+
"
')
\"
>
"
+
Label
.
removeLabel
+
"
</a>
"
+
"
<a href='javascript:void(0)' onclick=
\"
admin.userList.changeRole('
"
+
users
[
i
].
oId
+
"
')
\"
>
"
+
Label
.
changeRoleLabel
+
"
</a>
"
;
"
<a href='javascript:void(0)' onclick=
\"
admin.userList.changeRole('
"
+
users
[
i
].
oId
+
"
')
\"
>
"
+
Label
.
changeRoleLabel
+
"
</a>
"
;
if
(
"
defaultRole
"
===
users
[
i
].
userRole
)
{
if
(
"
defaultRole
"
===
users
[
i
].
userRole
)
{
userData
[
i
].
isAdmin
=
Label
.
commonUserLabel
;
userData
[
i
].
isAdmin
=
Label
.
commonUserLabel
;
...
@@ -3845,7 +3845,7 @@ admin.userList = {
...
@@ -3845,7 +3845,7 @@ admin.userList = {
* @userName 用户名称
* @userName 用户名称
*/
*/
del
:
function
(
id
,
userName
)
{
del
:
function
(
id
,
userName
)
{
var
isDelete
=
confirm
(
Label
.
confirmRemoveLabel
+
Label
.
userLabel
+
'
"
'
+
userName
+
'
"?
'
);
var
isDelete
=
confirm
(
Label
.
confirmRemoveLabel
+
Label
.
userLabel
+
'
"
'
+
Util
.
htmlDecode
(
userName
)
+
'
"?
'
);
if
(
isDelete
)
{
if
(
isDelete
)
{
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
$
(
"
#tipMsg
"
).
text
(
""
);
$
(
"
#tipMsg
"
).
text
(
""
);
...
@@ -3968,7 +3968,7 @@ admin.register["user-list"] = {
...
@@ -3968,7 +3968,7 @@ admin.register["user-list"] = {
*
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.1.
2.1, Apr 5
, 2018
* @version 1.1.
3.0, Sep 10
, 2018
* @since 2.0.0
* @since 2.0.0
*/
*/
...
@@ -4100,7 +4100,7 @@ admin.categoryList = {
...
@@ -4100,7 +4100,7 @@ admin.categoryList = {
categoryData
[
i
].
expendRow
=
"
<a href='javascript:void(0)' onclick=
\"
admin.categoryList.get('
"
+
categoryData
[
i
].
expendRow
=
"
<a href='javascript:void(0)' onclick=
\"
admin.categoryList.get('
"
+
categories
[
i
].
oId
+
"
')
\"
>
"
+
Label
.
updateLabel
+
"
</a>
\
categories
[
i
].
oId
+
"
')
\"
>
"
+
Label
.
updateLabel
+
"
</a>
\
<a href='javascript:void(0)' onclick=
\"
admin.categoryList.del('
"
+
categories
[
i
].
oId
+
"
', '
"
+
<a href='javascript:void(0)' onclick=
\"
admin.categoryList.del('
"
+
categories
[
i
].
oId
+
"
', '
"
+
categories
[
i
].
categoryTitle
+
"
')
\"
>
"
+
Label
.
removeLabel
+
"
</a>
"
;
encodeURIComponent
(
categories
[
i
].
categoryTitle
)
+
"
')
\"
>
"
+
Label
.
removeLabel
+
"
</a>
"
;
}
}
that
.
tablePagination
.
updateTablePagination
(
categoryData
,
pageNum
,
result
.
pagination
);
that
.
tablePagination
.
updateTablePagination
(
categoryData
,
pageNum
,
result
.
pagination
);
...
@@ -4226,7 +4226,7 @@ admin.categoryList = {
...
@@ -4226,7 +4226,7 @@ admin.categoryList = {
* @categoryName 分类名称
* @categoryName 分类名称
*/
*/
del
:
function
(
id
,
categoryName
)
{
del
:
function
(
id
,
categoryName
)
{
var
isDelete
=
confirm
(
Label
.
confirmRemoveLabel
+
Label
.
categoryLabel
+
'
"
'
+
categoryName
+
'
"?
'
);
var
isDelete
=
confirm
(
Label
.
confirmRemoveLabel
+
Label
.
categoryLabel
+
'
"
'
+
Util
.
htmlDecode
(
categoryName
)
+
'
"?
'
);
if
(
isDelete
)
{
if
(
isDelete
)
{
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
$
(
"
#tipMsg
"
).
text
(
""
);
$
(
"
#tipMsg
"
).
text
(
""
);
...
...
src/main/webapp/js/admin/latkeAdmin.min.js
View file @
ad982f7c
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/main/webapp/js/common.min.js
View file @
ad982f7c
var
Util
=
{
_isArticlePage
:
function
(
href
){
var
isArticle
=
true
;
if
(
href
.
indexOf
(
latkeConfig
.
servePath
+
"
/tags/
"
)
>-
1
){
isArticle
=
false
}
if
(
href
.
indexOf
(
latkeConfig
.
servePath
+
"
/tags.html
"
)
>-
1
){
isArticle
=
false
}
if
(
href
.
indexOf
(
latkeConfig
.
servePath
+
"
/category/
"
)
>-
1
){
isArticle
=
false
}
if
(
href
.
indexOf
(
latkeConfig
.
servePath
+
"
/archives.html
"
)
>-
1
){
isArticle
=
false
}
if
(
href
.
indexOf
(
latkeConfig
.
servePath
+
"
/archives/
"
)
>-
1
){
isArticle
=
false
}
if
(
href
.
indexOf
(
latkeConfig
.
servePath
+
"
/links.html
"
)
>-
1
){
isArticle
=
false
}
if
(
href
===
latkeConfig
.
servePath
){
isArticle
=
false
}
if
(
/^
[
0-9
]
*$/
.
test
(
href
.
replace
(
latkeConfig
.
servePath
+
"
/
"
,
""
))){
isArticle
=
false
}
return
isArticle
},
initPjax
:
function
(
cb
,
articelCB
){
if
(
$
(
"
#pjax
"
).
length
===
1
){
$
.
pjax
({
selector
:
"
a
"
,
container
:
"
#pjax
"
,
show
:
""
,
cache
:
false
,
storage
:
true
,
titleSuffix
:
""
,
filter
:
function
(
href
){
if
(
href
.
indexOf
(
"
data:image
"
)
>-
1
){
return
true
}
return
Util
.
_isArticlePage
(
href
)},
callback
:
function
(){
cb
()}});
NProgress
.
configure
({
showSpinner
:
false
});
$
(
"
#pjax
"
).
bind
(
"
pjax.start
"
,
function
(){
NProgress
.
start
()});
$
(
"
#pjax
"
).
bind
(
"
pjax.end
"
,
function
(){
NProgress
.
done
()});
return
}
if
(
$
(
"
#pjaxArticle
"
).
length
===
1
){
$
.
pjax
({
selector
:
"
a
"
,
container
:
"
#pjaxArticle
"
,
show
:
""
,
cache
:
false
,
storage
:
true
,
titleSuffix
:
""
,
filter
:
function
(
href
){
if
(
href
.
indexOf
(
"
data:image
"
)
>-
1
){
return
true
}
return
!
Util
.
_isArticlePage
(
href
)},
callback
:
function
(){
articelCB
()}});
NProgress
.
configure
({
showSpinner
:
false
});
$
(
"
#pjaxArticle
"
).
bind
(
"
pjax.start
"
,
function
(){
NProgress
.
start
()});
$
(
"
#pjaxArticle
"
).
bind
(
"
pjax.end
"
,
function
(){
NProgress
.
done
()});
return
}},
parseMarkdown
:
function
(
className
){
var
hasMathJax
=
false
;
var
hasFlow
=
false
;
var
className
=
className
||
"
article-body
"
;
$
(
"
.
"
+
className
).
each
(
function
(){
$
(
this
).
find
(
"
p
"
).
each
(
function
(){
if
(
$
(
this
).
text
().
split
(
"
$
"
).
length
>
2
||
(
$
(
this
).
text
().
split
(
"
\\
(
"
).
length
>
1
&&
$
(
this
).
text
().
split
(
"
\\
)
"
).
length
>
1
)){
hasMathJax
=
true
;
return
false
}});
if
(
$
(
this
).
find
(
"
code.lang-flow, code.language-flow
"
).
length
>
0
){
hasFlow
=
true
;
return
false
}});
if
(
hasMathJax
){
var
initMathJax
=
function
(){
MathJax
.
Hub
.
Config
({
tex2jax
:{
inlineMath
:[[
"
$
"
,
"
$
"
],[
"
\\
(
"
,
"
\\
)
"
]],
displayMath
:[[
"
$$
"
,
"
$$
"
]],
processEscapes
:
true
,
processEnvironments
:
true
,
skipTags
:[
"
pre
"
,
"
code
"
,
"
script
"
]}});
MathJax
.
Hub
.
Typeset
()};
if
(
typeof
MathJax
!==
"
undefined
"
){
initMathJax
()}
else
{
$
.
ajax
({
method
:
"
GET
"
,
url
:
"
https://cdn.staticfile.org/MathJax/MathJax-2.6-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&_=1473258780393
"
,
dataType
:
"
script
"
,
cache
:
true
}).
done
(
function
(){
initMathJax
()})}}
if
(
hasFlow
){
var
initFlow
=
function
(){
$
(
"
.
"
+
className
+
"
code.lang-flow, .
"
+
className
+
"
code.language-flow
"
).
each
(
function
(
index
){
var
$it
=
$
(
this
);
var
id
=
"
symFlow
"
+
(
new
Date
()).
getTime
()
+
index
;
$it
.
hide
();
var
diagram
=
flowchart
.
parse
(
$
.
trim
(
$it
.
text
()));
$it
.
parent
().
after
(
'
<div style="text-align: center" id="
'
+
id
+
'
"></div>
'
);
diagram
.
drawSVG
(
id
);
$it
.
parent
().
remove
();
$
(
"
#
"
+
id
).
find
(
"
svg
"
).
height
(
"
auto
"
).
width
(
"
auto
"
)})};
if
(
typeof
(
flowchart
)
!==
"
undefined
"
){
initFlow
()}
else
{
$
.
ajax
({
method
:
"
GET
"
,
url
:
latkeConfig
.
staticServePath
+
"
/js/lib/flowchart/flowchart.min.js
"
,
dataType
:
"
script
"
,
cache
:
true
}).
done
(
function
(){
initFlow
()})}}},
isLoggedIn
:
function
(){
if
((
$
(
"
#admin
"
).
length
===
1
&&
$
(
"
#admin
"
).
data
(
"
login
"
))
||
latkeConfig
.
isLoggedIn
===
"
true
"
){
return
true
}
else
{
return
false
}},
getUserName
:
function
(){
if
(
$
(
"
#adminName
"
).
length
===
1
){
return
$
(
"
#adminName
"
).
text
()}
else
{
return
latkeConfig
.
userName
}},
error
:
function
(){
$
(
"
#tipMsg
"
).
text
(
"
Error:
"
+
arguments
[
0
]
+
"
File:
"
+
arguments
[
1
]
+
"
\n
Line:
"
+
arguments
[
2
]
+
"
please report this issue on https://github.com/b3log/solo/issues/new
"
);
$
(
"
#loadMsg
"
).
text
(
""
)},
killIE
:
function
(){
var
addKillPanel
=
function
(){
if
(
Cookie
.
readCookie
(
"
showKill
"
)
===
""
){
var
left
=
(
$
(
window
).
width
()
-
701
)
/
2
,
top1
=
(
$
(
window
).
height
()
-
420
)
/
2
;
$
(
"
body
"
).
append
(
"
<div style='display: block; height: 100%; width: 100%; position: fixed; background-color: rgb(0, 0, 0); opacity: 0.6; top: 0px;z-index:11'></div><iframe style='left:
"
+
left
+
"
px;z-index:20;top:
"
+
top1
+
"
px; position: fixed; border: 0px none; width: 701px; height: 420px;' src='
"
+
latkeConfig
.
servePath
+
"
/kill-browser'></iframe>
"
)}};
if
(
$
.
browser
.
msie
){
if
(
$
.
browser
.
version
===
"
6.0
"
||
$
.
browser
.
version
===
"
7.0
"
){
addKillPanel
();
return
}
if
(
window
.
external
&&
window
.
external
.
twGetRunPath
){
var
path
=
external
.
twGetRunPath
();
if
(
path
&&
path
.
toLowerCase
().
indexOf
(
"
360se
"
)
>-
1
&&
window
.
location
.
href
.
indexOf
(
"
admin-index
"
)
>-
1
){
addKillPanel
();
return
}}}},
replaceEmString
:
function
(
str
){
var
commentSplited
=
str
.
split
(
"
[em
"
);
if
(
commentSplited
.
length
===
1
){
return
str
}
str
=
commentSplited
[
0
];
for
(
var
j
=
1
;
j
<
commentSplited
.
length
;
j
++
){
var
key
=
commentSplited
[
j
].
substr
(
0
,
2
);
str
+=
"
<img width='20' src='
"
+
latkeConfig
.
staticServePath
+
"
/images/emotions/em
"
+
key
+
"
.png' alt='
"
+
Label
[
"
em
"
+
key
+
"
Label
"
]
+
"
' title='
"
+
Label
[
"
em
"
+
key
+
"
Label
"
]
+
"
'/>
"
+
commentSplited
[
j
].
substr
(
3
)}
return
str
},
proessURL
:
function
(
url
){
if
(
!
/^
\w
+:
\/\/
/
.
test
(
url
)){
url
=
"
http://
"
+
url
}
return
url
},
switchMobile
:
function
(
skin
){
Cookie
.
createCookie
(
"
btouch_switch_toggle
"
,
skin
,
365
);
setTimeout
(
function
(){
location
.
reload
()},
1250
)},
setTopBar
:
function
(){
var
$top
=
$
(
"
#top
"
);
if
(
$top
.
length
===
1
){
var
$showTop
=
$
(
"
#showTop
"
);
$showTop
.
click
(
function
(){
$top
.
slideDown
();
$showTop
.
hide
()});
$
(
"
#hideTop
"
).
click
(
function
(){
$top
.
slideUp
();
$showTop
.
show
()})}},
goTop
:
function
(){
$
(
"
html, body
"
).
animate
({
scrollTop
:
0
},
800
)},
goBottom
:
function
(
bottom
){
if
(
!
bottom
){
bottom
=
0
}
var
wHeight
=
$
(
"
body
"
).
height
()
>
$
(
document
).
height
()?
$
(
"
body
"
).
height
():
$
(
document
).
height
();
window
.
scrollTo
(
0
,
wHeight
-
$
(
window
).
height
()
-
bottom
)},
init
:
function
(){
Util
.
killIE
();
Util
.
setTopBar
();
Util
.
parseMarkdown
()},
replaceSideEm
:
function
(
comments
){
for
(
var
i
=
0
;
i
<
comments
.
length
;
i
++
){
var
$comment
=
$
(
comments
[
i
]);
$comment
.
html
(
Util
.
replaceEmString
(
$comment
.
html
()))}},
buildTags
:
function
(
id
){
id
=
id
||
"
tags
"
;
var
classes
=
[
"
tags1
"
,
"
tags2
"
,
"
tags3
"
,
"
tags4
"
,
"
tags5
"
],
bList
=
$
(
"
#
"
+
id
+
"
b
"
).
get
();
var
max
=
parseInt
(
$
(
"
#
"
+
id
+
"
b
"
).
last
().
text
());
var
distance
=
Math
.
ceil
(
max
/
classes
.
length
);
for
(
var
i
=
0
;
i
<
bList
.
length
;
i
++
){
var
num
=
parseInt
(
bList
[
i
].
innerHTML
);
for
(
var
j
=
0
;
j
<
classes
.
length
;
j
++
){
if
(
num
>
j
*
distance
&&
num
<=
(
j
+
1
)
*
distance
){
bList
[
i
].
parentNode
.
className
=
classes
[
j
];
break
}}}
$
(
"
#
"
+
id
).
html
(
$
(
"
#
"
+
id
+
"
li
"
).
get
().
sort
(
function
(
a
,
b
){
var
valA
=
$
(
a
).
find
(
"
span
"
).
text
().
toLowerCase
();
var
valB
=
$
(
b
).
find
(
"
span
"
).
text
().
toLowerCase
();
return
valA
.
localeCompare
(
valB
)}))},
toDate
:
function
(
time
,
format
){
var
dateTime
=
new
Date
(
time
);
var
o
=
{
"
M+
"
:
dateTime
.
getMonth
()
+
1
,
"
d+
"
:
dateTime
.
getDate
(),
"
H+
"
:
dateTime
.
getHours
(),
"
m+
"
:
dateTime
.
getMinutes
(),
"
s+
"
:
dateTime
.
getSeconds
(),
"
q+
"
:
Math
.
floor
((
dateTime
.
getMonth
()
+
3
)
/
3
),
S
:
dateTime
.
getMilliseconds
()};
if
(
/
(
y+
)
/
.
test
(
format
)){
format
=
format
.
replace
(
RegExp
.
$1
,(
dateTime
.
getFullYear
()
+
""
).
substr
(
4
-
RegExp
.
$1
.
length
))}
for
(
var
k
in
o
){
if
(
new
RegExp
(
"
(
"
+
k
+
"
)
"
).
test
(
format
)){
format
=
format
.
replace
(
RegExp
.
$1
,
RegExp
.
$1
.
length
==
1
?
o
[
k
]:(
"
00
"
+
o
[
k
]).
substr
((
""
+
o
[
k
]).
length
))}}
return
format
},
getWinHeight
:
function
(){
if
(
window
.
innerHeight
){
return
window
.
innerHeight
}
if
(
document
.
compatMode
===
"
CSS1Compat
"
){
return
window
.
document
.
documentElement
.
clientHeight
}
return
window
.
document
.
body
.
clientHeight
}};
if
(
!
Cookie
){
var
Cookie
=
{
readCookie
:
function
(
name
){
var
nameEQ
=
name
+
"
=
"
;
var
ca
=
document
.
cookie
.
split
(
"
;
"
);
for
(
var
i
=
0
;
i
<
ca
.
length
;
i
++
){
var
c
=
ca
[
i
];
while
(
c
.
charAt
(
0
)
==
"
"
){
c
=
c
.
substring
(
1
,
c
.
length
)}
if
(
c
.
indexOf
(
nameEQ
)
==
0
){
return
decodeURIComponent
(
c
.
substring
(
nameEQ
.
length
,
c
.
length
))}}
return
""
},
eraseCookie
:
function
(
name
){
this
.
createCookie
(
name
,
""
,
-
1
)},
createCookie
:
function
(
name
,
value
,
days
){
var
expires
=
""
;
if
(
days
){
var
date
=
new
Date
();
date
.
setTime
(
date
.
getTime
()
+
(
days
*
24
*
60
*
60
*
1000
));
expires
=
"
; expires=
"
+
date
.
toGMTString
()}
document
.
cookie
=
name
+
"
=
"
+
encodeURIComponent
(
value
)
+
expires
+
"
; path=/
"
}}};
var
Util
=
{
htmlDecode
:
function
(
code
){
var
div
=
document
.
createElement
(
"
div
"
);
div
.
innerHTML
=
decodeURIComponent
(
code
);
return
div
.
innerText
},
_isArticlePage
:
function
(
href
){
var
isArticle
=
true
;
if
(
href
.
indexOf
(
latkeConfig
.
servePath
+
"
/tags/
"
)
>-
1
){
isArticle
=
false
}
if
(
href
.
indexOf
(
latkeConfig
.
servePath
+
"
/tags.html
"
)
>-
1
){
isArticle
=
false
}
if
(
href
.
indexOf
(
latkeConfig
.
servePath
+
"
/category/
"
)
>-
1
){
isArticle
=
false
}
if
(
href
.
indexOf
(
latkeConfig
.
servePath
+
"
/archives.html
"
)
>-
1
){
isArticle
=
false
}
if
(
href
.
indexOf
(
latkeConfig
.
servePath
+
"
/archives/
"
)
>-
1
){
isArticle
=
false
}
if
(
href
.
indexOf
(
latkeConfig
.
servePath
+
"
/links.html
"
)
>-
1
){
isArticle
=
false
}
if
(
href
===
latkeConfig
.
servePath
){
isArticle
=
false
}
if
(
/^
[
0-9
]
*$/
.
test
(
href
.
replace
(
latkeConfig
.
servePath
+
"
/
"
,
""
))){
isArticle
=
false
}
return
isArticle
},
initPjax
:
function
(
cb
,
articelCB
){
if
(
$
(
"
#pjax
"
).
length
===
1
){
$
.
pjax
({
selector
:
"
a
"
,
container
:
"
#pjax
"
,
show
:
""
,
cache
:
false
,
storage
:
true
,
titleSuffix
:
""
,
filter
:
function
(
href
){
if
(
href
.
indexOf
(
"
data:image
"
)
>-
1
){
return
true
}
return
Util
.
_isArticlePage
(
href
)},
callback
:
function
(){
cb
()}});
NProgress
.
configure
({
showSpinner
:
false
});
$
(
"
#pjax
"
).
bind
(
"
pjax.start
"
,
function
(){
NProgress
.
start
()});
$
(
"
#pjax
"
).
bind
(
"
pjax.end
"
,
function
(){
NProgress
.
done
()});
return
}
if
(
$
(
"
#pjaxArticle
"
).
length
===
1
){
$
.
pjax
({
selector
:
"
a
"
,
container
:
"
#pjaxArticle
"
,
show
:
""
,
cache
:
false
,
storage
:
true
,
titleSuffix
:
""
,
filter
:
function
(
href
){
if
(
href
.
indexOf
(
"
data:image
"
)
>-
1
){
return
true
}
return
!
Util
.
_isArticlePage
(
href
)},
callback
:
function
(){
articelCB
()}});
NProgress
.
configure
({
showSpinner
:
false
});
$
(
"
#pjaxArticle
"
).
bind
(
"
pjax.start
"
,
function
(){
NProgress
.
start
()});
$
(
"
#pjaxArticle
"
).
bind
(
"
pjax.end
"
,
function
(){
NProgress
.
done
()});
return
}},
parseMarkdown
:
function
(
className
){
var
hasMathJax
=
false
;
var
hasFlow
=
false
;
var
className
=
className
||
"
article-body
"
;
$
(
"
.
"
+
className
).
each
(
function
(){
$
(
this
).
find
(
"
p
"
).
each
(
function
(){
if
(
$
(
this
).
text
().
split
(
"
$
"
).
length
>
2
||
(
$
(
this
).
text
().
split
(
"
\\
(
"
).
length
>
1
&&
$
(
this
).
text
().
split
(
"
\\
)
"
).
length
>
1
)){
hasMathJax
=
true
;
return
false
}});
if
(
$
(
this
).
find
(
"
code.lang-flow, code.language-flow
"
).
length
>
0
){
hasFlow
=
true
;
return
false
}});
if
(
hasMathJax
){
var
initMathJax
=
function
(){
MathJax
.
Hub
.
Config
({
tex2jax
:{
inlineMath
:[[
"
$
"
,
"
$
"
],[
"
\\
(
"
,
"
\\
)
"
]],
displayMath
:[[
"
$$
"
,
"
$$
"
]],
processEscapes
:
true
,
processEnvironments
:
true
,
skipTags
:[
"
pre
"
,
"
code
"
,
"
script
"
]}});
MathJax
.
Hub
.
Typeset
()};
if
(
typeof
MathJax
!==
"
undefined
"
){
initMathJax
()}
else
{
$
.
ajax
({
method
:
"
GET
"
,
url
:
"
https://cdn.staticfile.org/MathJax/MathJax-2.6-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&_=1473258780393
"
,
dataType
:
"
script
"
,
cache
:
true
}).
done
(
function
(){
initMathJax
()})}}
if
(
hasFlow
){
var
initFlow
=
function
(){
$
(
"
.
"
+
className
+
"
code.lang-flow, .
"
+
className
+
"
code.language-flow
"
).
each
(
function
(
index
){
var
$it
=
$
(
this
);
var
id
=
"
symFlow
"
+
(
new
Date
()).
getTime
()
+
index
;
$it
.
hide
();
var
diagram
=
flowchart
.
parse
(
$
.
trim
(
$it
.
text
()));
$it
.
parent
().
after
(
'
<div style="text-align: center" id="
'
+
id
+
'
"></div>
'
);
diagram
.
drawSVG
(
id
);
$it
.
parent
().
remove
();
$
(
"
#
"
+
id
).
find
(
"
svg
"
).
height
(
"
auto
"
).
width
(
"
auto
"
)})};
if
(
typeof
(
flowchart
)
!==
"
undefined
"
){
initFlow
()}
else
{
$
.
ajax
({
method
:
"
GET
"
,
url
:
latkeConfig
.
staticServePath
+
"
/js/lib/flowchart/flowchart.min.js
"
,
dataType
:
"
script
"
,
cache
:
true
}).
done
(
function
(){
initFlow
()})}}},
isLoggedIn
:
function
(){
if
((
$
(
"
#admin
"
).
length
===
1
&&
$
(
"
#admin
"
).
data
(
"
login
"
))
||
latkeConfig
.
isLoggedIn
===
"
true
"
){
return
true
}
else
{
return
false
}},
getUserName
:
function
(){
if
(
$
(
"
#adminName
"
).
length
===
1
){
return
$
(
"
#adminName
"
).
text
()}
else
{
return
latkeConfig
.
userName
}},
error
:
function
(){
$
(
"
#tipMsg
"
).
text
(
"
Error:
"
+
arguments
[
0
]
+
"
File:
"
+
arguments
[
1
]
+
"
\n
Line:
"
+
arguments
[
2
]
+
"
please report this issue on https://github.com/b3log/solo/issues/new
"
);
$
(
"
#loadMsg
"
).
text
(
""
)},
killIE
:
function
(){
var
addKillPanel
=
function
(){
if
(
Cookie
.
readCookie
(
"
showKill
"
)
===
""
){
var
left
=
(
$
(
window
).
width
()
-
701
)
/
2
,
top1
=
(
$
(
window
).
height
()
-
420
)
/
2
;
$
(
"
body
"
).
append
(
"
<div style='display: block; height: 100%; width: 100%; position: fixed; background-color: rgb(0, 0, 0); opacity: 0.6; top: 0px;z-index:11'></div><iframe style='left:
"
+
left
+
"
px;z-index:20;top:
"
+
top1
+
"
px; position: fixed; border: 0px none; width: 701px; height: 420px;' src='
"
+
latkeConfig
.
servePath
+
"
/kill-browser'></iframe>
"
)}};
if
(
$
.
browser
.
msie
){
if
(
$
.
browser
.
version
===
"
6.0
"
||
$
.
browser
.
version
===
"
7.0
"
){
addKillPanel
();
return
}
if
(
window
.
external
&&
window
.
external
.
twGetRunPath
){
var
path
=
external
.
twGetRunPath
();
if
(
path
&&
path
.
toLowerCase
().
indexOf
(
"
360se
"
)
>-
1
&&
window
.
location
.
href
.
indexOf
(
"
admin-index
"
)
>-
1
){
addKillPanel
();
return
}}}},
replaceEmString
:
function
(
str
){
var
commentSplited
=
str
.
split
(
"
[em
"
);
if
(
commentSplited
.
length
===
1
){
return
str
}
str
=
commentSplited
[
0
];
for
(
var
j
=
1
;
j
<
commentSplited
.
length
;
j
++
){
var
key
=
commentSplited
[
j
].
substr
(
0
,
2
);
str
+=
"
<img width='20' src='
"
+
latkeConfig
.
staticServePath
+
"
/images/emotions/em
"
+
key
+
"
.png' alt='
"
+
Label
[
"
em
"
+
key
+
"
Label
"
]
+
"
' title='
"
+
Label
[
"
em
"
+
key
+
"
Label
"
]
+
"
'/>
"
+
commentSplited
[
j
].
substr
(
3
)}
return
str
},
proessURL
:
function
(
url
){
if
(
!
/^
\w
+:
\/\/
/
.
test
(
url
)){
url
=
"
http://
"
+
url
}
return
url
},
switchMobile
:
function
(
skin
){
Cookie
.
createCookie
(
"
btouch_switch_toggle
"
,
skin
,
365
);
setTimeout
(
function
(){
location
.
reload
()},
1250
)},
setTopBar
:
function
(){
var
$top
=
$
(
"
#top
"
);
if
(
$top
.
length
===
1
){
var
$showTop
=
$
(
"
#showTop
"
);
$showTop
.
click
(
function
(){
$top
.
slideDown
();
$showTop
.
hide
()});
$
(
"
#hideTop
"
).
click
(
function
(){
$top
.
slideUp
();
$showTop
.
show
()})}},
goTop
:
function
(){
$
(
"
html, body
"
).
animate
({
scrollTop
:
0
},
800
)},
goBottom
:
function
(
bottom
){
if
(
!
bottom
){
bottom
=
0
}
var
wHeight
=
$
(
"
body
"
).
height
()
>
$
(
document
).
height
()?
$
(
"
body
"
).
height
():
$
(
document
).
height
();
window
.
scrollTo
(
0
,
wHeight
-
$
(
window
).
height
()
-
bottom
)},
init
:
function
(){
Util
.
killIE
();
Util
.
setTopBar
();
Util
.
parseMarkdown
()},
replaceSideEm
:
function
(
comments
){
for
(
var
i
=
0
;
i
<
comments
.
length
;
i
++
){
var
$comment
=
$
(
comments
[
i
]);
$comment
.
html
(
Util
.
replaceEmString
(
$comment
.
html
()))}},
buildTags
:
function
(
id
){
id
=
id
||
"
tags
"
;
var
classes
=
[
"
tags1
"
,
"
tags2
"
,
"
tags3
"
,
"
tags4
"
,
"
tags5
"
],
bList
=
$
(
"
#
"
+
id
+
"
b
"
).
get
();
var
max
=
parseInt
(
$
(
"
#
"
+
id
+
"
b
"
).
last
().
text
());
var
distance
=
Math
.
ceil
(
max
/
classes
.
length
);
for
(
var
i
=
0
;
i
<
bList
.
length
;
i
++
){
var
num
=
parseInt
(
bList
[
i
].
innerHTML
);
for
(
var
j
=
0
;
j
<
classes
.
length
;
j
++
){
if
(
num
>
j
*
distance
&&
num
<=
(
j
+
1
)
*
distance
){
bList
[
i
].
parentNode
.
className
=
classes
[
j
];
break
}}}
$
(
"
#
"
+
id
).
html
(
$
(
"
#
"
+
id
+
"
li
"
).
get
().
sort
(
function
(
a
,
b
){
var
valA
=
$
(
a
).
find
(
"
span
"
).
text
().
toLowerCase
();
var
valB
=
$
(
b
).
find
(
"
span
"
).
text
().
toLowerCase
();
return
valA
.
localeCompare
(
valB
)}))},
toDate
:
function
(
time
,
format
){
var
dateTime
=
new
Date
(
time
);
var
o
=
{
"
M+
"
:
dateTime
.
getMonth
()
+
1
,
"
d+
"
:
dateTime
.
getDate
(),
"
H+
"
:
dateTime
.
getHours
(),
"
m+
"
:
dateTime
.
getMinutes
(),
"
s+
"
:
dateTime
.
getSeconds
(),
"
q+
"
:
Math
.
floor
((
dateTime
.
getMonth
()
+
3
)
/
3
),
S
:
dateTime
.
getMilliseconds
()};
if
(
/
(
y+
)
/
.
test
(
format
)){
format
=
format
.
replace
(
RegExp
.
$1
,(
dateTime
.
getFullYear
()
+
""
).
substr
(
4
-
RegExp
.
$1
.
length
))}
for
(
var
k
in
o
){
if
(
new
RegExp
(
"
(
"
+
k
+
"
)
"
).
test
(
format
)){
format
=
format
.
replace
(
RegExp
.
$1
,
RegExp
.
$1
.
length
==
1
?
o
[
k
]:(
"
00
"
+
o
[
k
]).
substr
((
""
+
o
[
k
]).
length
))}}
return
format
},
getWinHeight
:
function
(){
if
(
window
.
innerHeight
){
return
window
.
innerHeight
}
if
(
document
.
compatMode
===
"
CSS1Compat
"
){
return
window
.
document
.
documentElement
.
clientHeight
}
return
window
.
document
.
body
.
clientHeight
}};
if
(
!
Cookie
){
var
Cookie
=
{
readCookie
:
function
(
name
){
var
nameEQ
=
name
+
"
=
"
;
var
ca
=
document
.
cookie
.
split
(
"
;
"
);
for
(
var
i
=
0
;
i
<
ca
.
length
;
i
++
){
var
c
=
ca
[
i
];
while
(
c
.
charAt
(
0
)
==
"
"
){
c
=
c
.
substring
(
1
,
c
.
length
)}
if
(
c
.
indexOf
(
nameEQ
)
==
0
){
return
decodeURIComponent
(
c
.
substring
(
nameEQ
.
length
,
c
.
length
))}}
return
""
},
eraseCookie
:
function
(
name
){
this
.
createCookie
(
name
,
""
,
-
1
)},
createCookie
:
function
(
name
,
value
,
days
){
var
expires
=
""
;
if
(
days
){
var
date
=
new
Date
();
date
.
setTime
(
date
.
getTime
()
+
(
days
*
24
*
60
*
60
*
1000
));
expires
=
"
; expires=
"
+
date
.
toGMTString
()}
document
.
cookie
=
name
+
"
=
"
+
encodeURIComponent
(
value
)
+
expires
+
"
; path=/
"
}}};
\ No newline at end of file
\ No newline at end of file
src/test/resources/local.properties
View file @
ad982f7c
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
#
#
# Description: Solo local environment configurations.
# Description: Solo local environment configurations.
# Version: 1.1.3.
9, Sep 13, 2016
# Version: 1.1.3.
10, Sep 13, 2018
# Author: Liang Ding
# Author: Liang Ding
#
#
...
@@ -28,7 +28,6 @@ jdbc.username=root
...
@@ -28,7 +28,6 @@ jdbc.username=root
jdbc.password
=
jdbc.password
=
jdbc.driver
=
org.h2.Driver
jdbc.driver
=
org.h2.Driver
jdbc.URL
=
jdbc:h2:./target/solo_h2_test/db
jdbc.URL
=
jdbc:h2:./target/solo_h2_test/db
jdbc.pool
=
h2
#### MySQL runtime ####
#### MySQL runtime ####
#runtimeDatabase=MYSQL
#runtimeDatabase=MYSQL
...
@@ -36,7 +35,6 @@ jdbc.pool=h2
...
@@ -36,7 +35,6 @@ jdbc.pool=h2
#jdbc.password=
#jdbc.password=
#jdbc.driver=com.mysql.jdbc.Driver
#jdbc.driver=com.mysql.jdbc.Driver
#jdbc.URL=jdbc:mysql://localhost:3306/solo?useUnicode=yes&characterEncoding=utf8
#jdbc.URL=jdbc:mysql://localhost:3306/solo?useUnicode=yes&characterEncoding=utf8
#jdbc.pool=druid
# The minConnCnt MUST larger or equal to 3
# The minConnCnt MUST larger or equal to 3
jdbc.minConnCnt
=
5
jdbc.minConnCnt
=
5
...
...
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