From 5d06ea17e6009b8c5591bf974cd6bbe7f6601a7b Mon Sep 17 00:00:00 2001 From: james Date: Wed, 21 Jul 2010 19:20:34 +0000 Subject: [PATCH] Fix the bug where the first load of the accordion doesnt populate correctly --- common.inc.php | 5 +++-- nav.php | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/common.inc.php b/common.inc.php index ff21677..5785ef5 100644 --- a/common.inc.php +++ b/common.inc.php @@ -78,7 +78,8 @@ function taskNav(id,pid,level) { $("#tertiarymenu_accordion").accordion("destroy"); $("#tertiarymenu_accordion").load("/nav.php?level=2&id="+id,null,function() { - $("#tertiarymenu_accordion").accordion({clearStyle: true}); //"option", "collapsible", true); + $("#tertiarymenu_accordion").accordion({clearStyle: true, collapsible: true, active: false}); //"option", "collapsible", true); + $("#tertiarymenu_accordion").accordion("activate",false); $("#tertiarymenu").show(); }); break; @@ -94,7 +95,7 @@ function taskNavLevel(l1,l2,l3,l4) { $("#tertiarymenu_accordion").accordion("destroy"); $("#tertiarymenu_accordion").load("/nav.php?level=2&id="+l2,null,function() { - $("#tertiarymenu_accordion").accordion({clearStyle: true}); //"option", "collapsible", true); + $("#tertiarymenu_accordion").accordion({clearStyle: true, collapsible: true, active: false}); //"option", "collapsible", true); $("#tertiarymenu").show(); $(".primarynav-selected").removeClass("primarynav-selected"); diff --git a/nav.php b/nav.php index a86f72a..4a78693 100644 --- a/nav.php +++ b/nav.php @@ -30,8 +30,10 @@ case 1: //populate the scecondary menu if($_SESSION['nav']['primary']!=$id) { $_SESSION['nav']['primary']=$id; - unset($_SESSION['nav']['secondary']); } + unset($_SESSION['nav']['secondary']); + unset($_SESSION['nav']['tertiary']); + unset($_SESSION['nav']['tertiarylink']); $q=mysql_query("SELECT * FROM rolestasks WHERE pid='$id' AND level=1 ORDER By ord,task"); echo "