Show control inline in PC/Tablet - 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: Show control inline in PC/Tablet (/showthread.php?tid=577) Pages:
1
2
|
Show control inline in PC/Tablet - Mirco - 26.01.2017 Hi, I have an object that is a 255 byte string and I would display it in line in the visualization. If I check Show control it returns an error. I don't want that when the user have to write, he must click on the object that open the popup where to write. Have you any idea how to do that? Thanks! RE: Show control inline in PC/Tablet - Mirco - 27.01.2017 Please someone have any idea how to do that? Because the popup is horrible, and the client don't like it RE: Show control inline in PC/Tablet - Erwin van der Zwart - 27.01.2017 Hi, What error do you get when enable show control? BR, Erwin RE: Show control inline in PC/Tablet - Mirco - 27.01.2017 This is the error: Cannot enable Show control for this object Possible reasons: • Read-only is enabled • Send fixed value is not empty • Widget is selected • Object datatype is either Time, Date or Color • Control type is set to Custom value select My object is a 255 byte string, I attach the property: RE: Show control inline in PC/Tablet - admin - 27.01.2017 Try this script, it will enable show control for all elements mapped to group address 1/1/14. No guarantees that it will work though Code: addr = '1/1/14' RE: Show control inline in PC/Tablet - Mirco - 27.01.2017 Thanks admin, but where I have to put it? RE: Show control inline in PC/Tablet - admin - 27.01.2017 Rut it as a script once RE: Show control inline in PC/Tablet - Mirco - 27.01.2017 I tryed to put it in the init script but it didn't work, then I tryed to put it in the Javascript code but it didn't work. Sorry I forgot to restart the HomeLYnk after put the code in the init script, now it work! Thank you!!! RE: Show control inline in PC/Tablet - admin - 27.01.2017 Create either an event or a resident script, run it and then disable it. RE: Show control inline in PC/Tablet - Mirco - 27.01.2017 Thank you very much! Now I have only a problem, how can I change the width of this object, because when I change it via CSS it is overwritten by: Code: elemento { that I don't be able to change it.. SOLVED: I put this code into javascript: Code: $(".Email > div > div > input").attr("style", "width: 700px;"); RE: Show control inline in PC/Tablet - admin - 27.01.2017 you can add !important to CSS rules you want to over-ride. Code: .customcls { RE: Show control inline in PC/Tablet - Mirco - 27.01.2017 Faster way, thanks! RE: Show control inline in PC/Tablet - Mirco - 27.01.2017 I have another problem: when I change the string inside the input box, but don't press enter or the button, the value displayed don't return to the value of the object until I refresh the page, neither if I change page. Do you have any advice? RE: Show control inline in PC/Tablet - admin - 27.01.2017 This is why it's not possible to enable show control for text input by default RE: Show control inline in PC/Tablet - Mirco - 27.01.2017 Damn Ok, then how can i set the text of the input box? because I tryed this code: Code: $(".Email > div > div > input").attr("value", "EXAMPLE"); RE: Show control inline in PC/Tablet - Erwin van der Zwart - 27.01.2017 Hi, I would create a html with input fields and use javascript to set values to LM and embed it with a iframe into the visu. BR, Erwin RE: Show control inline in PC/Tablet - Mirco - 27.01.2017 Erwin can you make an example? Because I don't know how to do that. RE: Show control inline in PC/Tablet - admin - 27.01.2017 Use .val("new value") instead of .attr(...) RE: Show control inline in PC/Tablet - Erwin van der Zwart - 28.01.2017 (27.01.2017, 15:33)Mirco Wrote: Erwin can you make an example? Because I don't know how to do that. Hi Mirco, You can create a HTML file like this and put it in a iframe with this URL "/user/input.html", run this LUA code once to create the file: Code: -- use this path in your iframe: /user/input.html BR, Erwin RE: Show control inline in PC/Tablet - Mirco - 30.01.2017 (27.01.2017, 17:14)admin Wrote: Use .val("new value") instead of .attr(...) Thanks you admin! Now it works! This is the code I used: Code: var visible = false; When the "widget-7" that contains the text input is closed the text inside the input box is reset! (28.01.2017, 12:43)Erwin van der Zwart Wrote: Hi Mirco, Thank you Erwin! It works really well! Now that I understand how to use iframe, we can do almost what we want! |