Page 1 of 1

subfile hoverover with links

Posted: Fri Apr 28, 2017 4:19 pm
by dkmccammon
Is there a way to hover over a subfile row, and have it then popup a window similar to the 'tool tip' but instead have a list of options a user can do with the data on that row. Normally what would be in the options field with definitions of what each option would be above the subfile.
Capture.PNG
Capture.PNG (17.45 KiB) Viewed 1808 times
In the picture provided. Say a user were to hover over one of the rows, we want a popup to display, similar to the 'tool tip' with a list of options, maybe 1 is to select the record to view in further detail, 3 deletes the record, 4 copies the record, something to that nature. Is this possible to do in genie, and if so what would be the best way to go about doing this?

Re: subfile hoverover with links

Posted: Mon May 01, 2017 11:25 am
by Scott Klement
i would suggest using a context menu. They are designed for this sort of thing... I should clarify: They occur on a right-click, NOT a hover... but, aside from that, they do exactly what you're asking, and they're available in Genie and relatively easy to code.

On the other hand, if you really need to do this on hover rather than right-click, that's possible... but, would require you to do some somewhat more advanced JavaScript coding it make it work.

I would suggest trying the context menu approach... it's something that's already there, and would be more common approach than a hover menu would be.

Re: subfile hoverover with links

Posted: Tue May 02, 2017 4:47 pm
by dkmccammon
I like this idea better. I have made a context menu, and added my choices and my choice values. When I right click on any line in the subfile the choices appear in random places, I would like for them to appear next to where I right click... But the more important issue, I am trying to figure out how to send the value back to the now hidden option box for that row. I have tried a few different javascripts, but my javascript is a bit rusty. What would be the best way to go about doing this?

Re: subfile hoverover with links

Posted: Tue May 02, 2017 4:55 pm
by Scott Klement
I'm not familiar with the problem where the menu appears in a "random" location. When I use a context menu, it appears where I right-click. Can you provide more information on this?

With regards to activating the choice that is taken, I can probably show you how I'd go about doing it.. let me put something together and I'll post an example when I have it.

Re: subfile hoverover with links

Posted: Tue May 02, 2017 5:01 pm
by dkmccammon
right-click2.PNG
right-click2.PNG (41.01 KiB) Viewed 1794 times
right-click.PNG
right-click.PNG (46.42 KiB) Viewed 1794 times
options.PNG
options.PNG (25.8 KiB) Viewed 1794 times
I attached a screen shot of design mode to show where I put the initial context menu box, then an example of right clicking on items in the subfile circled to show what was clicked and where the context box appeared. Maybe I don't have the context box associated with the subfile correctly, I'm not sure.

Re: subfile hoverover with links

Posted: Tue May 02, 2017 5:04 pm
by Scott Klement
It looks like your subfiles are in windows, is that correct? Would you say that the location of the context menu is off by the same amount as the window is positioned relative to the screen that it overlays? That would be my guess. I haven't tried using this feature in a window... if it sounds like I'm correct, please report it to support@profoundlogic.com as a bug.

Re: subfile hoverover with links

Posted: Tue May 02, 2017 5:08 pm
by dkmccammon
Yes, this subfile is in a window. I will report it to the support team, thank you. In the mean time I can continue to work on getting the context box to work.

Re: subfile hoverover with links

Posted: Tue May 02, 2017 6:49 pm
by Scott Klement
Here's a video that I made for you that shows the whole process, including the JavaScript coding:
http://www.profoundlogic.com/videos/ContextMenu/

Here's the same video, but sized to fill up your browser window:
http://www.profoundlogic.com/videos/Con ... layer.html