Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
智布道
OneBlog
提交
7272f734
O
OneBlog
项目概览
智布道
/
OneBlog
9 个月 前同步成功
通知
11
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
OneBlog
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
7272f734
编写于
1月 29, 2019
作者:
Y
yadong.zhang0415@gmail.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
🔖
调整细节
上级
f818716d
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
216 addition
and
59 deletion
+216
-59
blog-admin/src/main/resources/static/assets/js/zhyd.core.js
blog-admin/src/main/resources/static/assets/js/zhyd.core.js
+0
-2
blog-admin/src/main/resources/static/assets/js/zyd.table.js
blog-admin/src/main/resources/static/assets/js/zyd.table.js
+23
-17
blog-admin/src/main/resources/templates/include/macros.ftl
blog-admin/src/main/resources/templates/include/macros.ftl
+1
-0
blog-admin/src/main/resources/templates/index.ftl
blog-admin/src/main/resources/templates/index.ftl
+21
-21
blog-admin/src/main/resources/templates/notification.ftl
blog-admin/src/main/resources/templates/notification.ftl
+164
-17
blog-web/src/main/resources/static/css/zhyd.core.css
blog-web/src/main/resources/static/css/zhyd.core.css
+1
-1
blog-web/src/main/resources/templates/index.ftl
blog-web/src/main/resources/templates/index.ftl
+1
-1
update.md
update.md
+5
-0
未找到文件。
blog-admin/src/main/resources/static/assets/js/zhyd.core.js
浏览文件 @
7272f734
...
...
@@ -113,8 +113,6 @@ var zhyd = window.zhyd || {
},
options
);
var
E
=
window
.
wangEditor
;
editor
=
new
E
(
'
#
'
+
$op
.
id
);
// 通过 url 参数配置 debug 模式。url 中带有 wangeditor_debug_mode=1 才会开启 debug 模式
editor
.
customConfig
.
debug
=
location
.
href
.
indexOf
(
'
wangeditor_debug_mode=1
'
)
>
0
;
// 关闭粘贴样式的过滤
editor
.
customConfig
.
pasteFilterStyle
=
false
;
editor
.
customConfig
.
zIndex
=
100
;
...
...
blog-admin/src/main/resources/static/assets/js/zyd.table.js
浏览文件 @
7272f734
...
...
@@ -35,7 +35,6 @@
_option
:
{},
init
:
function
(
options
)
{
$
.
tableUtil
.
_option
=
options
;
// console.log(options.url);
var
$tablelist
=
$
(
'
#tablelist
'
);
$tablelist
.
bootstrapTable
(
'
destroy
'
).
bootstrapTable
({
url
:
options
.
url
,
...
...
@@ -123,14 +122,17 @@
/* 添加 */
$
(
"
#btn_add
"
).
click
(
function
()
{
resetForm
();
$
(
"
#addOrUpdateModal
"
).
modal
(
'
show
'
);
$
(
"
#addOrUpdateModal
"
).
find
(
"
.modal-dialog .modal-content .modal-header h4.modal-title
"
).
html
(
"
添加
"
+
options
.
modalName
);
var
$addOrUpdateModal
=
$
(
"
#addOrUpdateModal
"
);
$addOrUpdateModal
.
modal
(
'
show
'
);
$addOrUpdateModal
.
find
(
"
.modal-dialog .modal-content .modal-header h4.modal-title
"
).
html
(
"
添加
"
+
options
.
modalName
);
if
(
$
(
"
#password
"
)
&&
$
(
"
#password
"
)[
0
])
{
$
(
"
#password
"
).
attr
(
"
required
"
,
"
required
"
);
var
$password
=
$
(
"
#password
"
);
if
(
$password
&&
$password
[
0
])
{
$password
.
attr
(
"
required
"
,
"
required
"
);
}
if
(
$
(
"
#username
"
)
&&
$
(
"
#username
"
)[
0
])
{
$
(
"
#username
"
).
removeAttr
(
"
readonly
"
);
var
$username
=
$
(
"
#username
"
);
if
(
$username
&&
$username
[
0
])
{
$username
.
removeAttr
(
"
readonly
"
);
}
bindSaveInfoEvent
(
options
.
createUrl
);
});
...
...
@@ -144,15 +146,17 @@
url
:
options
.
getInfoUrl
.
replace
(
"
{id}
"
,
userId
),
success
:
function
(
json
)
{
var
info
=
json
.
data
;
// console.log(info);
resetForm
(
info
);
$
(
"
#addOrUpdateModal
"
).
modal
(
'
show
'
);
$
(
"
#addOrUpdateModal
"
).
find
(
"
.modal-dialog .modal-content .modal-header h4.modal-title
"
).
html
(
"
修改
"
+
options
.
modalName
);
if
(
$
(
"
#password
"
)
&&
$
(
"
#password
"
)[
0
])
{
$
(
"
#password
"
).
removeAttr
(
"
required
"
);
var
$addOrUpdateModal
=
$
(
"
#addOrUpdateModal
"
);
$addOrUpdateModal
.
modal
(
'
show
'
);
$addOrUpdateModal
.
find
(
"
.modal-dialog .modal-content .modal-header h4.modal-title
"
).
html
(
"
修改
"
+
options
.
modalName
);
var
$password
=
$
(
"
#password
"
);
if
(
$password
&&
$password
[
0
])
{
$password
.
removeAttr
(
"
required
"
);
}
if
(
$
(
"
#username
"
)
&&
$
(
"
#username
"
)[
0
])
{
$
(
"
#username
"
).
attr
(
"
readonly
"
,
"
readonly
"
);
var
$username
=
$
(
"
#username
"
);
if
(
$username
&&
$username
[
0
])
{
$username
.
attr
(
"
readonly
"
,
"
readonly
"
);
}
bindSaveInfoEvent
(
options
.
updateUrl
);
...
...
@@ -171,7 +175,6 @@
traditional
:
true
,
data
:
{
'
ids
'
:
ids
},
success
:
function
(
json
)
{
console
.
warn
(
json
);
$
.
alert
.
ajaxSuccess
(
json
);
$
.
tableUtil
.
refresh
();
},
...
...
@@ -206,8 +209,7 @@
})(
jQuery
);
function
bindSaveInfoEvent
(
url
)
{
$
(
"
.addOrUpdateBtn
"
).
unbind
(
'
click
'
);
$
(
"
.addOrUpdateBtn
"
).
click
(
function
()
{
$
(
"
.addOrUpdateBtn
"
).
unbind
(
'
click
'
).
click
(
function
()
{
if
(
validator
.
checkAll
(
$
(
"
#addOrUpdateForm
"
)))
{
$
.
ajax
({
type
:
"
post
"
,
...
...
@@ -225,6 +227,10 @@ function bindSaveInfoEvent(url) {
}
function
resetForm
(
info
)
{
var
$combox
=
$
(
"
#addOrUpdateModal form select[target=combox]
"
);
if
(
$combox
&&
$combox
[
0
])
{
zhyd
.
combox
.
init
();
}
$
(
"
#addOrUpdateModal form input,#addOrUpdateModal form select,#addOrUpdateModal form textarea
"
).
each
(
function
()
{
var
$this
=
$
(
this
);
clearText
(
$this
,
this
.
type
,
info
);
...
...
blog-admin/src/main/resources/templates/include/macros.ftl
浏览文件 @
7272f734
...
...
@@ -67,6 +67,7 @@
</html>
</
#
macro>
<
#--
面包屑导航内容
+
系统通知
--
>
<
#macro
breadcrumb
>
<div
class=
"row"
>
<div
class=
"col col-md-9"
>
...
...
blog-admin/src/main/resources/templates/index.ftl
浏览文件 @
7272f734
...
...
@@ -101,7 +101,7 @@
</div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12 top_tiles">
<#-- 文章 -->
<#-- 文章 -->
<a href="/articles" class="statistics-panel">
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12 statistics-article" data-key="articleCount">
<div class="tile-stats statistics-box">
...
...
@@ -111,7 +111,7 @@
</div>
</div>
</a>
<#-- 标签 -->
<#-- 标签 -->
<a href="/article/tags" class="statistics-panel">
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12 statistics-tag" data-key="tagCount">
<div class="tile-stats statistics-box">
...
...
@@ -121,7 +121,7 @@
</div>
</div>
</a>
<#-- 分类 -->
<#-- 分类 -->
<a href="/article/types" class="statistics-panel">
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12 statistics-type" data-key="typeCount">
<div class="tile-stats statistics-box">
...
...
@@ -131,7 +131,7 @@
</div>
</div>
</a>
<#-- 评论 -->
<#-- 评论 -->
<a href="/comments" class="statistics-panel">
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12 statistics-comment" data-key="commentCount">
<div class="tile-stats statistics-box">
...
...
@@ -144,7 +144,7 @@
</div>
</div>
<div class="row">
<#-- 分类文章数统计 -->
<#-- 分类文章数统计 -->
<div class="col-md-4 col-sm-4 col-xs-12">
<div class="x_panel fixed_height_320 statistics-box">
<div class="x_title">
...
...
@@ -159,7 +159,7 @@
</div>
</div>
</div>
<#-- 文章访问TOP.10 -->
<#-- 文章访问TOP.10 -->
<div class="col-md-4 col-sm-4 col-xs-12">
<div class="x_panel fixed_height_320 statistics-box">
<div class="x_title">
...
...
@@ -183,7 +183,7 @@
</div>
</div>
</div>
<#-- 爬虫访问统计TOP.10 -->
<#-- 爬虫访问统计TOP.10 -->
<div class="col-md-4 col-sm-4 col-xs-12">
<div class="x_panel fixed_height_320 statistics-box">
<div class="x_title">
...
...
@@ -199,7 +199,7 @@
</div>
</div>
<#-- 近期文章 -->
<#-- 近期文章 -->
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="x_panel statistics-box">
<div class="x_title">
...
...
@@ -238,7 +238,7 @@
</div>
</div>
</div>
<#-- 近期评论 -->
<#-- 近期评论 -->
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="x_panel statistics-box">
<div class="x_title">
...
...
@@ -260,18 +260,18 @@
</tr>
</thead>
<tbody>
<@zhydTag method="recentComments" pageSize="5">
<#if recentComments?exists && (recentComments?size > 0)>
<#list recentComments as item>
<tr>
<th class="title word-prase"><div><a href="${item.url}" target="_blank" rel="external nofollow">${item.nickname?if_exists}</a></div></th>
<td class="content"><div class="word-prase">${item.briefContent?if_exists}</div></td>
<td class="source"><div class="word-prase"><a href="${config.siteUrl}${item.sourceUrl}#comment-${item.id?c}" target="_blank" rel="external nofollow">${item.articleTitle?if_exists}</a></div></td>
<td>${item.createTime?string('yyyy-MM-dd')}</td>
</tr>
</#list>
</#if>
</@zhydTag>
<@zhydTag method="recentComments" pageSize="5">
<#if recentComments?exists && (recentComments?size > 0)>
<#list recentComments as item>
<tr>
<th class="title word-prase"><div><a href="${item.url}" target="_blank" rel="external nofollow">${item.nickname?if_exists}</a></div></th>
<td class="content"><div class="word-prase">${item.briefContent?if_exists}</div></td>
<td class="source"><div class="word-prase"><a href="${config.siteUrl}${item.sourceUrl}#comment-${item.id?c}" target="_blank" rel="external nofollow">${item.articleTitle?if_exists}</a></div></td>
<td>${item.createTime?string('yyyy-MM-dd')}</td>
</tr>
</#list>
</#if>
</@zhydTag>
</tbody>
</table>
</div>
...
...
blog-admin/src/main/resources/templates/notification.ftl
浏览文件 @
7272f734
<#include "include/macros.ftl">
<@header></@header>
<@header>
<style>
.messanger {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
.messanger .messages {
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
margin: 10px 0;
padding: 0 10px;
max-height: 260px;
overflow-y: auto;
overflow-x: hidden;
}
.messanger .messages .message, .messanger .messages .ready {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
margin-bottom: 15px;
-webkit-box-align: start;
-ms-flex-align: start;
align-items: flex-start;
}
.messanger .messages .message.me {
-webkit-box-orient: horizontal;
-webkit-box-direction: reverse;
-ms-flex-direction: row-reverse;
flex-direction: row-reverse;
}
.messanger .messages .message.me img {
margin-right: 0;
margin-left: 15px;
}
.messanger .messages .message.me .info {
background-color: #009688;
color: #FFF;
}
.messanger .messages .message.me .info:before {
display: none;
}
.messanger .messages .message.me .info:after {
position: absolute;
right: -13px;
top: 0;
content: "";
width: 0;
height: 0;
border-style: solid;
border-width: 0 16px 16px 0;
border-color: transparent #009688 transparent transparent;
-webkit-transform: rotate(270deg);
-ms-transform: rotate(270deg);
transform: rotate(270deg);
}
.messanger .messages .message img {
border-radius: 50%;
margin-right: 15px;
width: 48px;
}
.messanger .messages .message .info, .messanger .messages .ready .info {
margin: 0;
background-color: #ddd;
padding: 5px 10px;
border-radius: 3px;
position: relative;
-ms-flex-item-align: start;
align-self: flex-start;
}
.messanger .messages .message .info:before {
position: absolute;
left: -14px;
top: 0;
content: "";
width: 0;
height: 0;
border-style: solid;
border-width: 0 16px 16px 0;
border-color: transparent #ddd transparent transparent;
}
.messanger .sender {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.messanger .sender input[type="text"] {
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
border: 1px solid #009688;
outline: none;
padding: 5px 10px;
}
.messanger .sender button {
border-radius: 0;
}
</style>
</@header>
<div class="clearfix"></div>
<div class="row">
...
...
@@ -12,28 +128,53 @@
</@breadcrumb>
<div class="x_panel">
<div class="x_title">
<h2>
Websocket实现向用户发送通知 <small>当前在线人数: ${online!("0")}
</small></h2>
<h2>
向web端发送消息通知 <small>需要web端用户授权
</small></h2>
<ul class="nav navbar-right panel_toolbox">
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
</li>
</ul>
<div class="clearfix"></div>
</div>
<div class="x_content">
<form class="form-horizontal form-label-left" novalidate>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="domain">消息通知内容<span class="required">*</span></label>
<div class="col-md-6 col-sm-6 col-xs-12">
<textarea class="form-control col-md-7 col-xs-12" id="msg" name="msg" required="required" placeholder="请输入消息通知内容" rows="5"></textarea>
<div class="x_content" style="display: flex;justify-content: center;">
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2><i class="fa fa-whatsapp"></i> 聊天 <small>socket通信,当前在线: ${online!("0")}</small></h2>
<ul class="nav navbar-right panel_toolbox">
<li></li>
</ul>
<div class="clearfix"></div>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="comment"></label>
<div class="col-md-6 col-sm-6 col-xs-12">
<button type="button" class="btn btn-primary" id="saveBtn"><i class="fa fa-send"> 发送</i></button>
<div class="x_content">
<div class="messanger">
<div class="messages">
<div class="ready">
<p class="info">......</p>
</div>
<#--<div class="message">
<img src="/assets/images/user.png">
<p class="info">Hello there!<br>Good Morning</p>
</div>
<div class="message me">
<img src="/assets/images/loading.gif">
<p class="info">Hi<br>Good Morning</p>
</div>
<div class="message"><img src="/assets/images/user.png">
<p class="info">How are you?</p>
</div>
<div class="message me"><img src="/assets/images/loading.gif">
<p class="info">I'm Fine.</p>
</div>-->
</div>
<div class="sender">
<input type="text" name="msg" id="msg" placeholder="Send Message">
<button class="btn btn-primary" id="send-btn" type="button" style="margin: 0;"><i class="fa fa-lg fa-fw fa-paper-plane"></i></button>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
</
form
>
</
div
>
</div>
</div>
</div>
...
...
@@ -41,11 +182,17 @@
</div>
<@footer>
<script type="text/javascript">
$("#s
aveB
tn").click(function () {
var $
form = $(this).parents("form
");
$("#s
end-b
tn").click(function () {
var $
messages = $(".messages
");
var msg = $("#msg").val();
$.post("/api/notice", {msg : msg}, function (json) {
$.alert.ajaxSuccess(json);
if (json.status == 200) {
$messages.append('<div class="message me"><img src="/assets/images/loading.gif"><p class="info">' + msg + '</p></div>');
} else {
if (json.message) {
$.alert.error(json.message);
}
}
})
});
</script>
...
...
blog-web/src/main/resources/static/css/zhyd.core.css
浏览文件 @
7272f734
...
...
@@ -523,7 +523,7 @@ a:-webkit-any-link {
float
:
left
;
color
:
#666
;
margin-right
:
8px
;
margin-top
:
5
px
;
margin-top
:
3
px
;
}
.notify
i
{
...
...
blog-web/src/main/resources/templates/index.ftl
浏览文件 @
7272f734
...
...
@@ -9,7 +9,7 @@
<div class="container custome-container">
<@prompt></@prompt>
<nav class="breadcrumb">
<div class="notify"><i class="fa fa-
volume-up
"></i></div>
<div class="notify"><i class="fa fa-
bullhorn fa-fw
"></i></div>
<div id="scrolldiv">
<div class="scrolltext">
<ul class="list-unstyled" id="notice-box">
...
...
update.md
浏览文件 @
7272f734
...
...
@@ -6,10 +6,15 @@
-
关闭issue:
-
Fixed issue :
[
IN4T1
](
https://gitee.com/yadong.zhang/DBlog/issues/IN4T1
)
-
Fixed issue :
[
IN807
](
https://gitee.com/yadong.zhang/DBlog/issues/IN807
)
-
Fixed issue :
[
IOWDY
](
https://gitee.com/yadong.zhang/DBlog/issues/IOWDY
)
-
Fixed issue :
[
IP2I1
](
https://gitee.com/yadong.zhang/DBlog/issues/IP2I1
)
-
新增:
-
admin项目中,在面包屑导航列新增一个系统通知(友情提示)
-
修改:
-
web项目中,“更新记录”页面重构
-
admin项目中,“推送消息”页面重构,以后准备做个简单的聊天通讯工具
----
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录