eyoucms上传多图,改为图片列表最后插入

admin2年前eyoucms818

application/admin/template/field/modelfield.htm 270行修改为

function {$vo.fieldArr}_{$vo.name|default=''}_call_back(paths){
                        var  last_div = $(".{$vo.fieldArr}_{$vo.name|default=''}_upload_tpl").html();
                        var index = 0;
                        for (var i=0;i<paths.length ;i++ )
                        {
                            if($("#tab_{$vo.fieldArr}_{$vo.name|default=''}").find(".fieldext_upload").length > 1) index = -2;
                            if(index == 0) {
                                $("#tab_{$vo.fieldArr}_{$vo.name|default=''}").find(".fieldext_upload:eq("+index+")").before(last_div);
                            }else {
                                $("#tab_{$vo.fieldArr}_{$vo.name|default=''}").find(".fieldext_upload:eq("+index+")").after(last_div);
                            }
                              // 插入一个 新图片
                            $("#tab_{$vo.fieldArr}_{$vo.name|default=''}").find(".fieldext_upload:eq("+index+")").find('a:eq(0)').attr('href',paths[i]).attr('onclick','').attr('target', "_blank");// 修改他的链接地址
                            $("#tab_{$vo.fieldArr}_{$vo.name|default=''}").find(".fieldext_upload:eq("+index+")").find('img').attr('src',paths[i]);// 修改他的图片路径
                            $("#tab_{$vo.fieldArr}_{$vo.name|default=''}").find(".fieldext_upload:eq("+index+")").find('a:eq(1)').attr('onclick',"{$vo.fieldArr}_{$vo.name|default=''}_ClearPicArr2(this,'"+paths[i]+"')").text('删除');
                            $("#tab_{$vo.fieldArr}_{$vo.name|default=''}").find(".fieldext_upload:eq("+index+")").find('input').val(paths[i]); // 设置隐藏域 要提交的值
                        }             
                    }


相关文章

eyoucms伪静态URL增加短横线-

路径core/library/think/Route.php$replace[] = '(' . (isset($pattern[$name]) ? $pattern[$name] :...

eyoucms修复文章内页 上一条下一条BUG

<?php/** * 易优CMS * ====================================================================...

eyoucms伪静态URL添加详情页自定义文件名

application/helper.php474$vars = array(                 ...

layui+eyou生成多个二维码

layui+eyou生成多个二维码...

织梦,dedecms,导入到EYOU

<?phpheader("Content-type:text/html;charset=utf-8");$con = mysqli_connect("localho...

dwkj 我们想听到您的声音 手机版

{eyou:guestbookform typeid='18'}     {eyou:static file="...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。