1. #1
    Sencha User lfs2008's Avatar
    Join Date
    Oct 2010
    Location
    Russia
    Posts
    62
    Vote Rating
    6
    lfs2008 is on a distinguished road

      3  

    Default Ext.ux.grid.TriStateTree

    Ext.ux.grid.TriStateTree


    Features:
    1. Extends Ext.tree.Panel
    2. If a parent node is checked / unchecked, all its child nodes are automatically checked / unchecked too.
    3. If only some children of a node are selected, its checkbox remains checked, but with a third visual state, using a darkened background.
      * A single file (checkboxes.gif) defines all the three images.
    4. getSelections method returns list of checked data as objects for simple backend serialization as [{id: 123}, {id: 345} ...]
      * If called with parameter id_only (bool) - it returns list of checked data as [123, 345]
      * If ALL_ID value found, only ALL_ID returned. as [{id: 1}]
      * By default only leaf nodes id`s returned. You can configure it via 'returnLeafsOnly' property.
    5. setSelections method consumes list of IDS [123,456,789] or objects [{id: 123}, {id: 345}]
      * Pass ALL_ID value in input list to check all.

      DEMO AND SOURCES http://wap7.ru/folio/ext-tri-state-tree/

      Ext.ux.grid.TriStateTree extension.png
    Please share any thoughts. if it is a duplicated extension - please comment.

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,197
    Vote Rating
    482
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Nice job .. thank you for the contribution.

    Scott.

  3. #3
    Sencha User razvanioan's Avatar
    Join Date
    Feb 2008
    Location
    Romania
    Posts
    113
    Vote Rating
    2
    razvanioan is on a distinguished road

      0  

    Default


    Awesome man,

    This works even on ExtJS 5 !

    Thx

    Later edit:

    It seems that on the ExtJS 5 while hovering the mouse over the arrow expander, the disabledCls vanishes, and I think that's maybe they use set('cls') for that which overrides ours.....

    I was trying to use addCls to the view of the record like in the example bellow, but this has more issues because they are removed by the framework on collapse / expand of the nodes.....

    I'll keep trying to find THE solution, but I also think that this shouldn't happen and I've reported this as bug here (fiddle included).....

    PHP Code:
    isThirdState: function (node) {
          return 
    node.isThirdState;
          
    //return  node.get('cls') == this.disabledCls;
        
    },

        
    setThirdState: function (node) {    
          
    //node.set('cls', this.disabledCls);
          
    node.getOwnerTree().getView().addRowCls(nodethis.disabledCls);
          
    node.set('checked'false);
          
    node.isThirdState true;
        },

        
    unsetThirdState: function (node) {
          
    //node.set('cls', '');
          
    node.getOwnerTree().getView().removeRowCls(nodethis.disabledCls);
          
    node.isThirdState false;
        } 
    Last edited by razvanioan; 14 Sep 2014 at 9:01 AM. Reason: Small issue found although
    ---
    Razvan Ioan ANASTASESCU
    Senior WEB Developer

  4. #4
    Sencha User lfs2008's Avatar
    Join Date
    Oct 2010
    Location
    Russia
    Posts
    62
    Vote Rating
    6
    lfs2008 is on a distinguished road

      0  

    Default


    Hi! Please keep us informed about extjs5 bug status so i can update plugin if it is not a bug

  5. #5
    Sencha User razvanioan's Avatar
    Join Date
    Feb 2008
    Location
    Romania
    Posts
    113
    Vote Rating
    2
    razvanioan is on a distinguished road

      0  

    Default


    It seems that indeed was a bug the will be corrected in 5.0.2.

    Here it is: http://www.sencha.com/forum/showthre...49#post1066349

    Thanks once again !
    ---
    Razvan Ioan ANASTASESCU
    Senior WEB Developer