Page 1 of 1

Where is the onmouseover attribute on a floorplan added.

Posted: Monday 16 November 2015 9:21
by divx118
Could be a stupid question, however I didn't find where in the source code the

Code: Select all

onmouseover="Device.popup('<device>');"
is added for the floorplans when hovering an icon. I want to disable it for certain devices. I tried overwriting it with javascript in www/app/FloorplanController.js however that only partially works. On an update of the device it gets overwritten again.
I need it, because I want to abuse the floorplans to create my ir-remotes. Make a background picture with the remote buttons then overlay it with custom transparent icons. I will be using a normal On/Off switch from a virtual device, call my sh script to launch lirc and then in the sh script I turn the switch off again with a json call. This part works good, but to be usable I need to disable the device popup. See also http://www.domoticz.com/forum/viewtopic.php?f=8&t=8787

Thanks in advance

Re: Where is the onmouseover attribute on a floorplan added.

Posted: Monday 16 November 2015 9:26
by gizmocuz
I would not modify base code
You can create a custom template, and add anything you want in there

Re: Where is the onmouseover attribute on a floorplan added.

Posted: Monday 16 November 2015 9:40
by divx118
Thanks,

I was trying to avoid that, if I just could create a simple patch file which I could reapply after an update. Would be nice to have an option available in the future to turn the popup off. Well I guess I need to put some time into it to dynamically create my ir-remotes pages.

Edit: Nevermind, I know it is not the best way, however with a small patch I can disable them now for just my ir buttons. Saves me some work, I like the drag and drop on floorplans, so it is now very convenient to add more ir remotes when I need them.