EasyUI Forum
November 08, 2025, 10:23:10 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / General Discussion / Re: Tree => getChecked(checked + indeterminate) on: June 14, 2013, 02:15:51 AM
Please try the updated tree plugin http://www.jeasyui.com/easyui/plugins/jquery.tree.js and then use the code below to retrieve checked and indeterminate nodes.
Code:
var nodes = $('#tt').tree('getChecked', ['checked','indeterminate'];
console.log(nodes)

Code:
var nodes = $('#tt').tree('getChecked', ['checked','indeterminate']);
returns an empty array.
while
Code:
var nodes = $('#tt').tree('getChecked', ['checked']);
and
Code:
var nodes = $('#tt').tree('getChecked', ['indeterminate']);
works the way it should
2  General Category / General Discussion / Re: Tree => getChecked(checked + indeterminate) on: June 13, 2013, 01:43:06 AM
That wouldnt solve my problem.
My problem here is that i need to know the ordering of the tree.

if we define (C) means checked and (U) unchecked. The following tree

(U) A
 |---(C) B
(C) C

would lead to to the following result: B - C - A therefore C comes before A but i need to know that A comes before B
3  General Category / General Discussion / Tree => getChecked(checked + indeterminate) on: June 07, 2013, 02:30:59 AM
Hallo there,

would it be possible to include a function that combines checked and indeterminate in the getChecked function?
In my case i can not "just" merge both results, because the tree is also a dnd tree and i need to know the order.
4  General Category / Bug Report / Re: Tree node dataformat on: May 23, 2013, 11:57:19 PM
Back at the problem. Are you sure it is working?


JSON.stringify(clipboard) => {"id":"2","text":"Stuff","attributes":{"his":"2","status":0},"target":{"jQuery18206816951613443558":166,"pageY":329},"checked":false,"state":"closed","children":[]}

But

Code:
t.tree('append', {
            parent: (node ? node.target : null),
            data: clipboard
        });

still not working after update, while

Code:
t.tree('append', {
            parent: (node ? node.target : null),
            data: [clipboard]
        });

works...
5  General Category / Bug Report / Re: Tree node dataformat on: May 15, 2013, 05:54:01 AM
ok problem is not relevant anymore. it got more complex so i had to work around anyway Smiley but you could still fix it for others
6  General Category / Bug Report / Tree node dataformat on: May 15, 2013, 05:25:58 AM
Hi,

i work with copy and paste on a tree (since u haven't fixed my other problem so far Wink ) and i got a little problem with the format of the datainput

i copy a node (with children OR without) by

Code:
clipboard = t.tree('getData', node.target);

therefore i get a single json object. But when i want to append the copied node by

Code:
        t.tree('append', {
            parent: (node ? node.target : null),
            data: clipboard
        });

the tree requests an array object. I know i could work around by using [clipboard] but there is where it stands in conflict with another possibility i want to offer: pasting only children.
To accomplish that i change the clipboard
Code:
clipboard = clipboard.children;
Now i dont know if i got an array or a single item. Of course i could work around that but maybe u could modify the datainput to accept single json data as well as arrays of json data.

If you could tell me early if you plan on changing that would be great because i want to finish the program soon Smiley and otherwise i have to implement the workaround myself
7  General Category / General Discussion / Re: Hide property for tree nodes on: May 08, 2013, 12:43:29 AM
Works perfect. Thx.

Will this be implemented in the next release?
8  General Category / General Discussion / Hide property for tree nodes on: May 07, 2013, 01:30:59 AM
Hello again,

still working with your nice tree. As you know from the bugs forum i kinda use everything it has to offer Wink
Now i'd have a little featurewish for the tree. Could you implement a "hidden" property, which determines whether a node is displayed in the tree or not. I've an inputfield to search for values in the tree with the following functions:

    $('#search').keyup(function() {
        $('#tree').tree('collapseAll');
        //$('#tree').tree('hideAll');
        var root = $('#tree').tree('getRoot');
        find($('#tree'), root, $('#search').val());
    });

    function find(tree, node, needle) {
        var children = tree.tree('getChildren', node.target);
        var found = false;
        $.each(children, function(key, value) {
            found = find(tree, value, needle) || found;
        });
        if (found || node.text.indexOf(needle) !== -1) {
            tree.tree("expand", node.target);
            //tree.tree("unhide", node.target);
            return true;
        }
        return false;
    }

By now it collapses the tree and expands all nodes where a specific string is found. My problem is that the tree i work an is really really large and almost every node has a hell of a lot subnotes. So whenever i search for a string, all nodes, that have a parent on the path are displayed. I would basicly need the following functions:

tree("hideAll")
tree("unhide", node)

for completeness i recommend also
tree("unhideAll")
tree("hide", node)

Is it possible that you include such a feature in the future? Also feel free to use my code for a tree("findString", node, needle) function Wink

Thanks in advance
9  General Category / Bug Report / Re: Move nodes between trees on: May 06, 2013, 07:17:06 AM
Thx for the fast fix. Works perfect. But i still got a little problem with the move between trees.

i use onDrop to modify the attributes of the dropped node. But since you insert a dummynode all previous changes to the attributes during onDrop are removed. Could you let the node copy the attributes beside the name please? Smiley

Again thx in advance for the fix.
10  General Category / Bug Report / Move nodes between trees on: May 02, 2013, 04:33:08 AM
First of all: Thx for the really good work guys. EasyUI is really really awesome Smiley

Now to my problem:

Currently i have two trees on a site. I need to move data between those two trees. By now i do it with a contextmenu and it works. But i discovered that dnd is also almost possible between two trees. If i drag a node between the trees it gets correctly inserted, but then dnd actions produce a javascript error:

[13:17:17.399] TypeError: _1e is undefined @ [...]/jquery.easyui.min.js:217
[13:17:17.510] TypeError: _14 is undefined @ [...]/jquery.easyui.min.js:163

I know this might not be a bug in your eyes because dnd between trees is simply not supported, but i would really appreciate it
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!