Bug Tracker

Modify

Ticket #3714 (closed enhancement: invalid)

Opened 5 years ago

Last modified 3 years ago

[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
Blocking: Blocked by:

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

comment:1 Changed 5 years ago by flesler

  • Cc Barracuda_82 added
  • Owner changed from flesler to joern
  • Component changed from unfilled to plugin

comment:2 Changed 3 years ago by john

  • Status changed from new to closed
  • Resolution set to invalid

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

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.