HomeSeer / Plugin-SDK

Plugin development kit for the 4th major edition of the HomeSeer platform.
https://www.nuget.org/packages/HomeSeer-PluginSDK/
GNU Affero General Public License v3.0
21 stars 5 forks source link

Looking for HS4 version of jqSelector and jqMultiSelect #229

Open stefxx opened 2 years ago

stefxx commented 2 years ago

Environment and System Config

Describe what you would like to see added or changed I am looking for a select view similar to the HS3 version of jqSelector and jqMultiSelect. Working on a few new plugin ideas, and without it, it is going to be difficult to finish.

Priority How important is this to you on a scale of 1-5?

  1. Blocking

Thanks!

spudwebb commented 2 years ago

so basically you would need a multi select control like this: https://mdbootstrap.com/docs/standard/extended/multiselect/ ? I have created PSDK-215 to track this feature request.

Note that if you wanted to give it a try and implementing it yourself, you would just need to add a new view type similarly to what I did here: https://github.com/HomeSeer/Plugin-SDK/commit/3ec872ff0be5465e32cb0b877085f6ea7911afe5 Then the only files that you need to change which are not in the PluginSdk are the 4 following js files which are in your HS4 dir:

stefxx commented 2 years ago

Yes, that multiselect will cover most of my requirements, and will work for most of what I need, thanks!

There is one specific case where I like to select multiple HS4 features, not sure if/how that would work with the example but I recognize that something like the old jqSelector doesn't fit the HS4 layout and will probably not work for mobile anyway. Need to think about that a bit.

I will take your suggestion and give it a try myself, but it will be my first attempt to do something like this. Also, VB.net is what I am good at. JS and C# is much harder for me :)

stefxx commented 2 years ago

So I took up the challenge... Created a MultiSelectView based on SelectListView, which is quite similar and basically only needs a "multiple" tag in the "select class".

However, every single selection triggers the callback (which is not a bad thing perse) but for events that causes a refresh of the screen. And by that, resetting/closing the MultiSelect, making selecting multiple items quite clumsy. Any suggestions?

stefxx commented 2 years ago

I am afraid this challenge is too big for me. I was able to suppress the reload of the page (might need to implement a page refresh at the close of the multiselect later), but I am also running into issues that I need to return an result array instead of a single value. No clue on how to incorporate that within the current structure of the PluginSDK...

jldubz commented 2 years ago

@stefxx ,

Can you share you implementation code? It sounds like you very close. We may be able to fix what you have and add it in sooner than later.

stefxx commented 2 years ago

I am afraid you overestimate my attempts. And I was so frustrated with it that I didn't save any of it.

Basically I just copied SelectView and tried make some basic changes in PluginSDK. And I remember playing with html\bootstrap\js\jui-events.js until I got stuck, I didn't update any of the other js files at that point.

jldubz commented 2 years ago

No problem. Thank you for trying. I've scheduled this for v1.5.

stefxx commented 2 years ago

Thanks!!

pcp2023 commented 1 year ago

I have a similar need for some of the plugins I am working on. Attached is my implementation (not too much testing yet). It would be nice if included in one of the next HS4/PluginSK updates.

HS4_MultiSelect jui PSDK-215.zip

stefxx commented 6 months ago

Is this still planned for 1.5.0? I just looked at the pluginsdk from HS4 4.2.19.6 beta but couldn't find it.

pcp2023 commented 1 week ago

Is this planned to be added to HS4/SDK? I started to write HS4 plugins and need such functionality. For now each time I update, I need to patch HS4 with the above code I provided as well as patch/rebuild the SDK dll if it changes. The proposed HS4/SDK changes I provided above, have worked well so far in my testing.