Title: Tree improvement: Disable some nodes
Post by: ryupanqui on May 23, 2014, 06:58:20 PM
I'm using jQuery EasyUI 1.3.6 and I suggest that the tree has to include the editable field to indicate that some node is disabled changing its text color and not checkable or not clickable. I applied part of my suggestion in this code part of function named _b8: (Also see the result on the attached file) bind("click", function(e) { var tt = $(e.target); var _bd = tt.closest("div.tree-node"); if (!_bd.length) { return; } if (tt.hasClass("tree-hit")) { _125(_b9, _bd[0]); return false; } else { // - BEGIN EDIT var $tree = $(_b9); var optsTree = $tree.tree('options'); var node = $tree.tree('getNode', _bd[0]); if(node && node[optsTree.editableField] === false) return false; // - END EDIT if (tt.hasClass("tree-checkbox")) { _e8(_b9, _bd[0], !tt.hasClass("tree-checkbox1")); return false; } else { _16b(_b9, _bd[0]); _ba.onClick.call(_b9, _c0(_b9, _bd[0])); } } e.stopPropagation(); }
Title: Re: Tree improvement: Disable some nodes
Post by: azizkhani on January 16, 2015, 05:19:59 AM
I'm using jQuery EasyUI 1.3.6 and I suggest that the tree has to include the editable field to indicate that some node is disabled changing its text color and not checkable or not clickable. I applied part of my suggestion in this code part of function named _b8: (Also see the result on the attached file) bind("click", function(e) { var tt = $(e.target); var _bd = tt.closest("div.tree-node"); if (!_bd.length) { return; } if (tt.hasClass("tree-hit")) { _125(_b9, _bd[0]); return false; } else { // - BEGIN EDIT var $tree = $(_b9); var optsTree = $tree.tree('options'); var node = $tree.tree('getNode', _bd[0]); if(node && node[optsTree.editableField] === false) return false; // - END EDIT if (tt.hasClass("tree-checkbox")) { _e8(_b9, _bd[0], !tt.hasClass("tree-checkbox1")); return false; } else { _16b(_b9, _bd[0]); _ba.onClick.call(_b9, _c0(_b9, _bd[0])); } } e.stopPropagation(); }
hi ryupanqui i have this problem too i want to disabled some node for select or checked ??? ??? ??? :P :P how u solve your problem plz help me
|