我正在使用JSAjaxFileUploader,但找不到任何选项显示一个又一个文件上传的缩略图,因为它自动滑出。
在文档中也没有这方面的选项。
发布于 2015-03-24 09:09:37
由于插件中没有这样的功能,我们将不得不编辑核心插件文件。
在JSAjaxFileUploader.js文件中,可以找到以下一行:
$eml.slideUp(settings.closeAnimationSpeed,function(){$eml.remove();});删除这一行,然后添加以下内容:
$('.JSOprIcons img[title="Stop Upload"]', $eml).remove();
$('.JSpercent', $eml).html('Uploaded');
$('.JSProgressBarParent', $eml).remove();
var thisFileSize = $('.JSsize', $eml).html();
var thisFileSizeShort = thisFileSize.substr(0, thisFileSize.indexOf('/'));
$('.JSsize', $eml).html(thisFileSizeShort);我将多个文件选项设置为默认值,因此我还将添加以下代码:
$('form ul.JSpreveiw li:not(:last-child)').slideUp(settings.closeAnimationSpeed,function(){$('form ul.JSpreveiw li:not(:last-child)').remove()});但是,如果将多个文件设置为大于1,则相应地更改此代码。
https://stackoverflow.com/questions/29228641
复制相似问题