NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Niels Larsen on September 07, 2018, 03:11:12 AM
-
Hi
Anyone have a hint for making a menu on each row in a browse.
I have alot of calls to forms and reports for each record in a browse, so buttons is not an option.
Regards Niels
-
I've not done this, and no idea how I would go about doing it.
Bruce
-
Hi Niels,
I haven't done anything like it but could you pop-up a browse (with the relevant menu items) when a row is clicked?
Peter
-
I considered it, but took another approach. You'd have to roll your own html/css, but utilise NTs methodology for calling popups etc. It could be nice and extentionable, certainly better than a bunch of action buttons at the end of a row.
-
Hallo Bruce!
I believe something like this?
https://www.patternfly.org/pattern-library/content-views/table-view/#code
Some of actions we could do it like in this example:
https://www.w3schools.com/css/css_dropdowns.asp
more complicated I see for change or delete... for print/export to PDF it's easy to do it.
But it will be nice to have something like this generated by NT!
Robert
-
Hi All
Thanks for your input.
I have found a solution that I would like to have your comments on. It can't be that easy. Sure I miss something.
Overall, the idea is that I keep all the buttons in the row (hide them via css) so I have all the template generated code.
Then I insert a dropdown link on each line and just copy the OnClick code from then button to my menu.
Works very well.
Ref: https://www.jqueryscript.net/menu/Lightweight-Popup-Menu-Plugin-For-jQuery-Popr.html
Example 1 tweaked and attached.
Regards Niels
-
Hi Niels,
Yeap, thats the way to do it. You've created your own html/js (similar can be done via html/css) but choosing a light weight jquery is a good choice.
I'd suggest creating your own functions that allow you to abstract the menu into functions (or a class, if you lean that way).
This way you can place all the html/js into one place making it easy to upgrade or fix if something changes in your dependencies (jquery, nt, etc).
eg.
DropDownMenu = DDMStart()&|
DDMItem('Item 1','Item1Browse')&|
DDMItem('Item 2','Item2Browse')&|
DDMItem('Item 3',CreatePopup('Item3Browse','Title',...))&|
DDMEnd()
Or a class with a stringtheory object, and a method for adding items, and a method to return the value, that appends and prepends the appropriate html.
Regards
Bill
-
Bill, thanks for your feedback
-
Hallo!
I see for popup forms it works but how can I trigger a button from a link menu instead of a form?
I try something but it doesn't work... :-(
Thank you!
Robert
-
I think you want to start a new thread Robert - detailing what you are wanting to do, what you have tried, and what results you are getting.
cheers
Bruce
-
Oky Doky Bruce!
Done!