This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Button disable
#7
Hi
This code requires a new class for every dependant object. In case you have hundreds of objects you need to set readonly conditionally you have to create
grp.listen('1/1/1', function(object, state) { $('.disabledbyknx_1').toggleClass('el-disabled', object.value == true); });
grp.listen('1/1/2', function(object, state) { $('.disabledbyknx_2').toggleClass('el-disabled', object.value == true); });
...
grp.listen('1/1/100', function(object, state) { $('.disabledbyknx_100').toggleClass('el-disabled', object.value == true); });

rows.
Wouldn'd be there a nicer way? Like storing of the readonly maker object into comment of the main object?
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Reply


Messages In This Thread
Button disable - by Pawel - 08.06.2016, 11:20
RE: Button disable - by Erwin van der Zwart - 08.06.2016, 19:24
RE: Button disable - by legolas2069 - 29.06.2018, 07:26
RE: Button disable - by Pawel - 09.06.2016, 06:37
RE: Button disable - by admin - 29.06.2018, 08:04
RE: Button disable - by legolas2069 - 03.07.2018, 10:25
RE: Button disable - by Thomas - 06.08.2018, 08:15
RE: Button disable - by Erwin van der Zwart - 06.08.2018, 10:55
RE: Button disable - by DGrandes - 17.12.2019, 12:48

Forum Jump: