Commit 7791dba1 authored by Liyuan Li's avatar Liyuan Li

🎨

parent 86679429
......@@ -38,20 +38,19 @@
<div id="tabOthersPanel" class="sub-tabs-main">
<div id="tabOthersPanel_tag" class="fn__none">
<button class="fn__margin12" onclick="admin.others.removeUnusedTags();">${removeUnusedTagsLabel}</button>
<button class="fn__margin12" onclick="admin.others.removeUnusedArchives();">${removeUnusedArchivesLabel}</button>
<button class="fn__margin12"
onclick="admin.others.removeUnusedArchives();">${removeUnusedArchivesLabel}</button>
</div>
<div id="tabOthersPanel_data" class="fn__none">
<#if supportExport>
<button class="fn__margin12" onclick="admin.others.exportSQL();">${exportSQLLabel}</button>
<button class="fn__margin12" onclick="admin.others.exportSQL();">${exportSQLLabel}</button>
</#if>
<button class="fn__margin12" onclick="admin.others.exportJSON();">${exportJSONLabel}</button>
<button class="fn__margin12" onclick="admin.others.exportHexo();">${exportHexoLabel}</button>
</div>
<div id="tabOthersPanel_import-data" class="fn__none">
<form action="${servePath}/console/import/markdown-zip" method="post" enctype="multipart/form-data">
<input type="file" name="file">
<input type="submit" value="${uploadMarkdownZipLabel}">
</form>
<input id="otherImportFileInput" type="file" name="file">
<button onclick="admin.others.importZip()">${importLabel}</button>
</div>
<div id="tabOthersPanel_log" class="fn__none form">
<textarea rows="32" readonly></textarea>
......
This diff is collapsed.
......@@ -131,6 +131,23 @@ admin.others = {
},
})
},
importZip () {
const formData = new FormData()
const $input = $('#otherImportFileInput')
formData.append('file', $input[0].files)
$.ajax(Label.servePath + '/console/import/markdown-zip', {
method: 'POST',
data: formData,
processData: false,
contentType: false,
success: function (res) {
$input.val('')
},
complete: function () {
$input.val('')
},
})
}
}
/*
......
......@@ -18,7 +18,6 @@
# Author: Dongxu Wang
#
uploadMarkdownZipLabel=Upload Markdown Zip
editorModeSVLabel=Split View
editorModeIRLabel=Instant Rendering
editorModeWYSIWYGLabel=WYSIWYG
......
......@@ -18,7 +18,6 @@
# Author: Dongxu Wang
#
uploadMarkdownZipLabel=\u4E0A\u4F20 Markdown Zip \u5305
editorModeSVLabel=\u5206\u5C4F\u9884\u89C8
editorModeIRLabel=\u5373\u65F6\u6E32\u67D3
editorModeWYSIWYGLabel=\u6240\u89C1\u5373\u6240\u5F97
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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