Hi all,
I'm looking for the file(s) that contain the code for hiding elements by prefixing the name with a $. I've looked through a lot of the source, XXcontroller.js, some .cpp, to no avail. Is this done server side or client side - I imagine it's client side. If someone can point me in the right direction I'd me most grateful. I have an idea for another use of this idea, with a different character - hiding the icon - especially for text devices and was curious how this was implemented.
Thanks in advance.
Chris
Code that hides elements whose name is prefixed with a $
Moderators: leecollings, remb0
-
- Posts: 624
- Joined: Sunday 01 November 2015 22:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Twente
- Contact:
Re: Code that hides elements whose name is prefixed with a $
Here you go Chris.
viewtopic.php?t=42583
viewtopic.php?t=42583
Bugs bug me.
- waltervl
- Posts: 5991
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2025.1
- Location: NL
- Contact:
Re: Code that hides elements whose name is prefixed with a $
This requested functionality could better be implemented by an edit option on the device, not by some special character in the name.
This probably would require an extra column in the device definition table of the database.
Perhaps not needed if you would add an option to change the icon to none instead of default or some custom.
Or a default UI setting in menu Setup-Settings to hide Icons for Text devices.
You could also hide icons for text devices in the theme.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 19
- Joined: Monday 23 October 2017 17:07
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.5
- Contact:
Re: Code that hides elements whose name is prefixed with a $
Thanks HvdW for the tip but I was actually looking for the code which implemented this, i.e. detects the presence of a $ and hides the device.
Agreed, it was just an idea and I wondered how the $ mechanism was implemented.
I'd also thought of this, in fact I have already, almost, implemented this on my installation. i.e. I hide the icon if it is the default icon. Maybe the default icon for Text devices could be "none" though this would change the behaviour for current installations.
Probably the easiest solution to implement.
-
- Posts: 578
- Joined: Monday 20 March 2023 14:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Somewhere in NL
- Contact:
Re: Code that hides elements whose name is prefixed with a $
I think if you search the source of 'WebServerCmds.cpp' and/or 'WebServer.cpp' for '$' you will find what you are searching for.
Logic will get you from A to B. Imagination will take you everywhere.
-
- Posts: 624
- Joined: Sunday 01 November 2015 22:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Twente
- Contact:
Re: Code that hides elements whose name is prefixed with a $
When you have found how it works please share how to hide the icons in text devices.
Bugs bug me.
Who is online
Users browsing this forum: No registered users and 1 guest