• dd_lighbar_menu.js request

    From Ragnarok@VERT/DOCKSUD to nightfox@VERT on Tuesday, August 27, 2019 18:56:28
    Hi Nightfox!
    i use the great lightbar menu library
    i need to add item and be selected it (set position to it)
    can you add this feature?

    i'm working in a cheap filebrowser that load all files from library
    this show the list and the user can select one. then go to next screen to show the detail for that file.
    when i return from the detail screen to the list, i reload the list, but i lost the position of previous selected file and always seek to firt item.

    if i could hold the position the user experiencie will be more smooth

    https://gist.github.com/ftoledo/2d4671b9373e6454607c6346546d6aad

    you can see a screencast at
    http://test.bbs.docksud.com.ar/ds_file_browser.webm

    thanks!
    Ragnarok
    ---
    Dock sud BBS
    http://bbs.docksud.com.ar
    þ Synchronet þ Dock Sud BBS TLD 24 HS - http://bbs.docksud.com.ar - telnet://bbs.docksud.com.ar
  • From Nightfox@VERT/DIGDIST to Ragnarok on Tuesday, August 27, 2019 17:13:11
    Re: dd_lighbar_menu.js request
    By: Ragnarok to nightfox@VERT on Tue Aug 27 2019 06:56 pm

    Hi Nightfox!
    i use the great lightbar menu library
    i need to add item and be selected it (set position to it)
    can you add this feature?

    I'm not sure what you mean? You want to be able to have an item selected when you add an item?

    If you want to make a new item selected, you should be able to do that already by setting the selectedItemIdx variable to the index of the item you just added (assuming your menu object is called 'menu'):
    menu.selectedItemIdx = menu.items.length - 1;

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com