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

AddFolder stores wrong folder path in data-path #465

Open
JosHuybrighs opened this issue Mar 4, 2016 · 0 comments
Open

AddFolder stores wrong folder path in data-path #465

JosHuybrighs opened this issue Mar 4, 2016 · 0 comments

Comments

@JosHuybrighs
Copy link

When adding a folder the path to the new folder is not constructed correctly.
The code that is currently in master (and also in 2.4.0, which I am using) is:

var addFolder = function(parent, name) {
        var newNode = '<li class="directory collapsed"><a data-path="' + parent + name + '/" href="#">' + name + '</a><ul class="jqueryFileTree" style="display: block;"></ul></li>';
        var parentNode = $('#filetree').find('a[data-path="' + parent + '"]');
    ...

Must be:

var addFolder = function(parent, name) {
    var dataPath = parent + '/' + name;
    var newNode = '<li class="directory collapsed"><a data-path="' + dataPath + '/" href="#">' + name + '</a><ul class="jqueryFileTree" style="display: block;"></ul></li>';
    var parentNode = $('#filetree').find('a[data-path="' + parent + '"]');
    ...

Unless I'am overlooking something?

Best regards,
Jos

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