Custom Widgets-Touch Config - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9) +--- Thread: Custom Widgets-Touch Config (/showthread.php?tid=1251) |
Custom Widgets-Touch Config - JoseJimenez94 - 23.02.2018 Hi guys Im trying to do custom widgets myself in Touch Config. I've been some documentation about it, but i have some questions. Do I need to use a specific program to compile a .js file (JavaScript)? or can i use the Tool defined in "Config"? Futhermore, in Touch Config Panel, there is a upload button. Do I have to use it to upload the .js file where the widget is? Please I need some help. Thank you. RE: Custom Widgets-Touch Config - Daniel - 26.02.2018 Hi No special tool, notepad++ or similar will just do. You have to zip it to tra.gz format. You can use 7zip for that. What is important while uploading the widget ID must be unique for example here Code: $(function() { alarm_fire_alert3 is the ID and it is used twice. While importing widget in Mosaic the Key field must be widget ID. alarm_fire_alert3 in this case. BR RE: Custom Widgets-Touch Config - JoseJimenez94 - 28.02.2018 Thank you! But now I have a problem. When i try to modify a widget and upload then, nothing happens. I have tried to modify just the tittle and when i upload the .tar.gz, the widget doesn't appear (error message doesn't appear neither). i don't understand what is happens. I just want to do a widget of two switches (a general switch for one detector and a switch for one light, in parallel) on/off (with their status), but there is no way to get it Or maybe there is some way to put two different widgets together? RE: Custom Widgets-Touch Config - Daniel - 28.02.2018 (28.02.2018, 11:29)JoseJimenez94 Wrote: Thank you! Make sure that you use widget ID as Key and it is unique. RE: Custom Widgets-Touch Config - JoseJimenez94 - 28.02.2018 (28.02.2018, 11:40)Daniel. Wrote:(28.02.2018, 11:29)JoseJimenez94 Wrote: Thank you! Im sure. I just change the tittle (in objects), i dont change Key or nothing more. I use the same widget ID as key. RE: Custom Widgets-Touch Config - Daniel - 28.02.2018 but you have to change widget ID as it must be unique. RE: Custom Widgets-Touch Config - JoseJimenez94 - 28.02.2018 (28.02.2018, 11:57)Daniel. Wrote: but you have to change widget ID as it must be unique. Well, i did it and there's no way RE: Custom Widgets-Touch Config - Daniel - 28.02.2018 Then try this one https://drive.google.com/file/d/111XC3SsQ1fTAwJzcbOlVaSbs3_edcF-c/view?usp=sharing Key: alarm_fire_alert3 Name: as you like RE: Custom Widgets-Touch Config - JoseJimenez94 - 01.03.2018 (28.02.2018, 12:43)Daniel. Wrote: Then try this one https://drive.google.com/file/d/111XC3SsQ1fTAwJzcbOlVaSbs3_edcF-c/view?usp=sharing yes, when i upload your file, the widget appears.It's ok But if i change the number 3 in 4 in the code, and i use Key: alarm_fire_alert4, it doesn't appear. I'm using the program "Brackets", maybe it's the problem? I dont know... RE: Custom Widgets-Touch Config - Daniel - 01.03.2018 (01.03.2018, 09:08)JoseJimenez94 Wrote:(28.02.2018, 12:43)Daniel. Wrote: Then try this one https://drive.google.com/file/d/111XC3SsQ1fTAwJzcbOlVaSbs3_edcF-c/view?usp=sharing Remember that widget ID is in two places in JS. Make sure you changed both. RE: Custom Widgets-Touch Config - JoseJimenez94 - 01.03.2018 (01.03.2018, 09:18)Daniel. Wrote:(01.03.2018, 09:08)JoseJimenez94 Wrote:(28.02.2018, 12:43)Daniel. Wrote: Then try this one https://drive.google.com/file/d/111XC3SsQ1fTAwJzcbOlVaSbs3_edcF-c/view?usp=sharing Well, i discovered that the problem was how i was compressing the files. I used the program PeaZip and it works Now i'm trying to use the icon "General switch" of Touch Config for my program but i'm not sure how to put into. Is there any special class to use in the template? RE: Custom Widgets-Touch Config - JoseJimenez94 - 02.03.2018 Someone knows if it's possible to put together (in the same widget) one general switch and another switch(light) in the app Mosaic. I'm trying to modify the templates to join them, but it doesn't work. I would greatly appreciate your help. RE: Custom Widgets-Touch Config - Daniel - 02.03.2018 Hi In Touch all the CSS and JS are grouped in to common file. CSS contain all the graphics too. If you want to modify something you have to use it. Send me your email to PM so I will send you the files. Too big to drop here. BR |