I'm trying to get better understanding of internals of KnxWeb. Since I'm total Javascript newbie, I'm even greater JQuery newbie, but I hope will be able to learn what's going on in KnxWeb - since this is really interesting visualization also for other non EIB systems.
I'm learning by making slight modifications to existing objects.. I managed to do few things sucessfully, but have problem with changing icons order in Dimmer object (similar question applies also to other objects )...
For instance: I'd like to display minus on top, then light in the middle (will try to integrate scale display in here) and minus (moins) at the bottom.
As newbie I obviously made wrong assumption that only changing order of appends will change also order of icons. Currently it goes like this :
and I obivously have a lack of understanding of above code, cause changing order doesn't change anything in final output. I guess the trick lies in .get(0) statements - what would be right interpretation of those statements ?
What determines order of icons in final object in web page ?
Any other more detailed explanation of KnxWeb internals ?
I'll post all my findings to Wiki - I guess once we have a basic developer's guide it will be much easier to customize and enhance features of KnxWeb. I'm really impressed on this project...
Thanks in advance,
regards,
Bulek.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, my thinking was right afterall. It seems that using same style "dimmerDiv" for both objects was a key to success...
When I added new style also for my shutter object, then display was getting right (didn't know that css is so hard on newbies - I didn't have proper empty line after style and it put object behind background pic...)
Anyway, my shutter object is now working, now I plan to integrate scale output in same object, so I can visually get state presentation...
Regards,
Bulek.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm trying to get better understanding of internals of KnxWeb. Since I'm total Javascript newbie, I'm even greater JQuery newbie, but I hope will be able to learn what's going on in KnxWeb - since this is really interesting visualization also for other non EIB systems.
I'm learning by making slight modifications to existing objects.. I managed to do few things sucessfully, but have problem with changing icons order in Dimmer object (similar question applies also to other objects )...
For instance: I'd like to display minus on top, then light in the middle (will try to integrate scale display in here) and minus (moins) at the bottom.
As newbie I obviously made wrong assumption that only changing order of appends will change also order of icons. Currently it goes like this :
this.plus = $("<img src='images/plus.png'/>").get(0);
...
content.append(this.plus);
// Moins
this.moins = $("<img src='images/moins.png'/>").get(0);
...
content.append(this.moins);
// Ampoule
this.light = $("<img src='images/light_off.png'/>").get(0);
...
content.append(this.light);
and I obivously have a lack of understanding of above code, cause changing order doesn't change anything in final output. I guess the trick lies in .get(0) statements - what would be right interpretation of those statements ?
What determines order of icons in final object in web page ?
Any other more detailed explanation of KnxWeb internals ?
I'll post all my findings to Wiki - I guess once we have a basic developer's guide it will be much easier to customize and enhance features of KnxWeb. I'm really impressed on this project...
Thanks in advance,
regards,
Bulek.
Well, my thinking was right afterall. It seems that using same style "dimmerDiv" for both objects was a key to success...
When I added new style also for my shutter object, then display was getting right (didn't know that css is so hard on newbies - I didn't have proper empty line after style and it put object behind background pic...)
Anyway, my shutter object is now working, now I plan to integrate scale output in same object, so I can visually get state presentation...
Regards,
Bulek.