Commit 5d6a1982 authored by Liang Ding's avatar Liang Ding

📦 Compress JS

parent 62bba3dc
......@@ -2584,7 +2584,7 @@ admin.register["page-list"] = {
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.2.0.0, Nov 1, 2017
* @version 1.3.0.0, Nov 11, 2017
*/
/* oterhs 相关操作 */
......@@ -2670,6 +2670,27 @@ admin.others = {
}
});
},
/*
* @description 导出数据为 Hexo Markdown 文件
*/
exportHexo: function () {
$("#tipMsg").text("");
$.ajax({
url: latkeConfig.servePath + "/console/export/hexo",
type: "GET",
cache: false,
success: function (result, textStatus) {
// AJAX 下载文件的话这里会发两次请求,用 sc 来判断是否是文件,如果没有 sc 说明文件可以下载(实际上就是 result)
if (!result.sc) {
// 再发一次请求进行正式下载
window.location = latkeConfig.servePath + "/console/export/hexo";
} else {
$("#tipMsg").text(result.msg);
}
}
});
},
/*
* 获取未使用的标签。
* XXX: Not used this function yet.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
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