diff --git a/_src/core/Editor.js b/_src/core/Editor.js index 5caadbd511a715c249db6e6f919d3afb2ac4742d..0b731885dc4fbb00223d84bc16254efffcfc4e80 100644 --- a/_src/core/Editor.js +++ b/_src/core/Editor.js @@ -428,7 +428,7 @@ container.style.zIndex = options.zIndex; var additionCssHtml = []; - for(var i in options.iframeCssUrlsAddition){ + for(var i of options.iframeCssUrlsAddition){ additionCssHtml.push("") } var html = diff --git a/dialogs/wordimage/wordimage.html b/dialogs/wordimage/wordimage.html index 0d743d88be21754eb8ddb99c13fbdcccd9e8ae13..4df2162ca6510184c15759df3e6b6645aebe2992 100755 --- a/dialogs/wordimage/wordimage.html +++ b/dialogs/wordimage/wordimage.html @@ -97,7 +97,7 @@
- +
复制路径
@@ -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) {