织梦联动枚举字段无二级时去掉多余下拉

纠结的童学肯定遇到过,当你添加自定义联动菜单后,如果你只有一级联动,那么添加文章时,系统会多出一个下拉为二级联动。

解决方法

打开/images/enums.js 找到

//if(sonvalue > 0 || topvalue > 0) {

改成

if(sonvalue > 0 || topvalue > 0) {

再找到

document.getElementById('span_'+emname+'_sec').appendChild(selObj);

改成

document.getElementById('span_'+emname+'_sec').appendChild(selObj);
}

再找到

document.getElementById('span_'+emname+'_son').appendChild(oj);

改成

if(oj.options.length>2)
{
    document.getElementById('span_'+emname+'_son').appendChild(oj);
}

猜你喜欢

转载自www.cnblogs.com/dedevip/p/9902310.html
今日推荐