修复二级目录BUG

pull/244/head
Minho 2018-03-25 16:59:48 +08:00
parent eaf11b3f0d
commit 3e3aafa77d
2 changed files with 5 additions and 4 deletions

View File

@ -1,13 +1,13 @@
$(function () {
editormd.katexURL = {
js : "/static/katex/katex",
css : "/static/katex/katex"
js : window.baseUrl + "/static/katex/katex",
css : window.baseUrl + "/static/katex/katex"
};
window.addDocumentModalFormHtml = $(this).find("form").html();
window.editor = editormd("docEditor", {
width: "100%",
height: "100%",
path: "/static/editor.md/lib/",
path: window.baseUrl + "/static/editor.md/lib/",
toolbar: true,
placeholder: "本编辑器支持 Markdown 编辑,左边编写,右边预览。",
imageUpload: true,

View File

@ -7,6 +7,7 @@
<title>编辑文档 - Powered by MinDoc</title>
<script type="text/javascript">
window.baseUrl = "{{.BaseUrl}}";
window.editor = null;
window.imageUploadURL = "{{urlfor "DocumentController.Upload" "identify" .Model.Identify}}";
window.fileUploadURL = "{{urlfor "DocumentController.Upload" "identify" .Model.Identify}}";
@ -303,7 +304,7 @@
window.uploader = WebUploader.create({
auto: true,
dnd : true,
swf: '/static/webuploader/Uploader.swf',
swf: '{{.BaseUrl}}/static/webuploader/Uploader.swf',
server: '{{urlfor "DocumentController.Upload"}}',
formData : { "identify" : {{.Model.Identify}},"doc_id" : window.selectNode.id },
pick: "#filePicker",