Sha256: bbc258fb9ef5428a4201ae2d8649c85dc190efac44774ce58e9c3b02f841c7af

Contents?: true

Size: 723 Bytes

Versions: 7

Compression:

Stored size: 723 Bytes

Contents

$(function() {
    var $tree = $('#tree1');
    $tree.tree({
        data: ExampleData.example_data,
        autoOpen: true
    });
    $tree.bind(
        'tree.click',
        function(e) {
            // Disable single selection
            e.preventDefault();

            var selected_node = e.node;

            if (selected_node.id == undefined) {
                console.log('The multiple selection functions require that nodes have an id');
            }

            if ($tree.tree('isNodeSelected', selected_node)) {
                $tree.tree('removeFromSelection', selected_node);
            }
            else {
                $tree.tree('addToSelection', selected_node);
            }
        }
    );
});

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
iqvoc-4.12.1 vendor/assets/bower_components/jqtree/static/examples/multiple_select.js
iqvoc-4.12.0 vendor/assets/bower_components/jqtree/static/examples/multiple_select.js
iqvoc-4.11.1 vendor/assets/bower_components/jqtree/static/examples/multiple_select.js
iqvoc-4.11.0 vendor/assets/bower_components/jqtree/static/examples/multiple_select.js
iqvoc-4.10.0 vendor/assets/bower_components/jqtree/static/examples/multiple_select.js
iqvoc-4.9.0 vendor/assets/bower_components/jqtree/static/examples/multiple_select.js
iqvoc-4.8.2 vendor/assets/bower_components/jqtree/static/examples/multiple_select.js