NetTalk Central

Author Topic: Menu on a row in a browse?  (Read 3906 times)

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 418
    • View Profile
    • Email
Menu on a row in a browse?
« 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11155
    • View Profile
Re: Menu on a row in a browse?
« Reply #1 on: September 07, 2018, 09:06:26 PM »
I've not done this, and no idea how I would go about doing it.

Bruce

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: Menu on a row in a browse?
« Reply #2 on: September 07, 2018, 11:10:08 PM »
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

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: Menu on a row in a browse?
« Reply #3 on: September 07, 2018, 11:16:23 PM »
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.

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 469
    • View Profile
    • Email
Re: Menu on a row in a browse?
« Reply #4 on: September 08, 2018, 10:49:20 AM »
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

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 418
    • View Profile
    • Email
Re: Menu on a row in a browse?
« Reply #5 on: September 13, 2018, 02:37:10 AM »
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

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: Menu on a row in a browse?
« Reply #6 on: September 13, 2018, 03:02:03 AM »
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
« Last Edit: September 13, 2018, 03:05:07 AM by bshields »

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 418
    • View Profile
    • Email
Re: Menu on a row in a browse?
« Reply #7 on: September 14, 2018, 01:19:03 AM »
Bill, thanks  for your feedback

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 469
    • View Profile
    • Email
Re: Menu on a row in a browse?
« Reply #8 on: September 25, 2018, 06:29:18 AM »
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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11155
    • View Profile
Re: Menu on a row in a browse?
« Reply #9 on: September 25, 2018, 09:55:37 PM »
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

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 469
    • View Profile
    • Email
Re: Menu on a row in a browse?
« Reply #10 on: September 25, 2018, 10:39:59 PM »
Oky Doky Bruce!
Done!