I'm trying to create tips that will show as a field in the properties dialog gets focus. To get an idea of how to do this I have fleeced through the serial port code (both html and js) and although I can see where the <div> tags are that hold the tips, they have no actual content. I can also find how they are either shown or hidden in the oneditprepare function, but I cannot find where the actual content of the various tips is held.
I'm sure it's patently obvious and I'm just not seeing it, so a nudge in the right direction would be much appreciated.
Do you have a link to the line of code in the serial node you are looking at? I'm not 100% clear on what you're trying to do here, but if you can point to an example you're trying to replicate, we can help explain how it's working.
The oneditprepare: function() starting on line 257 contains in lines 329-334 one of the many references to these div IDs (there are others, but this block seems the cleanest):
$("#node-config-input-responsetimeout").on('focus', function () { $("#tip-responsetimeout").show(); });
$("#node-config-input-responsetimeout").on('blur', function () { $("#tip-responsetimeout").hide(); });
$("#node-config-input-waitfor").on('focus', function () { $("#tip-waitfor").show(); });
$("#node-config-input-waitfor").on('blur', function () { $("#tip-waitfor").hide(); });
$("#node-config-input-addchar").on('focus', function () { $("#tip-addchar").show(); });
$("#node-config-input-addchar").on('blur', function () { $("#tip-addchar").hide(); });
I am trying to replicate something similar. However as I look through the code I cannot find the actual contents of any of the tips that show when a field has focus - see the marked tips in the image below.
I feared as much. I can't seem to find the message catalog you refer to though?
Don't know if getting up to speed on data-i18n is going to be worth my effort, but I'll look into it. What I'm most interested in is how the tips are styled (size, color, font etc). That way I could be at least stylistically consistent.