NetTalk Central

Author Topic: sidebar menus  (Read 5856 times)

olu

  • Sr. Member
  • ****
  • Posts: 352
    • View Profile
    • Email
sidebar menus
« on: November 12, 2012, 02:04:21 AM »
Hi All,
Please how do i make the menu at the sidebar panel open one at a time. so that if i have one open and click on anothter the one open before closes and the clicked one opens

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: sidebar menus
« Reply #1 on: November 12, 2012, 07:20:15 AM »
use Accordion menu type, not TaskPanel.

cheers
Bruce

olu

  • Sr. Member
  • ****
  • Posts: 352
    • View Profile
    • Email
Re: sidebar menus
« Reply #2 on: November 13, 2012, 04:47:55 AM »
Thanks Bruce, that did the trick but just one problem the menu is expanding to a certain size in all menus, so am having menus of just one item the height is the same with one with 7items so making it look very empty. Any way to get it to resize to amount of items in each menu

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: sidebar menus
« Reply #3 on: November 13, 2012, 11:22:38 AM »
Hallo Olu,

To solve your problem follow this steps:

1.) go to procedure you have the menu on embed :
"Set jQuery Accordion Menu Options"

2.) write there this code:
loc:options = Choose(loc:options='','',clip(loc:options) & ',') & 'autoHeight: false , navigation: true'

compile and see the results :o)

Regards,
Robert

olu

  • Sr. Member
  • ****
  • Posts: 352
    • View Profile
    • Email
Re: sidebar menus
« Reply #4 on: November 13, 2012, 12:24:08 PM »
Hi Robert you are a star that worked perfectly. Thanks.

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: sidebar menus
« Reply #5 on: November 14, 2012, 05:57:28 AM »
you welcome!
Robert

olu

  • Sr. Member
  • ****
  • Posts: 352
    • View Profile
    • Email
Re: sidebar menus
« Reply #6 on: November 19, 2012, 03:57:19 AM »
Hi All,
Just one more quick question on this if i wanted to have it that if a menu is already open and i click on the menu again, to get it to contract all menus?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: sidebar menus
« Reply #7 on: November 19, 2012, 05:25:22 AM »
Hi Olu,

for features of the Accordion widget see here;
http://jqueryui.com/accordion/
be sure to read the API to see the options that it has.
http://api.jqueryui.com/accordion/

Robert's already showed you the way in which you can translate those options into the loc:options field.

Cheers
Bruce

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: sidebar menus
« Reply #8 on: November 19, 2012, 05:27:02 AM »
I think this is the option you want;
http://api.jqueryui.com/accordion/#option-collapsible

Bruce

markster

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: sidebar menus
« Reply #9 on: November 19, 2012, 03:37:19 PM »
The "Collapsible" option is displayed in the API documentation, but I cannot see any API documentation to an AutoHeight parameter even though I added the code displayed earlier in this thread and it worked fine. Where did the parameter come from? Same for Navigation?...

Mark


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: sidebar menus
« Reply #10 on: November 19, 2012, 09:32:53 PM »
ok, the doc I pointed to with that link was to jQueryUI version 1.9.
The one being used by NetTalk 6 is 1.8.23

The following link is for the API docs for 1.8
http://api.jqueryui.com/1.8/
for accordion specifically; (widgets / accordion)
http://api.jqueryui.com/1.8/accordion/

jQueryUI 1.9 is a fairly large update and it has refactored some of the widgets (including accordion) to make the interfaces to the various widgets more consistent.

cheers
Bruce



markster

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: sidebar menus
« Reply #11 on: November 24, 2012, 09:53:54 AM »
Thanks. I'll keep an eye on the jQuery version being used within NetTalk down the road.

Mark