Confirmedusers, editor, Administrators
886
edits
CreativeMD (talk | contribs) No edit summary |
CreativeMD (talk | contribs) No edit summary |
||
Line 68: | Line 68: | ||
item.el.addClass("tt-parent"); | item.el.addClass("tt-parent"); | ||
item.showChildren = true; | item.showChildren = true; | ||
item.el.closest("tr"). | |||
var className = item.el.attr("data-tt-id"); | |||
item.el.closest("tr").addClass(className); | |||
var children = item.children.slice(); | |||
while(children.length > 0) | |||
{ | |||
children[0].el.closest("tr").addClass(className); | |||
if(children[0].children.length > 0) | |||
children.push.apply(children[0], children[0].children); | |||
children = children.splice(index, 1); | |||
} | |||
$("." + className).wrapAll("<div id='children_group_" + item.el.attr("data-tt-id") + "' style='border: 1px solid 1'></div>"); | |||
} | } | ||
}); | }); |