Thanks again,
seems, that this works only while having the popover code directly within the “main”-widget and having the popover action part of an (direct) f7-component.
HI @RGroll, I have a follow up question. If i have 2 or more similar widgets in a site with the same popup and only by clicking again it shows the right one. this is a repeatable story. Is there a way to prevent this behaviour?
… and just bother with some “details-widgets” as popover or popup to get a simple but similar look of the “top-level” UI elements.
Therefore I had a oh-label-card component in the above example with popover action.
If I can’t do this (because the missing styling options for the popover) I can still build the same look using the native f7-grid components.
Not a big deal - but some more work
got it, true. I ended up in just using custom widgets :-), but i any way wanted more control over backgrounds, content and highlight colors… as well as usable for iphones
This works out of the box only with devices that support a low battery channel.
if they don‘t, you need to create a virtual lowBat switch item and set it to on or off according to your defined treshold.
Edit : As COUNT supports a regular expression, it is worth to try
COUNT(<20)
Edit2: Hmmm, not working, as the validator does not like the „<„, but also does not like a string, even the docs list it as possible.
Edit3:
It should work with a virtual Item with the hysterese profile, linked to the batterylevel channel. This usage is noted in the profiles docu section…
Yes, even including UoM i.e. you can set “3.0 V” as a limit. But you must select it to have a switch type, and it’s not a virtual item, it’s still bound to the channel that has the physical measurement (of battery voltage).
Let me come back to this post from you Rainer: What you are doing there is fine since you only have static text in the popover. As soon as you want to show some item related info or controls in the popup I can confirm now that this does not work reliably. I have the following scenario:
I have two instances of the same widget on the same page. Both widgets try to open a popover which in turn shows stepper controls for a number item (I’m talking about my light control widgets). Since the class of the popover is hard coded in the widget there is no way for the browser to determine which element in the DOM should be displayed when you click in the link that opens the popover. I just realised this today when I always saw the popover with the item that was configured in the other widget but not the one I was clicking on.
So the solution still has to be the separate widget then which should work in any case. However I don’t think that anyone has solved the positioning issue yet…
This way the class name may not necessarily be unique as you may use the same configuration in different widgets. However you would always open the control for the right item. This feels pretty hacky though since there may be problems when your item name is not a valid css class name or when you are using multiple items in your popover. In this case however you can always add a text property to the widget and leave the setting of a unique class name to the user. This is also not an excellent solution but should do in most setups.