Skip to content

Commit

Permalink
Merge pull request otale#263 from otale/develop
Browse files Browse the repository at this point in the history
🤜 fix article repeat to save
  • Loading branch information
hellokaton authored Oct 6, 2017
2 parents a228f55 + ea7b519 commit c9e68af
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,9 @@ public RestResponse modifyArticle(@Valid Contents contents) {
if (null == contents || null == contents.getCid()) {
return RestResponse.fail("缺少参数,请重试");
}
Integer cid = contents.getCid();
contentsService.updateArticle(contents);
return RestResponse.ok(contents.getCid());
return RestResponse.ok(cid);
} catch (Exception e) {
String msg = "文章编辑失败";
if (e instanceof TipException) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/tale/controller/admin/PageController.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,10 @@ public RestResponse modifyArticle(@Valid Contents contents) {
return RestResponse.fail("缺少参数,请重试");
}
try {
Integer cid = contents.getCid();
contents.setType(Types.PAGE);
contentsService.updateArticle(contents);
return RestResponse.ok(cid);
} catch (Exception e) {
String msg = "页面编辑失败";
if (e instanceof TipException) {
Expand All @@ -102,7 +104,6 @@ public RestResponse modifyArticle(@Valid Contents contents) {
}
return RestResponse.fail(msg);
}
return RestResponse.ok();
}

@Route(value = "delete")
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/templates/admin/attach.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ <h4 class="page-title">文件管理</h4>
</div>

#include('./footer.html')

#call cdn_url('attach_foot')

<script type="text/javascript">
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/templates/comm/macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<script src="//cdn.bootcss.com/to-markdown/3.1.0/to-markdown.min.js"></script>
#elseif(type == "attach_head")
<link href="//cdn.bootcss.com/dropzone/4.3.0/min/dropzone.min.css" rel="stylesheet">
#elseif(type == "attach_head")
#elseif(type == "attach_foot")
<script src="//cdn.bootcss.com/dropzone/4.3.0/min/dropzone.min.js"></script>
<script src="//cdn.bootcss.com/clipboard.js/1.6.0/clipboard.min.js"></script>
#elseif(type == "profile_foot")
Expand Down Expand Up @@ -131,7 +131,7 @@
<script src="/static/admin/plugins/to-markdown/3.1.0/to-markdown.min.js"></script>
#elseif(type == "attach_head")
<link href="/static/admin/plugins/dropzone/4.3.0/min/dropzone.min.css" rel="stylesheet">
#elseif(type == "attach_head")
#elseif(type == "attach_foot")
<script src="/static/admin/plugins/dropzone/4.3.0/min/dropzone.min.js"></script>
<script src="/static/admin/plugins/clipboard.js/1.6.0/clipboard.min.js"></script>
#elseif(type == "profile_foot")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ <h3 class="meta-title">最新评论</h3>
</script>
#end
<script src="${theme_url('/static/js/headroom.min.js')}"></script>
<script src="${theme_url('/static/js/highlight.min.js')}"></script>
<script src="//cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js"></script>
<script src="${theme_url('/static/js/instantclick.min.js')}"></script>
<script type="text/javascript">
#if(is_post)
Expand Down

This file was deleted.

0 comments on commit c9e68af

Please sign in to comment.