Giter VIP home page Giter VIP logo

jstree's People

Contributors

0xaf avatar aj-dev avatar andtown avatar bct9321 avatar brunowinck avatar chrismhinsch avatar cmfcmf avatar duzun avatar farseeing avatar golikov avatar istrau3 avatar joaomariomz avatar karkhutvy avatar laurentgoderre avatar llorx avatar mike-koch avatar mroutput avatar muchiachio avatar myukselen avatar rajniszp avatar reiz avatar sashaaro avatar seb35 avatar spfng avatar stephanhoyer avatar studiomax avatar uxweb avatar vakata avatar vxsx avatar wu-wu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jstree's Issues

Tree loading with Async keeps Loading in IE

Hi, I have a tree that is configured as async to a servlet (json output), it works nice in firefox, but keeps always loading in internet explorer 7 in the first load (don't know what happens after because never load), there is a fix for this?

Here the config:
$(function () {
$("#jQueryTree").jstree({
"plugins" : [ "themes","json_data","ui"
],
"json_data" : {
"ajax" : {
"url" : "http://localhost:8084/JavaScriptSandbox/servlet",
"data" : function (n) {
return {
"operation" : "get_children",
"id" : n.attr ? n.attr("id").replace("node_","") : 1
};
}
}
}
})
});

And here is the output from the servlet:
{"data" : "Root", "id":"99", "state":"closed", "attr": {"id":"nodeX"}}

issue with item selection event

Hi
i am trying to use the select_node event (for ui plugin) for the opening a url in a new window which is specific to a node.

Everything works fine except in a specific scenario.

  1. open a parent node
  2. select a child node (this causes a new window to open in my case which is expected).
  3. minimize the parent node
    At this point the select_node event of the parent node is fired. (this causes a new window to open again which is not expected).
    so the select event is getting triggered for a minimize event.

localStorage versus sessionStorage

Developers should have the option to decide which storage to use. Since a tree can contain private information that should not stay in the browser, the use of sessionStorage might be better in some cases.

For example, my trees display emails and tasks. I want to put them in cache but I don't want to use localStorage for that.

Race condition when overwriting a tree shortly after creating it (w/fix)

Repro:
-Instantiate a tree on a given DOM node
-Immediately instantiate a new tree on the same node

Expected:
-Old tree is destroyed, new tree renders

Actual:
-Old tree is destroyed
-Null ref when calling "instances[instance_id].init();" asynchronously for destroyed tree (line 162 in my copy)

Fix:
-Wrap async call to init() in guard: "if (instances[instance_id]){ ... }"

jQuery 1.6.2 incompatibility

CRRM plugin does not work with jQuery 1.6.2.

The following does nothing:
$("#demo").jstree("rename");
$("#demo").jstree("remove");
$("#demo").jstree("create");
$("#demo").jstree("refresh");

Problem with jQuery 1.6.2

Hy,

I've found a problem with jQuery 1.6.2.
The refresh function does nothing.

ie : $('#tree').jstree('refresh');

This problem doesn't occur in v1.6.1.

Cheers

Bug in current position (data.rslt.cp)

This issue is reproducable on the PHP + mySQL demo on the jsTree demo page.

Example:

  • a (position 1)
  • b (position 2)
  • c (position 3)
    move c between a and b: cp=1
    move a between b and c: cp=2

The cp reports a different position even though the node is being dropped in the same place.
You will notice that the nodes now appear as expected: c, a, b.
Refresh the page in your browser.
You will now notice that the order of the nodes has changed to c, b, a.

This issue was initially reported by Daco Harkes in Feb 2010
https://groups.google.com/d/topic/jstree/AnZq7PYHYo0/discussion

jQuery 1.6.2 and function $.data()

rc3 is incompatible with jQuery 1.6.2 >> original source line 140 >> 1.6.2 failes to save the instance-id (please try to read back the instance-id directly after line 140 >> 1.6.2 will return "undefined" instead of 0 (i have also posted a bug on jQuery home page)

Generic:
$.data() accepts only a DOM-Node as parameter ... jsTree would be more robust if you don't use $.data(this,"jstree-instance-id") but $(this).data("jstree-instance-id") ... the second version works not only with this=DOM-Node but also with a jQuery-Object or a simple selector.

Expand/collapse issues on IE9

Thanks a lot for your library.

Nodes expand/collapse are not working with IE9. All nodes are expanded on load and collapse is not working. You can check this in the official demo as it's behaving the same way.

Cannot read property 'opened' of undefined

at line 1066 in jstree.core.js as of May 16 d is undefined.

                    var t = $(this),
                        d = t.data("jstree"),
                        s = (d && d.opened) || t.hasClass("jstree-open") ? "open" : (d && d.closed) || t.children("ul").length ? "closed" : "leaf";
                    if(d.opened) { d.opened = false; }
                    if(d.closed) { d.closed = false; }

Fixed with

                    var t = $(this),
                        d = t.data("jstree"),
                        s = (d && d.opened) || t.hasClass("jstree-open") ? "open" : (d && d.closed) || t.children("ul").length ? "closed" : "leaf";
                    if(d && d.opened) { d.opened = false; }
                    if(d && d.closed) { d.closed = false; }

usage of 'use_data' of plugin 'types'

Hi,
could you display a sample code or any sampler that shows the usage of the "use_data" attribute of the plugin "types".
I tried different methods of writing it, but just not able to get the hang of that attribute.

Thanks

set_theme doesn't work

Setting theme using function $(this).jstree("set_theme","apple"); doesn't work. It takes .css from style file and after that it switches automatically to default style. Using "themes" during initialization works fine.
In version jsTree 1.0-rc1 everything was find. In rc3 it doesn't work.

Search plugin with multi words support (solution in this post)

I needed to search for multiple words separated by spaces so I give you my function to add to search plugin (currently the search engine plugin only search for one word).

/*

  • jsTree search plugin

  • Enables both sync and async search on the tree

  • DOES NOT WORK WITH JSON PROGRESSIVE RENDER

    */

(function ($) {

// my function starts here
    $.expr[':'].jstree_contains_multi = function(a,i,m){

    var word, words = [];
    var searchFor = m[3].toLowerCase();
    if(searchFor.indexOf(' ') >= 0) {
        words = searchFor.split(' ');
    }
    else {
        words = [searchFor];
    }
    for (var i=0; i < words.length; i++) {
        word = words[i];
        if((a.textContent || a.innerText || "").toLowerCase().indexOf(word) >= 0) {
            return true;
        }
    }
    return false;

};

// my function ends here
$.expr[':'].jstree_contains = function(a,i,m){

    return (a.textContent || a.innerText || "").toLowerCase().indexOf(m[3].toLowerCase())>=0;

};

That's all

parse_json data fix

Hi Ivan,

This is a great project and you are to be congratulated! There is so much hard work you have put into what is a world class product.

Had some issue with the latest pre v1 release with the create_node function not accepting a JSON string that includes a data node which has an icon: ie

{ title : "Where is the icon?", data : { icon : "http://static.jstree.com/v.1.0rc/_docs/_drive.png" } }

After some debugging I modified the following line in parse_json within jstree.core.js from

if(node.data) { li.data(node.data); }

to

if(node.data) { li.data("jstree", node.data); }

This appears to have fixed the issue (unless I'm missing something). Thought this might help.

Cheers

Mike

Error when refreshing two times the same node

When refreshing one node the data jstree-is-loading is set to true, and when we refresh again the same node this data prevent the node to be refresh.

one solution that seems to work is to add :
obj.data("jstree-is-loading",false);
at line 534

autodetect themes path goes wrong

The autodetect of the themes path goes wrong sometimes.
If I include jstree using <script src="/javascripts/jstree/jquery.jstree.js?1297210634" type="text/javascript"></script> on a page like localhost/search/sequences it tries to load localhost/search/falsedefault/style.css on firefox 4.
In Google Chrome, everything loads fine. I'm using Mac OS X 10.6

UI Plugin broken

The UI plugin does not set up the tree as excpected from passing in options when building the tree.

The following options have been tested

'plugins' : [ 'core', 'themes', 'ui' ],
"ui": {
  "select_limit" : 1,
  "initially_select" : ["some_node_id"]
}

rc3 init-problem

rc3 original source line 504

if i load a tree with children but with root-node closed the array this.data.core.to_open[0] contains the invalid value '#' witch leads to an unhandled exception in jQuery-Core when calling "open_node" (Line 506) with this invalid value.
My current (well working) workaround is to set this.data.core.to_open to an empy array if '#' is found in this.data.core.to_open[0].

json_data fail with no error.

Using json_data result in seeing no menu at all.
Using the index.html in the same browser works.

    $("body div.other").jstree({
        //Node Data
        json_data: {
            data: function(n, apply){
                if(n === -1) {
                    getTree(function(nodeTree) {
                        apply(nodeTojsTree(nodeTree[0].children[1]));
                    });
                    return;
                }
            },
            progressive_render: true
        },

        //Restore Node Open/Closed
        localStorage: {
            save_loaded: "body div.other:loaded",
            save_opened: "body div.other:opened",
            save_selected: "body div.other:selected"
        },

        contextmenu: contextmenu,
        themes: themes,
        plugins: plugins
    });

valid_children не фильтрует запрещенные типы

Приветствую, Иван.
Я слегка изменил пример таким образом чтобы рутами могли быть только ноды типа "folder":
Но в результате ноды типа "question" все еще пытаются развернуться, несмотря на "valid_children" : "none". При этом видно, что картинка подцепилась (404.png ведет "вникуда") Использую jsTree 1.0-rc3:

$(function () {
        $("#tree").jstree({ 
            // List of active plugins
            "plugins" : [ 
                "json_data", "themes", "types"
            ],
            // the core plugin - not many options here
            "core" : {
            },
            // I usually configure the plugin that handles the data first
            // This example uses JSON as it is most common
            "json_data" : {
                // This tree is ajax enabled - as this is most common, and maybe a bit more complex
                // All the options are almost the same as jQuery's AJAX (read the docs)
                "ajax" : {
                    // the URL to fetch the data
                    "url" : "@{Tree.getChildren()}",
                    // the `data` function is executed in the instance's scope
                    // the parameter is the node being loaded 
                    // (may be -1, 0, or undefined when loading the root nodes)
                    "data" : function (n) { 
                        // the result is fed to the AJAX request `data` option
                        return {
                            "id" : n.attr ? n.attr("id").replace("node_","") : -1
                        }; 
                    }
                }
            },
            // Using types - most of the time this is an overkill
            // read the docs carefully to decide whether you need types
            "types" : {
                // I set both options to -2, as I do not need depth and children count checking
                // Those two checks may slow jstree a lot, so use only when needed
                "max_depth" : -2,
                "max_children" : -2,
                // I want only `folder` nodes to be root nodes 
                // This will prevent moving or creating any other type as a root node
                "valid_children" : [ "folder" ],
                "types" : {
                    // The question type
                    "question" : {
                        // I want this type to have no children (so only leaf nodes)
                        // In my case - those are questions
                        "valid_children" : "none",
                        "icon" : {
                            "image" : "404.png"
                        }
                    },
                    // The `folder` type
                    "folder" : {
                        // can have questions and other folders inside of it
                        "valid_children" : [ "question", "folder" ]
                    }
                }
            }
        });

    });

Пример передаваемого json для второго уровня:
[{"data":"test","attr":{"id":"1","rel":"question"},"state":"closed"},{"data":"123","attr":{"id":"2","rel":"question"},"state":"closed"}]

хостинг изображений

White lines in IE 9

Hi Ivan,
Thanks for your jstree, it helps me a lot.
I've just encountered an issue in IE 9. I use jstree with checkbox & ajax loading. Whenever I hover my mouse over a node item, if the node's value is longer than it container's width, IE 9 adds a white line below the tree. When I click the tree, all the white lines disappear. This problem happen only in IE 9. Could you please check it for me ?

Just the first two levels of the tree with checkboxes are checked correctly.

Plugin of checkboxes. Version: jsTree 1.0-rc3,

Bug in function _prepare_checkboxes or _repair_state.

Just the first two levels of the tree with checkboxes are checked
correctly.

I didnt understand the code, but maybe you have to
change .parent().parent() by a "while (has parernt)" in the line 2826.

When I comment the lines 2823, 2824 and 2825 checkboxes were checked
correctly, but I dont know the collateral effect of doing this. Lines
2823 and 2824 are too confuse, maybe the line 2824 need an "else"
clause too.

Also, I cant understand the difference between this and _this. Maybe
the code need to use just one of them or the _this variable need a
better name.

By the way, congratulation by the good jquery component.
Paulo

move_node()

I tried to copy a node programmiatically with: treeInstance.move_node(src,ref,'after',true) ... in most cases this works fine but if src===ref the node is not copied and the event (.bind('move_node'..) is not triggered.

Missing method 'is_loaded'

i found ._is_loaded in the docs but i missing a simple method .is_loaded(node) (like .is_open) witch tells me if a closed node has already loaded it's chilren (and it's only closed) or if the node need to load it's children when opening.
My Workaround works (but i don't like it because it's not safe to work in the next version)

var li = jQuery(some_node_id);
var childrenAlreadyLoaded = li.length===1&&li.children('ul').length>0;

IE8 Expand/Collapse Issue

In IE8 when attempting to expand items there is a bug that occasionally happens upon page load where the expand/collapse icons will not perform their appropriate actions. Clicking on them will produce no behavior and no error will be thrown.

Interestingly this may somehow be associated with the scroll position of the window. The bug seems to crop up more often when scrolling the window before jsTree is fully initialized, and having the scroll position be mid-page when getting to a location through the Back button causes the bug to appear almost always. Without refreshing the window, one can then scroll to the top of the window and the bug will disappear. One can scroll back down and the bug will reappear.

The following link shows a demonstration of the bug in action: http://www.youtube.com/watch?v=ScYTk2dc0e8

[html_data] ajax call to retrieve zero children bug

Version: 1.0-rc3

When I use html_data to dynamically retrieve child nodes as parents are opened, this works fine, however, when I want to return NOTHING, I ran in to the following, which seems like a bug to me:

html_data: {
  ...
  ajax: {
    ...
    success: function (data) {
      ...
      if ($('#someid', data).length==0) return;

This causes all sorts of mayhem (in my case infinite reloading of the ajax call), I found out that by returning ' ' (i.e. any number of spaces), it behaves as expected. I'd expect this to also work if null or undefined or '' is returned.

Types plugin - IE 8/9

Hi,

I am currently building a plugin for Oracle APEX 4.0 based on jstree. There's already a native tree plugin inside APEX but it's using an old beta version of jstree.

How things works:
The HTML pages are rendered by PL/SQL. Inside a jQuery UI Accordion menu, I want to create many trees.

  1. I am using "JSON_DATA plugin" to get the nodes of my trees. At render time, the DOM already have the first level of nodes (root). Also, the DOM contains the object to set the "types plugin".

Example of the variables:

var arbre_ajax_R8423316772622788_json = [{"attr":{"id":"R8423316772622788_C21","rel":"COMPT_COURL"},"data":{"title":"Support [Partagé]","attr":{"href":""}},"state":"open","children":[{"attr":{"id":"R8423316772622788_D7786","rel":"BOITE_RECPT"},"data":{"title":"Boite de réception","attr":{"href":""}}},{"attr":{"id":"R8423316772622788_D7789","rel":"BOITE_ENVOI"},"data":{"title":"Boîte d'envoi","attr":{"href":""}}},{"attr":{"id":"R8423316772622788_D7788","rel":"MESG_ENVOY"},"data":{"title":"Messages envoyés","attr":{"href":""}}},{"attr":{"id":"R8423316772622788_D7787","rel":"BROUI"},"data":{"title":"Brouillons","attr":{"href":""}}},{"attr":{"id":"R8423316772622788_D7790","rel":"COUR_INDES"},"data":{"title":"Courrier indésirable","attr":{"href":""}}},{"attr":{"id":"R8423316772622788_D7791","rel":"CORBL"},"data":{"title":"Corbeille","attr":{"href":""}}}]}];

var arbre_ajax_R8423316772622788_json_type_noeud = {valid_children:"all",type_attr:"rel",types:{"cour_indes":{valid_children:"all",select_node:true,open_node:false,close_node:false,create_node:false,delete_node:false,icon:{image:"/res/sem/images/cour_indes.png"}},"boite_envoi":{valid_children:"all",select_node:true,open_node:false,close_node:false,create_node:false,delete_node:false,icon:{image:"/res/sem/images/boite_envoi.png"}},"broui":{valid_children:"all",select_node:true,open_node:false,close_node:false,create_node:false,delete_node:false,icon:{image:"/res/sem/images/broui.png"}},"mesg_envoy":{valid_children:"all",select_node:true,open_node:false,close_node:false,create_node:false,delete_node:false,icon:{image:"/res/sem/images/mesg_envoy.png"}},"corbl":{valid_children:"all",select_node:true,open_node:false,close_node:false,create_node:false,delete_node:false,icon:{image:"/res/sem/images/corbl.png"}},"compt_courl":{valid_children:"all",select_node:true,open_node:true,close_node:true,create_node:false,delete_node:false,icon:{image:"/res/sem/images/compt_courl.png"}},"boite_recpt":{valid_children:"all",select_node:true,open_node:false,close_node:false,create_node:false,delete_node:false,icon:{image:"/res/sem/images/boite_recpt.png"}}}};

For FF and Chrome, the nodes have the correct icons. Things are different in IE 8/9. Icones are the default one.

Thanks for you help,
Louis-Guillaume

Problem with the calculated position after a move

Hello,

First, thanks a lot for this great plugin!
I'm having trouble with the calculated position returned when a node is moved :

  • if i move the node upwards, the position is 0-indexed
  • if i move the node downwards, the position is 1-indexed.

For example :
root
child 1
child 2
child 3

If i move child 2 before child 1, I get : data.rslt.cp = 0
If i move child 1 after child 2, i get : data.rslt.cp = 2 instead of 1

Do you have any idea where the problem can come from ?
Thanks a lot for your help.

Custom node html causes issues when jstree.dnd tries to find the anchor element

Hi

First of all, thanks for this awesome plugin!

My tree outputs extra elements so that it can have columns on the right with check boxes for stuff. It looks like this:

<li class="jstree-leaf">
  <div class="page">
    <div class="col1" style="width: 635px;">
      <a href="#" class="title">Testing</a>
    </div>
    <div class="col2">
      <div class="actions"></div>
      <div class="published"><input type="checkbox" value="1" name="published" id="published"></div>
    </div>
  </div>
</li>

The problem occurs when using the dnd plugin (with html_data and themes) and you start to drag an element. It can't find the first child anchor because it's inside a div and it fails - https://github.com/vakata/jstree/blob/v.pre1.0/jquery.jstree.js#L801 I'm using the downloaded pre1 code from the site.

I had to change it to obj = obj.find("a:first"); for it to work with my app. This selector (.children("a:eq(0)")) is used 8 times in the app, do you think it could be made configurable? Or is there a better solution I'm not seeing?

Thanks

Incorrect json attr documentation

On the page http://www.jstree.com/documentation/json_data it say this
// omit attr if not needed; the attr object gets passed to the jQuery attr function
4 "attr" : { "id" : "node_identificator", "some-other-attribute" : "attribute_value" },

but that does not work for me... I found this doco in the code

// you can manipulate the output
> { "title" : "The title of the parsed node", "li_attr" : { "id" : "id_for_li" }, "a_attr" : { "href" : "http://jstree.com" } }

So adding the following to my code I was able to set the id of the li "li_attr" : { "id" : "id_for_li" }.

Can you please update the doco if the attr does not work anymore.

thanks
Raf

Using localStorage instead of cookie

localStorage is made to store Client code information, Cookie is better use to store information that need to be shared with the server. So i think that to store Open/Selected node the default should be localStorage instead.

/*
 * jsTree storage plugin
 * Stores the currently opened/selected nodes in a localStorage and then restores them
 */
(function ($) {
    $.jstree.plugin("localStorage", {
        __init : function () {
            if(typeof localStorage === "undefined") { throw "jsTree localStorage: localStorage is not supported by your browser."; }

            var s = this._get_settings().localStorage;
            var tmp;

            if(!!s.save_loaded) {
                tmp = localStorage.getItem(s.save_loaded);
                if(tmp && tmp.length) { this.data.core.to_load = tmp.split(","); }
            }
            if(!!s.save_opened) {
                tmp = localStorage.getItem(s.save_opened);
                if(tmp && tmp.length) { this.data.core.to_open = tmp.split(","); }
            }
            if(!!s.save_selected) {
                tmp = localStorage.getItem(s.save_selected);
                if(tmp && tmp.length && this.data.ui) { this.data.ui.to_select = tmp.split(","); }
            }
            this.get_container()
                .one( ( this.data.ui ? "reselect" : "reopen" ) + ".jstree", $.proxy(function () {
                    this.get_container()
                        .bind("open_node.jstree close_node.jstree select_node.jstree deselect_node.jstree", $.proxy(function (e) { 
                                if(this._get_settings().localStorage.auto_save) { this.save_node((e.handleObj.namespace + e.handleObj.type).replace("jstree","")); }
                            }, this));
                }, this));
        },
        defaults : {
            save_loaded     : "jstree_load",
            save_opened     : "jstree_open",
            save_selected   : "jstree_select",
            auto_save       : true,
            localStorage_options    : {}
        },
        _fn : {
            save_node : function (c) {
                if(this.data.core.refreshing) { return; }
                var s = this._get_settings().localStorage;
                if(!c) { // if called manually and not by event
                    if(s.save_loaded) {
                        this.save_loaded();
                        localStorage.setItem(s.save_loaded, this.data.core.to_load.join(","));
                    }
                    if(s.save_opened) {
                        this.save_opened();
                        localStorage.setItem(s.save_opened, this.data.core.to_open.join(","));
                    }
                    if(s.save_selected && this.data.ui) {
                        this.save_selected();
                        localStorage.setItem(s.save_selected, this.data.ui.to_select.join(","));
                    }
                    return;
                }
                switch(c) {
                    case "open_node":
                    case "close_node":
                        if(!!s.save_opened) {
                            this.save_opened(); 
                            localStorage.setItem(s.save_opened, this.data.core.to_open.join(","));
                        }
                        if(!!s.save_loaded) {
                            this.save_loaded(); 
                            localStorage.setItem(s.save_loaded, this.data.core.to_load.join(",")); 
                        }
                        break;
                    case "select_node":
                    case "deselect_node":
                        if(!!s.save_selected && this.data.ui) { 
                            this.save_selected(); 
                            localStorage.setItem(s.save_selected, this.data.ui.to_select.join(",")); 
                        }
                        break;
                }
            }
        }
    });
    // include localStorage by default
    $.jstree.defaults.plugins.push("localStorage");
})(jQuery);

edit: tried to fix code formating issue.
edit2: found how to properly use "GitHub Flavored Markdown"

Problem with submitted checkboxes while two_state option is set to true.

Hello,

I have run into a problem while using the checkbox plugin of jstree. I have set the options "real_checkboxes" and "two_state". Now when I submit my form containing the jstree, I am expecting to get only the selected checkboxes. Unfortunately this is not the case. The problem is as follows.

Step 1: Load the tree
Step 2: Check a root node
Step 3: Open the root node
Step 4: Close the root node
Step 5: Submit the form

As mentioned before I am expecting only the selected root node to be submitted but I am getting the root node and all its children.

I hope the description is helpful enough to reproduce the problem.

Kind regards
René

Types plugin error

When using type plugin, I create new type with "rename_node" = false, it work on UI (it's auto rollback to old name) but it does not prevent call "rename_jstree" (bind function) (in this function, I call ajax request to rename on server)

I think if flag "rename_node" = false turn on, it should prevent rename on UI (do not rename by command or hotkey, do not change node to textbox), and prevent call "rename_jstree"

Context menu location is wrong

Hi,

I have a tree with many nodes so page has scrollbars. If this page is hosted in an iFrame (IE7/8), then scrolling the iframe and right clicking the node shows the context menu way up higher (hidden from view). Is it possible to fix this?

Thanks,
T Singh

refresh issues with jquery 1.6.1

I am not sure what exactly jquery developers have changed in 1.6 but when I make refresh of node (using ajax plugin btw), all my children disappear, parent (the node which is getting refreshed) acts as open. When I close it and open again, I get infinite loading. However, out of curiousity (I was not sure If I had smth wrong or not, so I tried smth because before it was working) I switched back to jquery 1.4.4 and refresh function was working as expected (children are gone, loading appears and new list of children is there as expected). also using $("selector").jstree('refresh', -1); like in demo seems to work ok.
I also tried it in your demo, it works ok with jquery in ur zip (v1.5) but when I switched it with 1.6.1 version, it just doesnt work

theme configuration problem

I'm want to use "classic" theme with no "dots" visible and no "icons" visibile.

The following code doesn't work, "default" theme is used with icons and dots:

jQuery('#prova').jstree({
plugins : [ "themes", "html_data" ],
themes : { theme: "classic", dots : false, icons : false }
});

If I add "ui" in the plugins list then "classic" theme works, but dots and icos are still visible:

jQuery('#prova').jstree({
plugins : [ "themes", "html_data", "ui" ],
themes : { theme: "classic", dots : false, icons : false }
});

Why?

creating node fails with types plugin

When I use "types" plugin I am not able to create new node (using "context menu" plugin for that), without "types" plugin it works like a charm. All my types have unlimited depth, unlimited amount of children and can contain all types.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.