Side navigation
#3714 closed enhancement (invalid)
Opened December 15, 2008 03:02PM UTC
Closed February 05, 2010 08:36PM UTC
[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...
Attachments (0)
Change History (2)
Changed December 15, 2008 10:59PM UTC by comment:1
cc: | → Barracuda_82 |
---|---|
component: | unfilled → plugin |
owner: | flesler → joern |
Changed February 05, 2010 08:36PM UTC by comment:2
resolution: | → invalid |
---|---|
status: | new → closed |
Please file plugin bugs with the appropriate author on their bug tracker.