From 1dafee3acdcd78ecd2af7bfc50bd7602d89e02d8 Mon Sep 17 00:00:00 2001 From: Anyon Date: Mon, 15 May 2017 18:42:57 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E4=BF=AE=E6=94=B9=E5=AF=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E7=BC=96=E8=BE=91=E5=A4=9A=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/view/plugs.upfile.html | 20 +++++++++++--------- static/plugs/ueditor/ueditor.js | 4 ++-- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/application/admin/view/plugs.upfile.html b/application/admin/view/plugs.upfile.html index f4c502d6c..4e8f207d4 100644 --- a/application/admin/view/plugs.upfile.html +++ b/application/admin/view/plugs.upfile.html @@ -1,7 +1,7 @@ - {'app_name'|sysconf} {'app_version'|sysconf} + {:sysconf('app_name')} {:sysconf('app_version')} @@ -54,8 +54,7 @@ } function confirmSelected() { - var srcs = new Array(); - var md5s = new Array(); + var srcs = new Array(), md5s = new Array(); $('[data-md5] .success').map(function () { var $li = $(this).parents('[data-md5]'); md5s.push($li.attr('data-md5')); @@ -101,8 +100,7 @@ /*优化retina, 在retina下这个值是2*/ ratio = window.devicePixelRatio || 1, /*缩略图大小*/ - thumbnailWidth = 110 * ratio, - thumbnailHeight = 110 * ratio, + thumbnailWidth = 110 * ratio, thumbnailHeight = 110 * ratio, /*可能有pedding, ready, uploading, confirm, done.*/ state = 'pedding', /*所有文件的进度信息,key为file id*/ @@ -218,7 +216,11 @@ pick: { id: '#filePicker', label: '点击选择文件', - multiple: false + /*{if $mode === 'one'}*/ + multiple: false, + /* {else} */ + multiple: true, + /* {/if} */ }, accept: { title: '选择文件', @@ -227,18 +229,18 @@ }, formData: {}, /*{if $mode === 'one'}*/ - fileNumLimit: 1, auto: true, - /* {else /} */ + fileNumLimit: 1, + /* {else} */ auto: false, fileNumLimit: 300, /* {/if} */ + server: '{:url("admin/plugs/upload")}', swf: '__PUBLIC__/static/plugs/uploader/Uploader.swf', chunked: false, dnd: '#dndArea', paste: document.body, chunkSize: 512 * 1024, - server: '{:url("admin/plugs/upload")}', disableGlobalDnd: true, fileSizeLimit: 200 * 1024 * 1024, // 200 M fileSingleSizeLimit: 200 * 1024 * 1024, // 200 M diff --git a/static/plugs/ueditor/ueditor.js b/static/plugs/ueditor/ueditor.js index 1bcdd7edb..1fe4cb4c3 100644 --- a/static/plugs/ueditor/ueditor.js +++ b/static/plugs/ueditor/ueditor.js @@ -7,7 +7,7 @@ define(['zeroclipboard'], function (ZeroClipboard) { cssRules: 'background-position: -380px 0px;', onclick: function () { var field = '_editor_upload_' + Math.floor(Math.random() * 100000); - var url = window.ROOT_URL + '/index.php/admin/plugs/upfile/mode/one.html?uptype=qiniu&type=png,jpg,gif&field=' + field; + var url = window.ROOT_URL + '/index.php/admin/plugs/upfile.html?mode=one&type=png,jpg,gif,jpeg&field=' + field; $('').attr('name', field).appendTo(editor.container).on('change', function () { var srcs = this.value.split('|'), data = new Array(); for (var i in srcs) { @@ -37,7 +37,7 @@ define(['zeroclipboard'], function (ZeroClipboard) { cssRules: 'background-position: -726px -77px;', onclick: function () { var field = '_editor_upload_' + Math.floor(Math.random() * 100000); - var url = window.ROOT_URL + '/index.php/admin/plugs/upfile/mode/two.html?uptype=qiniu&type=png,jpg,gif&field=' + field; + var url = window.ROOT_URL + '/index.php/admin/plugs/upfile.html?mode=two&type=png,jpg,gif,jpeg&field=' + field; $('').attr('name', field).appendTo(editor.container).on('change', function () { var srcs = this.value.split('|'); setTimeout(function () {