Bug Tracker

Opened 11 years ago

Closed 10 years ago

#3714 closed enhancement (invalid)

[treeview] Working expanders for prerendered trees

Reported by: Barracuda_82 Owned by: joern
Priority: minor Milestone: 1.3
Component: plugin Version: 1.2.6
Keywords: treeview Cc: Barracuda_82
Blocked by: Blocking:

Description

I made a prerendered list and found a solution for the expanders no working. I found a post in the comments on the site that said its by design, but i think there is a solution for it. I Altered the deserialize() function to this

function deserialize() {

var stored = $.cookie(settings.cookieId); if ( stored ) {

var data = stored.split(""); branches.each(function(i, e) {

$(e).find(">ul").each(function(){

if (parseInt(data[i]) == 1) {

$(this).show(); $(this).parent('li').find('.hitarea').removeClass('expandable-hitarea').addClass('collapsable-hitarea');

} else {

$(this).hide(); $(this).parent('li').find('.hitarea').removeClass('collapsable-hitarea').addClass('expandable-hitarea');

}

})

});

}

}

This works fine for me (and i think it should work on any treeview implementation. The only thing that has to be done is to make a check if the prerendered setting is true or false. When true, execute the above function and when false execute the default action.

I am not a jQuery nor a treeview expert, but i thought this might be usefull...

Change History (2)

comment:1 Changed 11 years ago by flesler

Cc: Barracuda_82 added
Component: unfilledplugin
Owner: changed from flesler to joern

comment:2 Changed 10 years ago by john

Resolution: invalid
Status: newclosed

Please file plugin bugs with the appropriate author on their bug tracker.

Note: See TracTickets for help on using tickets.