Skip to forum content

Mif

— mystic javascript interface

You are not logged in. Please login or register.


Post new reply

Post new reply

Compose and post your new reply

You may use: BBCode Images Smilies

All fields labelled (Required) must be completed before the form is submitted.

Required information for guests



Captcha image. Turn pictures on to see it.
Required information
Optional post settings

Topic review (newest first)

1

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;
    };