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
2e3b59bf
Unverified
Commit
2e3b59bf
authored
Jan 05, 2020
by
Van
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
fix #17
parent
212dd23a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
15 deletions
+24
-15
src/main/resources/common-template/label.ftl
src/main/resources/common-template/label.ftl
+1
-1
src/main/resources/common-template/search.ftl
src/main/resources/common-template/search.ftl
+3
-0
src/main/resources/js/admin/articleList.js
src/main/resources/js/admin/articleList.js
+2
-0
src/main/resources/js/admin/draftList.js
src/main/resources/js/admin/draftList.js
+11
-11
src/main/resources/js/common.js
src/main/resources/js/common.js
+5
-3
src/main/resources/skins/timeline/js/timeline.js
src/main/resources/skins/timeline/js/timeline.js
+2
-0
No files found.
src/main/resources/common-template/label.ftl
View file @
2e3b59bf
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
-->
<script src="https://cdn.jsdelivr.net/npm/uvstat@v1.0.
1
/dist/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/uvstat@v1.0.
2
/dist/index.min.js"></script>
<script>
<script>
var Label = {
var Label = {
servePath: "${servePath}",
servePath: "${servePath}",
...
...
src/main/resources/common-template/search.ftl
View file @
2e3b59bf
...
@@ -106,5 +106,8 @@ No Result, Return to <a href="${servePath}">Index</a> or <a href="https://hacpai
...
@@ -106,5 +106,8 @@ No Result, Return to <a href="${servePath}">Index</a> or <a href="https://hacpai
Powered by
<a
href=
"https://b3log.org"
target=
"_blank"
>
B3log 开源
</a>
• Solo ${version}
Powered by
<a
href=
"https://b3log.org"
target=
"_blank"
>
B3log 开源
</a>
• Solo ${version}
</div>
</div>
</div>
</div>
<script
type=
"text/javascript"
src=
"${staticServePath}/js/lib/jquery/jquery.min.js"
charset=
"utf-8"
></script>
<script
type=
"text/javascript"
src=
"${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}"
charset=
"utf-8"
></script>
<
#include
'
label
.
ftl
'
/>
</body>
</body>
</html>
</html>
src/main/resources/js/admin/articleList.js
View file @
2e3b59bf
...
@@ -142,6 +142,8 @@ admin.articleList = {
...
@@ -142,6 +142,8 @@ admin.articleList = {
that
.
tablePagination
.
updateTablePagination
(
articleData
,
pageNum
,
that
.
tablePagination
.
updateTablePagination
(
articleData
,
pageNum
,
result
.
pagination
)
result
.
pagination
)
Util
.
uvstat
.
renderStat
()
$
(
'
#loadMsg
'
).
text
(
''
)
$
(
'
#loadMsg
'
).
text
(
''
)
},
},
})
})
...
...
src/main/resources/js/admin/draftList.js
View file @
2e3b59bf
...
@@ -26,9 +26,9 @@
...
@@ -26,9 +26,9 @@
/* draft-list 相关操作 */
/* draft-list 相关操作 */
admin
.
draftList
=
{
admin
.
draftList
=
{
tablePagination
:
new
TablePaginate
(
"
draft
"
),
tablePagination
:
new
TablePaginate
(
"
draft
"
),
/*
/*
* 初始化 table, pagination, comments dialog
* 初始化 table, pagination, comments dialog
*/
*/
init
:
function
(
page
)
{
init
:
function
(
page
)
{
this
.
tablePagination
.
buildTable
([{
this
.
tablePagination
.
buildTable
([{
...
@@ -62,14 +62,14 @@ admin.draftList = {
...
@@ -62,14 +62,14 @@ admin.draftList = {
this
.
getList
(
page
);
this
.
getList
(
page
);
},
},
/*
/*
* 根据当前页码获取列表
* 根据当前页码获取列表
* @pagNum 当前页码
* @pagNum 当前页码
*/
*/
getList
:
function
(
pageNum
)
{
getList
:
function
(
pageNum
)
{
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
);
var
that
=
this
;
var
that
=
this
;
$
.
ajax
({
$
.
ajax
({
url
:
Label
.
servePath
+
"
/console/articles/status/unpublished/
"
+
pageNum
+
"
/
"
+
Label
.
PAGE_SIZE
+
"
/
"
+
Label
.
WINDOW_SIZE
,
url
:
Label
.
servePath
+
"
/console/articles/status/unpublished/
"
+
pageNum
+
"
/
"
+
Label
.
PAGE_SIZE
+
"
/
"
+
Label
.
WINDOW_SIZE
,
type
:
"
GET
"
,
type
:
"
GET
"
,
...
@@ -80,7 +80,7 @@ admin.draftList = {
...
@@ -80,7 +80,7 @@ admin.draftList = {
$
(
"
#loadMsg
"
).
text
(
""
);
$
(
"
#loadMsg
"
).
text
(
""
);
return
;
return
;
}
}
var
articles
=
result
.
articles
,
var
articles
=
result
.
articles
,
articleData
=
[];
articleData
=
[];
for
(
var
i
=
0
;
i
<
articles
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
articles
.
length
;
i
++
)
{
...
@@ -91,15 +91,15 @@ admin.draftList = {
...
@@ -91,15 +91,15 @@ admin.draftList = {
articleData
[
i
].
articleViewCount
=
'
<span data-uvstaturl="
'
+
Label
.
servePath
+
articles
[
i
].
articlePermalink
+
'
">0</span>
'
;
articleData
[
i
].
articleViewCount
=
'
<span data-uvstaturl="
'
+
Label
.
servePath
+
articles
[
i
].
articlePermalink
+
'
">0</span>
'
;
articleData
[
i
].
author
=
articles
[
i
].
authorName
;
articleData
[
i
].
author
=
articles
[
i
].
authorName
;
articleData
[
i
].
title
=
"
<a class='no-underline' href='
"
+
Label
.
servePath
+
articleData
[
i
].
title
=
"
<a class='no-underline' href='
"
+
Label
.
servePath
+
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', '
"
+
encodeURIComponent
(
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>
"
;
}
}
that
.
tablePagination
.
updateTablePagination
(
articleData
,
pageNum
,
result
.
pagination
);
that
.
tablePagination
.
updateTablePagination
(
articleData
,
pageNum
,
result
.
pagination
);
Util
.
uvstat
.
renderStat
()
$
(
"
#loadMsg
"
).
text
(
""
);
$
(
"
#loadMsg
"
).
text
(
""
);
}
}
});
});
...
@@ -107,10 +107,10 @@ admin.draftList = {
...
@@ -107,10 +107,10 @@ admin.draftList = {
};
};
/*
/*
* 注册到 admin 进行管理
* 注册到 admin 进行管理
*/
*/
admin
.
register
[
"
draft-list
"
]
=
{
admin
.
register
[
"
draft-list
"
]
=
{
"
obj
"
:
admin
.
draftList
,
"
obj
"
:
admin
.
draftList
,
"
init
"
:
admin
.
draftList
.
init
,
"
init
"
:
admin
.
draftList
.
init
,
"
refresh
"
:
admin
.
draftList
.
getList
"
refresh
"
:
admin
.
draftList
.
getList
};
};
\ No newline at end of file
src/main/resources/js/common.js
View file @
2e3b59bf
...
@@ -28,13 +28,14 @@
...
@@ -28,13 +28,14 @@
* @static
* @static
*/
*/
var
Util
=
{
var
Util
=
{
uvstat
:
undefined
,
/**
/**
* 初始化浏览数
* 初始化浏览数
*/
*/
initViewCnt
:
function
()
{
initViewCnt
:
function
()
{
const
uvstat
=
new
Uvstat
({
loading
:
'
<span>0</span>
'
})
Util
.
uvstat
=
new
Uvstat
({
loading
:
'
<span>0</span>
'
})
uvstat
.
setStat
()
Util
.
uvstat
.
setStat
()
uvstat
.
renderStat
()
Util
.
uvstat
.
renderStat
()
},
},
/**
/**
* 是否为文章页面
* 是否为文章页面
...
@@ -106,6 +107,7 @@ var Util = {
...
@@ -106,6 +107,7 @@ var Util = {
callback
:
function
()
{
callback
:
function
()
{
Util
.
parseMarkdown
()
Util
.
parseMarkdown
()
Util
.
parseLanguage
()
Util
.
parseLanguage
()
Util
.
uvstat
.
renderStat
()
cb
&&
cb
()
cb
&&
cb
()
},
},
})
})
...
...
src/main/resources/skins/timeline/js/timeline.js
View file @
2e3b59bf
...
@@ -325,6 +325,8 @@ var timeline = {
...
@@ -325,6 +325,8 @@ var timeline = {
$
(
"
.module img
"
).
imagesLoaded
(
function
()
{
$
(
"
.module img
"
).
imagesLoaded
(
function
()
{
$
(
window
).
resize
();
$
(
window
).
resize
();
});
});
Util
.
uvstat
.
renderStat
()
}
}
});
});
},
},
...
...
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