EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: crosemffet on November 23, 2012, 03:31:53 AM



Title: async tree and iconCls
Post by: crosemffet on November 23, 2012, 03:31:53 AM
I'm making async tree successfully.
server script is:
while($row = pg_fetch_array($rs)){
   $node = array();
   $node['id'] = $row['id'];
   $node['text'] = $row['uname'];
   $node['iconCls'] = 'myCustomIcon.gif'; //not working
   array_push($result,$node);
}
sending from the server the parameter $node['iconCls']='myCustomIcon.gif' is not working. always shows me the default icon.
so the question is: where should I place myCustomIcon.gif to work? is my code ok? is ok to send the custom icon this way?
thanks in advance for your comments,


Title: Re: async tree and iconCls
Post by: crosemffet on November 23, 2012, 02:24:17 PM
oops !. sorry, finally I've made it. my mistake, it works like a charm.
solution (just in case other needs): define in jquery/themes/icons.css the icon you want to use with this syntax:
.icon-myIcon{background:url('icons/myIcon.gif') no-repeat;}
then refer it as:
$node['iconCls'] = 'icon-myIcon';