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
01c1473a
Unverified
Commit
01c1473a
authored
Apr 28, 2019
by
Van
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🚸
fix #12771
parent
596f0883
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
78 deletions
+28
-78
src/main/resources/lang_en_US.properties
src/main/resources/lang_en_US.properties
+1
-2
src/main/resources/lang_zh_CN.properties
src/main/resources/lang_zh_CN.properties
+1
-2
src/main/webapp/admin/admin-category-list.ftl
src/main/webapp/admin/admin-category-list.ftl
+0
-13
src/main/webapp/js/admin/admin.min.js
src/main/webapp/js/admin/admin.min.js
+1
-1
src/main/webapp/js/admin/categoryList.js
src/main/webapp/js/admin/categoryList.js
+25
-60
No files found.
src/main/resources/lang_en_US.properties
View file @
01c1473a
...
...
@@ -18,7 +18,7 @@
#
# Description: Solo language configurations(en_US).
# Version: 2.33.0.
1, Apr 19
, 2019
# Version: 2.33.0.
2, Apr 28
, 2019
# Author: Liang Ding
# Author: Liyuan Li
# Author: Dongxu Wang
...
...
@@ -117,7 +117,6 @@ draftListLabel=Drafts
userManageLabel
=
Users
commonUserLabel
=
Common User
visitorUserLabel
=
visitor
addCategoryLabel
=
Add Category
updateUserLabel
=
Update User
updateCategoryLabel
=
Update Category
linkManagementLabel
=
Links
...
...
src/main/resources/lang_zh_CN.properties
View file @
01c1473a
...
...
@@ -18,7 +18,7 @@
#
# Description: Solo default language configurations(zh_CN).
# Version: 2.33.0.
1, Apr 19
, 2019
# Version: 2.33.0.
2, Apr 28
, 2019
# Author: Liang Ding
# Author: Liyuan Li
# Author: Dongxu Wang
...
...
@@ -117,7 +117,6 @@ draftListLabel=\u8349\u7A3F\u5939
userManageLabel
=
\u7528\u6237\u
7BA1
\u7406
commonUserLabel
=
\u
4E00
\u
822C
\u7528\u6237
visitorUserLabel
=
\u
8BBF
\u
5BA2
\u7528\u6237
addCategoryLabel
=
\u
6DFB
\u
52A0
\u5206\u
7C7B
updateUserLabel
=
\u
66F4
\u
65B0
\u7528\u6237
updateCategoryLabel
=
\u
66F4
\u
65B0
\u5206\u
7C7B
linkManagementLabel
=
\u
94FE
\u
63A5
\u
7BA1
\u7406
...
...
src/main/webapp/admin/admin-category-list.ftl
View file @
01c1473a
...
...
@@ -23,7 +23,6 @@
</div>
<div class="fn__clear"></div>
<div class="form form__no-table">
${addCategoryLabel}
<label for="categoryName">${linkTitle1Label}</label>
<input id="categoryName" type="text"/>
<label for="categoryURI">URI:</label>
...
...
@@ -37,16 +36,4 @@ ${addCategoryLabel}
<button onclick="admin.categoryList.add();" class="fn__right">${saveLabel}</button>
<div class="fn__clear"></div>
</div>
<div id="categoryUpdate" class="fn__none form__no-table form" data-title="${updateCategoryLabel}">
<label for="categoryNameUpdate">${linkTitle1Label}</label>
<input id="categoryNameUpdate" type="text"/>
<label for="categoryURIUpdate">URI:</label>
<input id="categoryURIUpdate" type="text"/>
<label for="categoryDescUpdate">${linkDescription1Label}</label>
<input id="categoryDescUpdate" type="text"/>
<label for="categoryTagsUpdate">${tags1Label}</label>
<input id="categoryTagsUpdate" type="text"/> <br><br>
<button onclick="admin.categoryList.update();" class="fn__right">${updateLabel}</button>
<div class="fn__clear"></div>
</div>
${plugins}
src/main/webapp/js/admin/admin.min.js
View file @
01c1473a
This diff is collapsed.
Click to expand it.
src/main/webapp/js/admin/categoryList.js
View file @
01c1473a
...
...
@@ -20,7 +20,7 @@
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.
1.3.1, Oct 24, 2018
* @version 1.
2.0.0, Apr 28, 2019
* @since 2.0.0
*/
...
...
@@ -60,14 +60,6 @@ admin.categoryList = {
this
.
tablePagination
.
initPagination
();
this
.
getList
(
page
);
$
(
"
#categoryUpdate
"
).
dialog
({
title
:
$
(
"
#categoryUpdate
"
).
data
(
'
title
'
),
width
:
700
,
height
:
358
,
"
modal
"
:
true
,
"
hideFooter
"
:
true
});
// For tag auto-completion
$
.
ajax
({
// Gets all tags
url
:
Label
.
servePath
+
"
/console/tags
"
,
...
...
@@ -176,9 +168,16 @@ admin.categoryList = {
"
categoryDescription
"
:
$
(
"
#categoryDesc
"
).
val
()
};
var
oId
=
$
(
"
#categoryName
"
).
data
(
"
oId
"
);
var
type
=
"
POST
"
if
(
oId
)
{
requestJSONObject
.
oId
=
oId
type
=
"
PUT
"
}
$
.
ajax
({
url
:
Label
.
servePath
+
"
/console/category/
"
,
type
:
"
POST
"
,
type
:
type
,
cache
:
false
,
data
:
JSON
.
stringify
(
requestJSONObject
),
success
:
function
(
result
,
textStatus
)
{
...
...
@@ -188,19 +187,22 @@ admin.categoryList = {
return
;
}
$
(
"
#categoryName
"
).
val
(
""
);
$
(
"
#categoryTags
"
).
val
(
""
);
$
(
"
#categoryURI
"
).
val
(
""
);
$
(
"
#categoryDesc
"
).
val
(
""
);
if
(
admin
.
categoryList
.
pageInfo
.
currentCount
===
Label
.
PAGE_SIZE
&&
admin
.
categoryList
.
pageInfo
.
currentPage
===
admin
.
categoryList
.
pageInfo
.
pageCount
)
{
if
(
!
oId
)
{
if
(
admin
.
categoryList
.
pageInfo
.
currentCount
===
Label
.
PAGE_SIZE
&&
admin
.
categoryList
.
pageInfo
.
currentPage
===
admin
.
categoryList
.
pageInfo
.
pageCount
)
{
admin
.
categoryList
.
pageInfo
.
pageCount
++
;
}
var
hashList
=
window
.
location
.
hash
.
split
(
"
/
"
);
if
(
admin
.
categoryList
.
pageInfo
.
pageCount
!==
parseInt
(
hashList
[
hashList
.
length
-
1
]))
{
}
var
hashList
=
window
.
location
.
hash
.
split
(
"
/
"
);
if
(
admin
.
categoryList
.
pageInfo
.
pageCount
!==
parseInt
(
hashList
[
hashList
.
length
-
1
]))
{
admin
.
setHashByPage
(
admin
.
categoryList
.
pageInfo
.
pageCount
);
}
}
$
(
"
#categoryName
"
).
val
(
""
).
data
(
"
oId
"
,
''
);
$
(
"
#categoryTags
"
).
val
(
""
);
$
(
"
#categoryURI
"
).
val
(
""
);
$
(
"
#categoryDesc
"
).
val
(
""
);
admin
.
categoryList
.
getList
(
admin
.
categoryList
.
pageInfo
.
pageCount
);
$
(
"
#loadMsg
"
).
text
(
""
);
...
...
@@ -215,7 +217,6 @@ admin.categoryList = {
get
:
function
(
id
)
{
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
$
(
"
#tipMsg
"
).
text
(
""
);
$
(
"
#categoryUpdate
"
).
dialog
(
"
open
"
);
$
.
ajax
({
url
:
Label
.
servePath
+
"
/console/category/
"
+
id
,
...
...
@@ -228,51 +229,15 @@ admin.categoryList = {
return
;
}
$
(
"
#categoryName
Update
"
).
val
(
result
.
categoryTitle
).
data
(
"
oId
"
,
id
);
$
(
"
#categoryURI
Update
"
).
val
(
result
.
categoryURI
);
$
(
"
#categoryDesc
Update
"
).
val
(
result
.
categoryDescription
);
$
(
"
#categoryTags
Update
"
).
val
(
result
.
categoryTags
);
$
(
"
#categoryName
"
).
val
(
result
.
categoryTitle
).
data
(
"
oId
"
,
id
);
$
(
"
#categoryURI
"
).
val
(
result
.
categoryURI
);
$
(
"
#categoryDesc
"
).
val
(
result
.
categoryDescription
);
$
(
"
#categoryTags
"
).
val
(
result
.
categoryTags
);
$
(
"
#loadMsg
"
).
text
(
""
);
}
});
},
/*
* 更新分类
*/
update
:
function
()
{
if
(
this
.
validate
(
"
Update
"
))
{
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
$
(
"
#tipMsg
"
).
text
(
""
);
var
requestJSONObject
=
{
"
categoryTitle
"
:
$
(
"
#categoryNameUpdate
"
).
val
(),
"
oId
"
:
$
(
"
#categoryNameUpdate
"
).
data
(
"
oId
"
),
"
categoryTags
"
:
$
(
"
#categoryTagsUpdate
"
).
val
(),
"
categoryURI
"
:
$
(
"
#categoryURIUpdate
"
).
val
(),
"
categoryDescription
"
:
$
(
"
#categoryDescUpdate
"
).
val
()
};
$
.
ajax
({
url
:
Label
.
servePath
+
"
/console/category/
"
,
type
:
"
PUT
"
,
cache
:
false
,
data
:
JSON
.
stringify
(
requestJSONObject
),
success
:
function
(
result
,
textStatus
)
{
$
(
"
#categoryUpdate
"
).
dialog
(
"
close
"
);
$
(
"
#tipMsg
"
).
text
(
result
.
msg
);
if
(
!
result
.
sc
)
{
$
(
"
#loadMsg
"
).
text
(
""
);
return
;
}
admin
.
categoryList
.
getList
(
admin
.
categoryList
.
pageInfo
.
currentPage
);
$
(
"
#loadMsg
"
).
text
(
""
);
}
});
}
},
/*
* 删除分类
* @id 分类 id
...
...
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