EasyUI Forum
June 21, 2024, 01:34:41 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: async tree and iconCls  (Read 8298 times)
crosemffet
Jr. Member
**
Posts: 68



View Profile WWW Email
« 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,
Logged
crosemffet
Jr. Member
**
Posts: 68



View Profile WWW Email
« Reply #1 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';
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!