Author Topic: Implement Dropdown Menu in Plugin's Static JSON file  (Read 112 times)

Offline BulldogLowell

  • Hero Member
  • *****
  • Posts: 1576
  • Karma: +191/-85
Implement Dropdown Menu in Plugin's Static JSON file
« on: September 21, 2017, 08:53:42 am »
So I see time and time again (PLEG is a great example) where user may select a device from a list.  I looked through all of the documented ControlTypes but there is no documented standard implementation.

Can someone direct me to a method to produce such a thing?  I've searched the forum for js_button but cannot find an example there either...


Offline reneboer

  • Hero Member
  • *****
  • Posts: 1102
  • Karma: +58/-30
Re: Implement Dropdown Menu in Plugin's Static JSON file
« Reply #1 on: September 21, 2017, 01:23:07 pm »
Hi,

I fear you cannot do this using the static json and you have to create a javascript version of the panel.

Cheers Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline BulldogLowell

  • Hero Member
  • *****
  • Posts: 1576
  • Karma: +191/-85
Re: Implement Dropdown Menu in Plugin's Static JSON file
« Reply #2 on: September 22, 2017, 09:11:15 am »
Hi,

I fear you cannot do this using the static json and you have to create a javascript version of the panel.

Cheers Rene

Right... thanks.

I've looked over the JS API.  Though I know JavaScript it's a bit daunting, learning (yet another) JS API!!  I think for now I'll solve my problem with Lua.