Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add node argument to the toDict() callback #465

Closed
mar10 opened this issue Jul 17, 2015 · 0 comments
Closed

Add node argument to the toDict() callback #465

mar10 opened this issue Jul 17, 2015 · 0 comments

Comments

@mar10
Copy link
Owner

mar10 commented Jul 17, 2015

Inspired by this Stackoverflow question: http://stackoverflow.com/q/31440102/19166.
If we add a second argument to the callback, the usecase should work:

    var d = tree.toDict(true, function(dict, node){
        console.log('looking at ' + node.title);
        var tdList = $('>td', node.tr);
        /* read the attributes */
        dict.attr = { 
            ctime : tdList.eq(2).find("input").val(),
            filesize : tdList.eq(3).find("input").val(),
            user : tdList.eq(4).find("input").val(),
            group : tdList.eq(5).find("input").val(),
            permissions : tdList.eq(6).find("input").val()
        };
    });
@mar10 mar10 closed this as completed in 4e0d0b2 Jul 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant