1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    44
    Vote Rating
    0
    alex1er is on a distinguished road

      0  

    Default Treepanel and folder icon

    Treepanel and folder icon


    Hi!

    I've got a question for you :


    I have a tree panel which work fine ( thanks Jack! ) but it still a little problem.

    I set an icon to a node with cls and it's OK. The problem is when its node has a child, the icon become the folder icon. I don't want it. I'de like to keep my custom icin, even if the node has a child.

    Is there a way to do it or not?

    Thanks for your response.

  2. #2
    Ext User
    Join Date
    Mar 2007
    Posts
    9
    Vote Rating
    0
    maerteijn is on a distinguished road

      0  

    Default


    That is because the node gets the 'folder' class per default if it has or gets childnodes.

    You can offcourse change the folder class in the stylesheet, or you can override the updateExpandIcon function to change the behaviour as you want it.


    Good luck!

  3. #3
    Ext User
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    58
    Vote Rating
    0
    Micha is on a distinguished road

      0  

    Default


    $nodes[] = array('text' =>'foo', id=>'bar', cls=>'folder'), change it to your class in your backend

  4. #4
    Ext User
    Join Date
    Mar 2007
    Posts
    44
    Vote Rating
    0
    alex1er is on a distinguished road

      0  

    Default


    OK Thanks.

    How can i overwrite this method. Can you write an example please?

    Thanks

  5. #5
    Ext JS Premium Member simeon's Avatar
    Join Date
    Mar 2007
    Location
    Austin, Texas
    Posts
    227
    Vote Rating
    1
    simeon is on a distinguished road

      0  

    Default


    Add
    "cls": "message"
    to your Json

    This will over ride the icon for both open and closed node.

    Code:
    .message .x-tree-node-icon {
      background-image:url(images/hotline_tree_icons.png);
      background-position: 64px 0px; 
    }
    Note the above css uses a sprite image for all of the tree icons for performance. If yours is just a single gif you don't need the bckground-position,


    If you wanted to use a different icon for the default expanded I used this:

    Code:
    .x-tree-node-expanded .x-tree-node-icon {
      background-image:url(images/hotline_tree_icons.png);
      background-position: 128px 0px; 
    }

    Simeon

Similar Threads

  1. Hiding the Menu Icon
    By jon.whitcraft in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 21 May 2011, 5:47 PM
  2. Minor css bug date icon
    By glauff in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 22 Feb 2007, 4:25 PM
  3. Tree: Turning a leaf into a folder?
    By eargang in forum Ext 1.x: Help & Discussion
    Replies: 8
    Last Post: 19 Feb 2007, 6:48 PM
  4. Tree folder becomes leaf
    By seldon in forum Ext 1.x: Help & Discussion
    Replies: 6
    Last Post: 6 Jan 2007, 4:38 PM
  5. UpdateManager wait icon
    By techno_adi in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 6 Nov 2006, 6:33 AM

Thread Participants: 3

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi