Access to Reference Icon code

josevalente
Kilo Explorer

Hello everyone

I've been trying to find out if I can access the code that defines the reference icon preview button. I have a requirement to develop something to display some caller info, without actually leaving the incident record. Now because of some limitations I can't add it to the popup_view, so I decided to do a new UI Macro.

The UI Macro onclick works fine, I used GlideDialogWindow and I can load the info. The thing is GlideDialogWindow loads a new window and kind of fuzzes out the rest of the page in the background. I was looking to do something more similar to the behaviour the reference icon preview has (loading the info on small window, on mouse over, without fuzzing out the rest of the page, and closing the window when the mouse leaves the button).

Is this achievable? Is there a way to see the code that is doing this for reference fields?

Thank you,
Jose Valente

1 ACCEPTED SOLUTION

Try something like this, it worked for me...



<?xml version="1.0" encoding="utf-8" ?>


<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">


  <script>


  <a id="test_id" onmousemove="g_popup_manager.enqueue(event, '', 'my_test_ui_page.do', '', 600)" onmouseout="g_popup_manager.destroypopDiv()" >hover here</a>


</j:jelly>



The result:



Screen Shot 2017-02-21 at 7.24.04 AM.png



And again, being an unpublished API, I have no idea what the future may hold for it.


View solution in original post

19 REPLIES 19

Hi Joe,



Interesting! How can I access that API? Can't seem to find it.



Seems very close to what I got, but your code looks cleaner since I had to do a bit of front-end work.


I can't find any formal documentation on GlideBox in the developer API doc.   I used Chrome to inspect the page and found the class definition in js_includes_last_doctype along with a list of options you can pass in to identify the parameters.   But it was the only option I could find that would allow you to control whether it was modal.



Screen Shot 2017-02-27 at 4.13.20 AM.png


Thanks, I'll save this in case I need it in the future.


Paramahanns
Tera Expert

Hi Joe/Jose,



Just a small clarification. What make a reference that the link has to be attached near the caller. After we create the UI macro and UI page to link that to the incident form near the caller field should we do some explicit action. I tried the example and I don't see the Hover link next to the caller field.



please reply on this.



Regards


Param


Hello Paramahanns,




Not sure if I understood your question correctly. But you can add a UI macro to a field by adding an attribute in the dictionary of the field, "ref_contributions=NAME_OF_UIMACRO"