jQWidgets Forums

jQuery UI Widgets Forums Navigation Tree problem with 'addTo' function

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 12 years, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • problem with 'addTo' function #15165

    bartsimp
    Member

    hi,
    I’ve two tree:

    <div id='jqxTreeSrc' style="float:left;">
    <ul>
    <li id="1" parentId="-1">Sport
    <ul>
    <li id="2" parentId="1">Tennis</li>
    <li id="3" parentId="1">Basket</li>
    </ul>
    </li>
    </div>
    <div id='jqxTreeDst' style="float:left;">
    </div>

    If I use
    $(“#jqxTreeDst”).jqxTree(‘addTo’, item);
    to add an item from jqxTreeSrc to jqxTreeDst, the destination tree don’t preserve the attribute parentId.

    I think that the problem is in _parseItem function called by addTo which does not take account of that attribute.

    Do you plan to fix it?

    problem with 'addTo' function #15167

    Peter Stoev
    Keymaster

    Hi bartsimp,

    The ‘addTo’ method is supposed to be used in the way demonstrated in this sample: settings.htm. To add an item as a sub item, you need to pass the sub item’s element as parameter to the “addTo” method, too.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    problem with 'addTo' function #15213

    bartsimp
    Member

    Hi Peter,

    I’ve some problem with the “settings.htm” sample:
    after to remove all the nodes with the “remove” button, if you click “add” button nothing happen

    Maybe a bug?

    Thanks

    problem with 'addTo' function #15216

    Peter Stoev
    Keymaster

    Hi bartsimp,

    You can see in the sample that when the “Add” button is clicked, a tree item is added as a sub item of the selected tree item. When you remove all items, there is no longer a selected item so clicking the button will not add items.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.