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
6059316e
Commit
6059316e
authored
May 28, 2013
by
Vanessa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
about #135
parent
a10545dc
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
910 additions
and
904 deletions
+910
-904
war/src/main/webapp/js/admin/about.js
war/src/main/webapp/js/admin/about.js
+10
-11
war/src/main/webapp/js/admin/admin.js
war/src/main/webapp/js/admin/admin.js
+60
-60
war/src/main/webapp/js/admin/article.js
war/src/main/webapp/js/admin/article.js
+5
-4
war/src/main/webapp/js/admin/articleList.js
war/src/main/webapp/js/admin/articleList.js
+1
-2
war/src/main/webapp/js/admin/comment.js
war/src/main/webapp/js/admin/comment.js
+2
-1
war/src/main/webapp/js/admin/latkeAdmin.js
war/src/main/webapp/js/admin/latkeAdmin.js
+761
-758
war/src/main/webapp/js/admin/latkeAdmin.min.js
war/src/main/webapp/js/admin/latkeAdmin.min.js
+1
-1
war/src/main/webapp/js/admin/main.js
war/src/main/webapp/js/admin/main.js
+4
-4
war/src/main/webapp/js/admin/others.js
war/src/main/webapp/js/admin/others.js
+3
-3
war/src/main/webapp/js/admin/pageList.js
war/src/main/webapp/js/admin/pageList.js
+2
-1
war/src/main/webapp/js/admin/pluginList.js
war/src/main/webapp/js/admin/pluginList.js
+53
-54
war/src/main/webapp/js/admin/preference.js
war/src/main/webapp/js/admin/preference.js
+3
-3
war/src/main/webapp/js/admin/userList.js
war/src/main/webapp/js/admin/userList.js
+5
-2
No files found.
war/src/main/webapp/js/admin/about.js
View file @
6059316e
...
...
@@ -18,29 +18,28 @@
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
* @version 1.0.0.
3, Jan 7, 2012
* @version 1.0.0.
4, May 28, 2013
*/
/* about 相关操作 */
admin
.
about
=
{
init
:
function
()
{
init
:
function
()
{
$
.
ajax
({
url
:
"
http://rhythm.b3log.org/version/solo/latest/
"
+
Label
.
version
,
type
:
"
GET
"
,
cache
:
false
,
dataType
:
"
jsonp
"
,
error
:
function
()
{
// alert("Error loading articles from Rhythm");
},
dataType
:
"
jsonp
"
,
success
:
function
(
data
,
textStatus
)
{
var
version
=
data
.
soloVersion
;
if
(
version
===
Label
.
version
)
{
$
(
"
#aboutLatest
"
).
text
(
Label
.
upToDateLabel
);
}
else
{
$
(
"
#aboutLatest
"
).
html
(
Label
.
outOfDateLabel
+
"
<a href='
"
+
data
.
soloDownload
+
"
'>
"
+
version
+
"
</a>
"
);
"
<a href='
"
+
data
.
soloDownload
+
"
'>
"
+
version
+
"
</a>
"
);
}
$
(
"
#loadMsg
"
).
text
(
""
);
},
complete
:
function
(
XHR
,
TS
)
{
admin
.
clearTip
();
}
});
}
...
...
@@ -52,7 +51,7 @@ admin.about = {
admin
.
register
[
"
about
"
]
=
{
"
obj
"
:
admin
.
about
,
"
init
"
:
admin
.
about
.
init
,
"
refresh
"
:
function
()
{
$
(
"
#loadMsg
"
).
text
(
""
);
"
refresh
"
:
function
()
{
admin
.
clearTip
(
);
}
}
\ No newline at end of file
};
\ No newline at end of file
war/src/main/webapp/js/admin/admin.js
View file @
6059316e
This diff is collapsed.
Click to expand it.
war/src/main/webapp/js/admin/article.js
View file @
6059316e
...
...
@@ -18,7 +18,7 @@
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
* @version 1.0.3.
1, Feb 23
, 2013
* @version 1.0.3.
2, May 28
, 2013
*/
admin
.
article
=
{
// 当发文章,取消发布,更新文章时设置为 false。不需在离开编辑器时进行提示。
...
...
@@ -42,7 +42,7 @@ admin.article = {
getAndSet
:
function
()
{
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
$
(
"
#tipMsg
"
).
text
(
""
);
$
.
ajax
({
url
:
latkeConfig
.
servePath
+
"
/console/article/
"
+
admin
.
article
.
status
.
id
,
type
:
"
GET
"
,
...
...
@@ -515,7 +515,7 @@ admin.article = {
admin
.
article
.
clear
();
}
}
$
(
"
#tipMsg
"
).
text
(
""
);
$
(
"
#loadMsg
"
).
text
(
""
);
},
...
...
@@ -547,5 +547,6 @@ admin.register.article = {
"
init
"
:
admin
.
article
.
init
,
"
refresh
"
:
function
()
{
$
(
"
#loadMsg
"
).
text
(
""
);
$
(
"
#tipMsg
"
).
text
(
""
);
}
}
\ No newline at end of file
};
\ No newline at end of file
war/src/main/webapp/js/admin/articleList.js
View file @
6059316e
...
...
@@ -18,7 +18,7 @@
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
* @version 1.0.1.
4, Feb 23
, 2013
* @version 1.0.1.
5, May 28
, 2013
*/
/* article-list 相关操作 */
...
...
@@ -67,7 +67,6 @@ admin.articleList = {
getList
:
function
(
pageNum
)
{
var
that
=
this
;
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
$
.
ajax
({
url
:
latkeConfig
.
servePath
+
"
/console/articles/status/published/
"
+
pageNum
+
"
/
"
+
Label
.
PAGE_SIZE
+
"
/
"
+
Label
.
WINDOW_SIZE
,
type
:
"
GET
"
,
...
...
war/src/main/webapp/js/admin/comment.js
View file @
6059316e
...
...
@@ -18,7 +18,7 @@
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
* @version 1.0.0.
8, Feb 23
, 2013
* @version 1.0.0.
9, May 28
, 2013
*/
admin
.
comment
=
{
...
...
@@ -40,6 +40,7 @@ admin.comment = {
*/
getList
:
function
(
onId
,
fromId
)
{
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
$
(
"
#tipMsg
"
).
text
(
""
);
$
(
"
#
"
+
fromId
+
"
Comments
"
).
html
(
""
);
var
from
=
"
article
"
;
...
...
war/src/main/webapp/js/admin/latkeAdmin.js
View file @
6059316e
This diff is collapsed.
Click to expand it.
war/src/main/webapp/js/admin/latkeAdmin.min.js
View file @
6059316e
This source diff could not be displayed because it is too large. You can
view the blob
instead.
war/src/main/webapp/js/admin/main.js
View file @
6059316e
...
...
@@ -17,7 +17,7 @@
* main for admin
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @version 1.0.0.
2, Aug 9, 2011
* @version 1.0.0.
3, May 28, 2013
*/
/* main 相关操作 */
...
...
@@ -30,9 +30,9 @@ admin.main = {
admin
.
register
.
main
=
{
"
obj
"
:
admin
.
main
,
"
init
"
:
function
()
{
$
(
"
#loadMsg
"
).
text
(
""
);
admin
.
clearTip
(
);
},
"
refresh
"
:
function
()
{
$
(
"
#loadMsg
"
).
text
(
""
);
admin
.
clearTip
(
);
}
}
}
;
war/src/main/webapp/js/admin/others.js
View file @
6059316e
...
...
@@ -18,7 +18,7 @@
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
* @version 1.0.0.
7, May 3, 2012
* @version 1.0.0.
8, May 28, 2013
*/
/* oterhs 相关操作 */
...
...
@@ -122,6 +122,6 @@ admin.register.others = {
"
obj
"
:
admin
.
others
,
"
init
"
:
admin
.
others
.
init
,
"
refresh
"
:
function
()
{
$
(
"
#loadMsg
"
).
text
(
""
);
admin
.
clearTip
(
);
}
}
}
;
war/src/main/webapp/js/admin/pageList.js
View file @
6059316e
...
...
@@ -18,7 +18,7 @@
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
* @version 1.0.2.
3, Feb 23
, 2013
* @version 1.0.2.
4, May 28
, 2013
*/
/* page-list 相关操作 */
...
...
@@ -114,6 +114,7 @@ admin.pageList = {
*/
getList
:
function
(
pageNum
)
{
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
$
(
"
#tipMsg
"
).
text
(
""
);
var
that
=
this
;
$
.
ajax
({
...
...
war/src/main/webapp/js/admin/pluginList.js
View file @
6059316e
...
...
@@ -18,12 +18,12 @@
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
* @version 1.0.1.
3, May 3, 2012
* @version 1.0.1.
4, May 28, 2013
*/
/* plugin-list 相关操作 */
admin
.
pluginList
=
{
tablePagination
:
new
TablePaginate
(
"
plugin
"
),
tablePagination
:
new
TablePaginate
(
"
plugin
"
),
pageInfo
:
{
currentCount
:
1
,
pageCount
:
1
,
...
...
@@ -32,29 +32,29 @@ admin.pluginList = {
/*
* 初始化 table, pagination
*/
init
:
function
(
page
)
{
init
:
function
(
page
)
{
this
.
tablePagination
.
buildTable
([{
style
:
"
padding-left: 12px;
"
,
text
:
Label
.
pluginNameLabel
,
index
:
"
name
"
,
width
:
230
},
{
style
:
"
padding-left: 12px;
"
,
text
:
Label
.
statusLabel
,
index
:
"
status
"
,
minWidth
:
180
},
{
style
:
"
padding-left: 12px;
"
,
text
:
Label
.
authorLabel
,
index
:
"
author
"
,
width
:
200
},
{
style
:
"
padding-left: 12px;
"
,
text
:
Label
.
versionLabel
,
index
:
"
version
"
,
width
:
120
}]);
style
:
"
padding-left: 12px;
"
,
text
:
Label
.
pluginNameLabel
,
index
:
"
name
"
,
width
:
230
},
{
style
:
"
padding-left: 12px;
"
,
text
:
Label
.
statusLabel
,
index
:
"
status
"
,
minWidth
:
180
},
{
style
:
"
padding-left: 12px;
"
,
text
:
Label
.
authorLabel
,
index
:
"
author
"
,
width
:
200
},
{
style
:
"
padding-left: 12px;
"
,
text
:
Label
.
versionLabel
,
index
:
"
version
"
,
width
:
120
}]);
this
.
tablePagination
.
initPagination
();
$
(
"
#pluginSetting
"
).
dialog
({
width
:
700
,
...
...
@@ -64,31 +64,31 @@ admin.pluginList = {
});
this
.
getList
(
page
);
},
/*
* 根据当前页码获取列表
* @pagNum 当前页码
*/
getList
:
function
(
pageNum
)
{
getList
:
function
(
pageNum
)
{
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
$
(
"
#tipMsg
"
).
text
(
""
);
var
that
=
this
;
$
.
ajax
({
url
:
latkeConfig
.
servePath
+
"
/console/plugins/
"
+
pageNum
+
"
/
"
+
Label
.
PAGE_SIZE
+
"
/
"
+
Label
.
WINDOW_SIZE
,
type
:
"
GET
"
,
cache
:
false
,
success
:
function
(
result
,
textStatus
){
success
:
function
(
result
,
textStatus
)
{
$
(
"
#tipMsg
"
).
text
(
result
.
msg
);
if
(
!
result
.
sc
)
{
$
(
"
#loadMsg
"
).
text
(
""
);
return
;
}
admin
.
pluginList
.
pageInfo
.
currentPage
=
pageNum
;
var
datas
=
result
.
plugins
;
for
(
var
i
=
0
;
i
<
datas
.
length
;
i
++
)
{
datas
[
i
].
expendRow
=
"
<a href='javascript:void(0)' onclick=
\"
admin.pluginList.changeStatus('
"
+
datas
[
i
].
oId
+
"
', '
"
+
datas
[
i
].
status
+
"
')
\"
>
"
;
datas
[
i
].
expendRow
=
"
<a href='javascript:void(0)' onclick=
\"
admin.pluginList.changeStatus('
"
+
datas
[
i
].
oId
+
"
', '
"
+
datas
[
i
].
status
+
"
')
\"
>
"
;
if
(
datas
[
i
].
status
===
"
ENABLED
"
)
{
datas
[
i
].
status
=
Label
.
enabledLabel
;
datas
[
i
].
expendRow
+=
Label
.
disableLabel
;
...
...
@@ -97,67 +97,66 @@ admin.pluginList = {
datas
[
i
].
expendRow
+=
Label
.
enableLabel
;
}
datas
[
i
].
expendRow
+=
"
</a>
"
;
if
(
datas
[
i
].
setting
!=
"
{}
"
)
{
datas
[
i
].
expendRow
+=
"
<a href='javascript:void(0)' onclick=
\"
admin.pluginList.toSetting('
"
+
datas
[
i
].
oId
+
"
')
\"
>
"
+
Label
.
settingLabel
+
"
</a>
"
;
if
(
datas
[
i
].
setting
!=
"
{}
"
)
{
datas
[
i
].
expendRow
+=
"
<a href='javascript:void(0)' onclick=
\"
admin.pluginList.toSetting('
"
+
datas
[
i
].
oId
+
"
')
\"
>
"
+
Label
.
settingLabel
+
"
</a>
"
;
}
}
that
.
tablePagination
.
updateTablePagination
(
result
.
plugins
,
pageNum
,
result
.
pagination
);
$
(
"
#loadMsg
"
).
text
(
""
);
}
});
},
toSetting
:
function
(
pluginId
){
toSetting
:
function
(
pluginId
)
{
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
$
(
"
#tipMsg
"
).
text
(
""
);
var
requestJSONObject
=
{
"
oId
"
:
pluginId
};
$
.
ajax
({
url
:
latkeConfig
.
servePath
+
"
/console/plugin/toSetting
"
,
type
:
"
POST
"
,
cache
:
false
,
data
:
JSON
.
stringify
(
requestJSONObject
),
success
:
function
(
result
,
textStatus
){
success
:
function
(
result
,
textStatus
)
{
$
(
"
#tipMsg
"
).
text
(
result
.
msg
);
$
(
"
#pluginSetting
"
).
html
(
result
);
$
(
"
#pluginSetting
"
).
dialog
(
"
open
"
);
$
(
"
#loadMsg
"
).
text
(
""
);
}
});
},
changeStatus
:
function
(
pluginId
,
status
)
{
changeStatus
:
function
(
pluginId
,
status
)
{
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
$
(
"
#tipMsg
"
).
text
(
""
);
if
(
status
===
"
ENABLED
"
)
{
status
=
"
DISABLED
"
;
}
else
{
status
=
"
ENABLED
"
;
}
var
requestJSONObject
=
{
"
oId
"
:
pluginId
,
"
status
"
:
status
};
$
.
ajax
({
url
:
latkeConfig
.
servePath
+
"
/console/plugin/status/
"
,
type
:
"
PUT
"
,
cache
:
false
,
data
:
JSON
.
stringify
(
requestJSONObject
),
success
:
function
(
result
,
textStatus
){
success
:
function
(
result
,
textStatus
)
{
$
(
"
#tipMsg
"
).
text
(
result
.
msg
);
if
(
!
result
.
sc
)
{
$
(
"
#loadMsg
"
).
text
(
""
);
return
;
}
$
(
"
#loadMsg
"
).
text
(
""
);
window
.
location
.
reload
();
}
...
...
@@ -166,12 +165,12 @@ admin.pluginList = {
};
/*
* 注册到 admin 进行管理
*/
admin
.
register
[
"
plugin-list
"
]
=
{
* 注册到 admin 进行管理
*/
admin
.
register
[
"
plugin-list
"
]
=
{
"
obj
"
:
admin
.
pluginList
,
"
init
"
:
admin
.
pluginList
.
init
,
"
refresh
"
:
function
()
{
$
(
"
#loadMsg
"
).
text
(
""
);
"
refresh
"
:
function
()
{
admin
.
claerTip
(
);
}
}
}
;
war/src/main/webapp/js/admin/preference.js
View file @
6059316e
...
...
@@ -18,7 +18,7 @@
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
* @version 1.0.1.
7, Mar 5
, 2013
* @version 1.0.1.
8, May 28
, 2013
*/
/* preference 相关操作 */
...
...
@@ -257,6 +257,6 @@ admin.register["preference"] = {
"
obj
"
:
admin
.
preference
,
"
init
"
:
admin
.
preference
.
init
,
"
refresh
"
:
function
()
{
$
(
"
#loadMsg
"
).
text
(
""
);
admin
.
clearTip
(
);
}
}
}
;
war/src/main/webapp/js/admin/userList.js
View file @
6059316e
...
...
@@ -18,7 +18,7 @@
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
* @version 1.0.1.
6, Apr 2
, 2013
* @version 1.0.1.
7, May 28
, 2013
*/
/* user-list 相关操作 */
...
...
@@ -70,6 +70,7 @@ admin.userList = {
*/
getList
:
function
(
pageNum
)
{
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
$
(
"
#tipMsg
"
).
text
(
""
);
this
.
pageInfo
.
currentPage
=
pageNum
;
var
that
=
this
;
...
...
@@ -176,6 +177,7 @@ admin.userList = {
*/
get
:
function
(
id
,
userRole
)
{
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
$
(
"
#tipMsg
"
).
text
(
""
);
$
(
"
#userUpdate
"
).
dialog
(
"
open
"
);
$
.
ajax
({
...
...
@@ -290,6 +292,7 @@ admin.userList = {
* @param id
*/
changeRole
:
function
(
id
)
{
$
(
"
#tipMsg
"
).
text
(
""
);
$
.
ajax
({
url
:
latkeConfig
.
servePath
+
"
/console/changeRole/
"
+
id
,
type
:
"
GET
"
,
...
...
@@ -352,6 +355,6 @@ admin.register["user-list"] = {
"
obj
"
:
admin
.
userList
,
"
init
"
:
admin
.
userList
.
init
,
"
refresh
"
:
function
()
{
$
(
"
#loadMsg
"
).
text
(
""
);
admin
.
clearTip
(
);
}
}
\ No newline at end of file
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