Hi All,
By mistake I posted my query in JIRA tracker. From there I got the
method to post the queries.
My requirement is to set the Accordion Menu and Content Area according
to screen resolution(available Height)
I have done for content area. Now i have to do for accordion menu. In
left panel, I have navigation menu which displays the available spaces
and pages within each space . For Accordion effect on this menu, i have
created the object of accordion. as under:-
<script type="text/javascript">
var obj = {div:'xwikinav',height:document.body.parentNode.clientHeight -
(103 + ($mycount *22)), no:$spacecount};
var acc = createAccordion(obj);
</script>
I have set the height dynamically instead of hardcoded value. $mycount
is no of spaces. With this kind of code I get menu as per available
height. But moment i resize by pressing F11 key, my content area is
resized but the menu is not resized.
I understand that, i need to set the height as per above on
window.resize event viz.
window.resize =
currentlyexpandedaccordion.height=document.body.parentNode.clientHeight
- (103 + ($mycount *22))
But i dont know how to get the accordion or div which is in expanded
state.
I even tried. like while creating the accordion, i returned the object.
and then on window.resize event , acc.options.defaultHeight=
document.body.parentNode.clientHeight - (103 + ($mycount *22))
Please help...I have tried all approches...I am stuck.. Will appreciate
your valuable inputs.
[ Show > ]
Prachi Jain
<http://jira.xwiki.org/jira/secure/ViewProfile.jspa?name=hmajmudar> -
05/Sep/08 15:00 - edited My requirement is to set the Accordion Menu and
Content Area according to screen resolution(available Height) I have
done for content area. Now i have to do for accordion menu. In left
panel, I have navigation menu which displays the available spaces and
pages within each space . For Accordion effect on this menu, i have
created the object of accordion. as under:- <script
type="text/javascript"> var obj =
{div:'xwikinav',height:document.body.parentNode.clientHeight - (103 +
($mycount *22)), no:$spacecount}; var acc = createAccordion(obj);
</script> I have set the height dynamically instead of hardcoded value.
$mycount is no of spaces. With this kind of code I get menu as per
available height. But moment i resize by pressing F11 key, my content
area is resized but the menu is not resized. I understand that, i need
to set the height as per above on window.resize event viz. window.resize
=
currentlyexpandedaccordion.height=document.body.parentNode.clientHeight
- (103 + ($mycount *22)) But i dont know how to get the accordion or div
which is in expanded state. I even tried. like while creating the
accordion, i returned the object. and then on window.resize event ,
acc.options.defaultHeight= document.body.parentNode.clientHeight - (103
+ ($mycount *22)) Please help...I have tried all approches...I am
stuck.. Will appreciate your valuable inputs.
Thanks,
Prachi
Show replies by date