lanweijianlong / artdialog

Automatically exported from code.google.com/p/artdialog
0 stars 0 forks source link

还没有.icon的方法,建议加上。呵呵 #72

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

因为需要根据返回的内容动态的更改icon.自己看了源码。依葫
芦画瓢给改了。我贴一下代码
源码里  110行加上        .icon(config.icon);
然后加上这个方法
    //add by hen
    icon:function(ico){
            var DOM = this.DOM;
           var that = this,
             iconBg = ico && (_isIE6 ? {png: 'icons/' + ico + '.png'}  : {backgroundImage: 'url(\'' +that. config.path + '/skins/icons/' + ico + '.png\')'});
            DOM.icon[0].style.display = ico ? '' : 'none';
            DOM.iconBg.css(iconBg || {background: 'none'});
            return this;
    },

Original issue reported on code.google.com by libinwa...@gmail.com on 12 Mar 2013 at 6:19