Commit 955a8ebc authored by Liang's avatar Liang

fixed #12124

parent eff60afe
......@@ -18,12 +18,6 @@
style="height: 500px;width:100%;"></textarea>
</div>
</div>
<div>
<label>${uploadFileLabel}</label>
<form id="articleUpload" method="POST" enctype="multipart/form-data">
<input type="file" name="file" multiple=""/><span></span>
</form>
</div>
<div>
<label>${tags1WithTips1Label}</label>
<input id="tag" type="text"/>
......
......@@ -925,10 +925,6 @@ table.form th {
/* end comments */
/* start article */
#articleUpload input {
width: 170px;
}
.article__thumbnail {
margin: 10px auto 20px;
display: none;
......
This diff is collapsed.
......@@ -21,8 +21,8 @@
<glyph unicode="&#xe00b;" glyph-name="fullscreen" d="M1024 960v-416l-160 160-192-192-96 96 192 192-160 160zM448 288l-192-192 160-160h-416v416l160-160 192 192z" />
<glyph unicode="&#xe00c;" glyph-name="question" d="M448 256h128v-128h-128zM704 704c35.346 0 64-28.654 64-64v-192l-192-128h-128v64l192 128v64h-320v128h384zM512 864c-111.118 0-215.584-43.272-294.156-121.844s-121.844-183.038-121.844-294.156c0-111.118 43.272-215.584 121.844-294.156s183.038-121.844 294.156-121.844c111.118 0 215.584 43.272 294.156 121.844s121.844 183.038 121.844 294.156c0 111.118-43.272 215.584-121.844 294.156s-183.038 121.844-294.156 121.844zM512 960v0c282.77 0 512-229.23 512-512s-229.23-512-512-512c-282.77 0-512 229.23-512 512s229.23 512 512 512z" />
<glyph unicode="&#xe00d;" glyph-name="info" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM512 32c-229.75 0-416 186.25-416 416s186.25 416 416 416 416-186.25 416-416-186.25-416-416-416zM448 704h128v-128h-128zM640 192h-256v64h64v192h-64v64h192v-256h64z" />
<glyph unicode="&#xe00e;" glyph-name="undo" d="M761.862-64c113.726 206.032 132.888 520.306-313.862 509.824v-253.824l-384 384 384 384v-248.372c534.962 13.942 594.57-472.214 313.862-775.628z" />
<glyph unicode="&#xe00f;" glyph-name="redo" d="M576 711.628v248.372l384-384-384-384v253.824c-446.75 10.482-427.588-303.792-313.86-509.824-280.712 303.414-221.1 789.57 313.86 775.628z" />
<glyph unicode="&#xe00e;" glyph-name="undo" d="M697.862-64c113.726 206.032 132.888 520.306-313.862 509.824v-253.824l-384 384 384 384v-248.372c534.962 13.942 594.57-472.214 313.862-775.628z" />
<glyph unicode="&#xe00f;" glyph-name="redo" d="M640 711.628v248.372l384-384-384-384v253.824c-446.75 10.482-427.588-303.792-313.86-509.824-280.712 303.414-221.1 789.57 313.86 775.628z" />
<glyph unicode="&#xe011;" glyph-name="code" d="M128 448l256 256h-128l-256-256 256-256h128zM768 704h-128l256-256-256-256h128l256 256zM544 832l-160-768h96l160 768z" />
<glyph unicode="&#xe600;" glyph-name="star" d="M1024 562.95l-353.78 51.408-158.22 320.582-158.216-320.582-353.784-51.408 256-249.538-60.432-352.352 316.432 166.358 316.432-166.358-60.434 352.352 256.002 249.538z" />
<glyph unicode="&#xe602;" glyph-name="register" horiz-adv-x="1027" d="M358.344 457.514q-76.634 0-130.858 54.222t-54.223 130.858 54.222 130.858 130.858 54.223 130.858-54.223 54.223-130.858-54.222-130.858-130.858-54.222zM821.043 395.82h169.657q6.266 0 10.845-4.579t4.579-10.845v-92.54q0-6.266-4.579-10.845t-10.845-4.579h-169.657v-169.657q0-6.266-4.579-10.845t-10.845-4.579h-92.54q-6.266 0-10.845 4.579t-4.579 10.845v169.657h-169.657q-6.266 0-10.845 4.579t-4.579 10.845v92.54q0 6.266 4.579 10.845t10.845 4.579h169.657v169.657q0 6.266 4.579 10.844t10.845 4.579h92.54q6.266 0 10.845-4.579t4.579-10.844v-169.657zM466.308 287.856q0-25.062 18.315-43.377t43.377-18.315h123.387v-114.711q-32.773-24.099-82.419-24.099h-421.251q-58.319 0-93.504 33.257t-35.184 91.575q0 25.545 1.687 49.884t6.749 52.537 12.773 52.294 20.725 46.993 29.883 39.041 41.208 25.785 53.74 9.641q9.158 0 18.797-8.193 38.076-29.401 74.466-44.101t79.286-14.701 79.286 14.701 74.466 44.101q9.641 8.193 18.797 8.193 63.622 0 104.59-46.27h-107.482q-25.062 0-43.377-18.315t-18.315-43.377v-92.54z" />
......@@ -69,5 +69,5 @@
<glyph unicode="&#xe90b;" glyph-name="move-up" d="M192 256h192v-320h256v320h192l-320 384-320-384zM192 960v-192h640v192h-640z" />
<glyph unicode="&#xe9da;" glyph-name="heart" d="M705.949 826.125c-85.838 0-159.71-69.827-193.928-142.757-34.244 72.928-108.126 142.757-193.971 142.757-118.337 0-214.379-96.053-214.379-214.4 0-240.73 242.845-303.852 408.348-541.85 156.437 236.525 408.313 308.804 408.313 541.85 0 118.347-96.046 214.4-214.383 214.4z" />
<glyph unicode="&#xf057;" glyph-name="video" d="M576 768c-35.347 0-64-28.653-64-64s28.653-64 64-64 64 28.653 64 64-28.653 64-64 64zM896 576l-128-128v64c0 30.625-21.515 56.21-50.25 62.503 31.208 34.143 50.25 79.594 50.25 129.495 0 106.040-85.961 192.002-192 192.002-101.123 0-183.986-78.178-191.45-177.393-34.034 30.699-79.108 49.393-128.55 49.393-106.038 0-192-85.962-192-192.002 0-106.037 85.962-191.998 192-191.998h-64v-128h64v-128c0-35.347 28.653-64 64-64h384c35.347 0 64 28.653 64 64v64l128-128h64v512h-64zM256 640c-35.347 0-64-28.653-64-64s28.653-64 64-64v-64c-70.692 0-128 57.308-128 127.999 0 70.693 57.308 128.001 128 128.001s128-57.307 128-128h-64c0 35.347-28.653 64-64 64zM576 256h-128v128h128v-128zM704 365.213c-33.526 33.547-70.276 70.317-73.373 73.414-5.79 5.791-13.79 9.373-22.627 9.373h-192c-17.674 0-32-14.326-32-32v-192c0-8.329 3.183-15.915 8.396-21.607 0.53-0.58 39.123-39.164 74.409-74.393h-114.805c-17.674 0-32 14.326-32 32v320c0 17.674 14.326 32 32 32h320c17.674 0 32-14.326 32-32v-114.787zM576 576c-70.692 0-128 57.308-128 127.999 0 70.693 57.308 128.001 128 128.001s128-57.308 128-128.001c0-70.691-57.308-127.999-128-127.999zM896 256l-64 64 0.082 128.084 63.918 63.918v-256.002z" />
<glyph unicode="&#xf0ee;" glyph-name="upload" horiz-adv-x="1097" d="M731.429 457.143q0 8-5.143 13.143l-201.143 201.143q-5.143 5.143-13.143 5.143t-13.143-5.143l-200.571-200.571q-5.714-6.857-5.714-13.714 0-8 5.143-13.143t13.143-5.143h128v-201.143q0-7.429 5.429-12.857t12.857-5.429h109.714q7.429 0 12.857 5.429t5.429 12.857v201.143h128q7.429 0 12.857 5.429t5.429 12.857zM1097.143 292.571q0-90.857-64.286-155.143t-155.143-64.286h-621.714q-105.714 0-180.857 75.143t-75.143 180.857q0 74.286 40 137.143t107.429 94.286q-1.143 17.143-1.143 24.571 0 121.143 85.714 206.857t206.857 85.714q89.143 0 163.143-49.714t107.714-132q40.571 35.429 94.857 35.429 60.571 0 103.429-42.857t42.857-103.429q0-43.429-23.429-78.857 74.286-17.714 122-77.429t47.714-136.286z" />
<glyph unicode="&#xf0ee;" glyph-name="upload" horiz-adv-x="1097" d="M731.335 429.718q0 7.999-5.142 13.141l-201.118 201.118q-5.142 5.142-13.141 5.142t-13.141-5.142l-200.546-200.546q-5.713-6.856-5.713-13.712 0-7.999 5.142-13.141t13.141-5.142h127.984v-201.118q0-7.428 5.428-12.855t12.855-5.428h109.7q7.428 0 12.855 5.428t5.428 12.855v201.118h127.984q7.428 0 12.855 5.428t5.428 12.855zM1097.003 265.167q0-90.846-64.278-155.123t-155.123-64.278h-621.635q-105.701 0-180.834 75.133t-75.133 180.834q0 74.277 39.995 137.126t107.415 94.274q-1.143 17.141-1.143 24.568 0 121.128 85.703 206.831t206.831 85.703q89.132 0 163.122-49.708t107.7-131.983q40.566 35.425 94.845 35.425 60.563 0 103.416-42.852t42.852-103.416q0-43.424-23.426-78.847 74.277-17.712 121.985-77.419t47.708-136.269z" />
</font></defs></svg>
\ No newline at end of file
......@@ -34,52 +34,6 @@ admin.article = {
autoSaveDraftTimer: "",
// 自动保存间隔
AUTOSAVETIME: 1000 * 60,
/**
* 初始化上传组件
*/
initUploadFile: function (id) {
var filename = "";
$('#' + id).fileupload({
multipart: true,
url: "https://up.qbox.me",
add: function (e, data) {
filename = data.files[0].name;
data.submit();
$('#' + id + ' span').text('uploading...');
},
formData: function (form) {
var data = form.serializeArray();
var ext = filename.substring(filename.lastIndexOf(".") + 1);
data.push({name: 'key', value: getUUID() + "." + ext});
data.push({name: 'token', value: qiniu.qiniuUploadToken});
return data;
},
done: function (e, data) {
$('#' + id + ' span').text('');
var qiniuKey = data.result.key;
if (!qiniuKey) {
alert("Upload error, please check Qiniu configurations");
return;
}
$('#' + id).after('<div>![' + data.files[0].name + '](http://'
+ qiniu.qiniuDomain + qiniuKey + ')</div>');
},
fail: function (e, data) {
$('#' + id + ' span').text("Upload error, please check Qiniu configurations [" + data.errorThrown + "]");
}
}).on('fileuploadprocessalways', function (e, data) {
var currentFile = data.files[data.index];
if (data.files.error && currentFile.error) {
alert(currentFile.error);
}
});
},
/**
* @description 获取文章并把值塞入发布文章页面
* @param {String} id 文章 id
......@@ -499,8 +453,6 @@ admin.article = {
}
});
this.initUploadFile('articleUpload');
// editor
admin.editors.articleEditor = new SoloEditor({
id: "articleContent",
......
This diff is collapsed.
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