Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

js dynatree plugin from <ul> structure - disable radiobutton selection if its root nodes

I want to disable selection of all nodes, except leafs. I mean, user should be able to select (radiobutton check) nodes only if it's leaf node of the tree. I see the docs and is indicated to use:

{title: "Sub-item 4.3 (hideCheckbox)", hideCheckbox: true },

But it's usefull if you create a tree from js data. I created the tree using an

    markup. I think, the solution is near if using:
    <li data='....'>Text Node
    

    Thanks in advance!

    like image 518
    jfunez Avatar asked Dec 21 '25 00:12

    jfunez


    1 Answers

    The data attribute is parsed as JSON, and then used to expand the data options, so

    <li data='"hideCheckbox": true'>Text Node
    

    should work.

    like image 124
    mar10 Avatar answered Dec 23 '25 16:12

    mar10



    Donate For Us

    If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!