Commit 3d8c8767 authored by Van's avatar Van

🐛 fix #10

parent 71498192
This diff is collapsed.
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* *
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a> * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.6.0.5, Aug 6, 2019 * @version 1.6.1.0, Dec 15, 2019
*/ */
admin.article = { admin.article = {
// 当发文章,取消发布,更新文章时设置为 false。不需在离开编辑器时进行提示。 // 当发文章,取消发布,更新文章时设置为 false。不需在离开编辑器时进行提示。
...@@ -121,7 +121,15 @@ admin.article = { ...@@ -121,7 +121,15 @@ admin.article = {
return return
} }
admin[fromId + 'List'].getList(1) if (document.querySelectorAll('tr').length === 2) {
const refreshPage = Math.max(
(admin[fromId + 'List'].tablePagination.currentPage - 1), 1)
admin[fromId + 'List'].getList(refreshPage)
admin.setHashByPage(refreshPage)
} else {
admin[fromId + 'List'].getList(
admin[fromId + 'List'].tablePagination.currentPage)
}
}, },
}) })
} }
...@@ -419,7 +427,7 @@ admin.article = { ...@@ -419,7 +427,7 @@ admin.article = {
fun: fun, fun: fun,
previewMode: 'both', previewMode: 'both',
resize: false, resize: false,
typewriterMode: true typewriterMode: true,
}) })
admin.editors.abstractEditor = new SoloEditor({ admin.editors.abstractEditor = new SoloEditor({
......
...@@ -43,9 +43,7 @@ $.extend(TablePaginate.prototype, { ...@@ -43,9 +43,7 @@ $.extend(TablePaginate.prototype, {
} }
} }
$("#" + this.id + "Table").table(tableData); $("#" + this.id + "Table").table(tableData);
}, },
/* /*
* 初始化分页 * 初始化分页
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment