phpcms添加文章内容怎么不弹出窗口

phpcms添加文章,默认会打开新的浏览器窗口,这样体验很不友好。
找到statics/js/admin_common.js文件,大概在29行找到openwinx方法,改成下面的即可

function openwinx(url,name,w,h) {
        if(!w) w=screen.width-4;
        if(!h) h=screen.height-95;
        url = url+'&pc_hash='+pc_hash;
    if(url.indexOf('m=content&c=content&a=add') > -1 || url.indexOf('m=content&c=content&a=edit') > -1) {
        window.open(url,'_blank');
    } else {
        window.open(url,name,"top=100,left=400,width=" + w + ",height=" + h + ",toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no");
    }
}

这样添加文章的时候就不会弹出新的浏览器窗口了,就会在本浏览器窗口中打开添加界面。

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: