复制路径
@@ -191,10 +191,7 @@
url: res.url,
title: '',
});
- if ($('#fileUrl').val().indexOf(file.name) >= 0) {
- $('#fileUrl').val(res.url);
- $('.image-tip').html('
转存成功,请提交确认');
- }
+ $('.image-tip').html('
图片'+imageUrls.length+'('+file.name+')'+'转存成功');
} else {
$('.image-tip').html('上传失败:' + JSON.stringify(res))
}
@@ -205,6 +202,9 @@
$('.image-tip').html('上传失败:' + JSON.stringify(res))
}
});
+ uploader.on('uploadFinished', function () {
+ $('.image-tip').html('
转存成功,请提交确认');
+ });
utils.domReady(function () {
var options = {};
var callbacks = {};
diff --git a/dialogs/wordimage/wordimage.js b/dialogs/wordimage/wordimage.js
index b8f5cb17b69aa077fa35a23ebee5dc6c19da52ea..08c8604026ece0d36eee29a0b0597074f6031199 100755
--- a/dialogs/wordimage/wordimage.js
+++ b/dialogs/wordimage/wordimage.js
@@ -17,13 +17,8 @@ wordImage.init = function (opt, callbacks) {
function addUploadButtonListener() {
g('saveFile').addEventListener('change', function () {
- if (this.files.length !== 1) {
- alert('请选择1个文件')
- return;
- }
$('.image-tip').html('正在转存,请稍后...');
- var file = this.files[0];
- uploader.addFile(file);
+ uploader.addFile(this.files);
uploader.upload();
});
}
@@ -75,6 +70,13 @@ function showLocalPath(id) {
path = path.substring(0, path.lastIndexOf(separater) + 1);
g(id).value = path;
+ //增提醒用户选择哪些文件
+ var names = [];
+ for (let i = 0, len = images.length; i < len; i++) {
+ var img = images[i];
+ names.push(img.substring(img.lastIndexOf(separater) + 1, img.length));
+ }
+ $('.image-tip').html('请选择:' + names.join("、") + "共" + images.length + '个文件');
}
function createCopyButton(id, dataFrom) {