Topic: 1 Line of display code for highlighting control
Hey,
Could you change Mif.Tree.Draw.getHTML to include the below span tag and class? This allows me to highlight the node image and text like they do in vista. Let me know what ya think.
Thanks!
Will
Code: All i did was add a span tag with the class 'mif-tree-node-content-wrapper'
Mif.Tree.Draw.getHTML = function(node,html){
var prefix=node.tree.DOMidPrefix;
if($defined(node.state.checked)){
if(!node.hasCheckbox) node.state.checked='nochecked';
var checkbox='<span class="mif-tree-checkbox mif-tree-node-'+node.state.checked+'" uid="'+node.UID+'">'+Mif.Tree.Draw.zeroSpace+'</span>';
}else{
var checkbox='';
}
html=html||[];
html.push(
'<div class="mif-tree-node ',(node.isLast() ? 'mif-tree-node-last' : ''),'" id="',prefix,node.UID,'">',
'<span class="mif-tree-node-wrapper ',node.cls,'" uid="',node.UID,'">',
'<span class="mif-tree-gadjet mif-tree-gadjet-',node.getGadjetType(),'" uid="',node.UID,'">',Mif.Tree.Draw.zeroSpace,'</span>',
'<span class="mif-tree-node-content-wrapper" uid="',node.UID,'">',
checkbox,
'<span class="mif-tree-icon ',node.closeIcon,'" uid="',node.UID,'">',Mif.Tree.Draw.zeroSpace,'</span>',
'<span class="mif-tree-name" uid="',node.UID,'">',node.name,'</span>',
'</span>',
'</span>',
'<div class="mif-tree-children" style="display:none"></div>',
'</div>'
);
return html;
};Last edited by wbarnes (2009-04-15 20:02:55)