Open form twice

Questions related to using nuBuilder Forte.

Open form twice

Postby Martin » Wed Jan 09, 2019 2:31 pm

Hello, I'm trying to open the same form twice. I open the first one with ctrl+click. This opens iit in a new tab. If I then click on the same Run Button again, nothing happens. Bug?
Martin
 
Posts: 30
Joined: Sat Nov 10, 2018 2:12 am

Re: Open form twice

Postby Martin » Fri Jan 11, 2019 2:26 pm

Found the reason: nuStopClick(event);

This function prevents a button from being clicked a second time. However, if the ctrl key is pressed, this function should not be called.
Martin
 
Posts: 30
Joined: Sat Nov 10, 2018 2:12 am

FIX for nuStopClick

Postby kev1n » Fri Jan 11, 2019 11:56 pm

Add to Setup/header this fix:

Code: Select all
// FIX: Ctrl + clicking a button will not disable the click event
function nuStopClick(e){
   if(window.nuCLICKER != '' && e.ctrlKey == false ){
      $(e.target).prop('onclick',null).off('click');
   }   
}
kev1n
 
Posts: 717
Joined: Mon Oct 15, 2018 2:13 am

Re: Open form twice

Postby Martin » Thu Jan 24, 2019 12:43 pm

kev1n, work like a charm !
Martin
 
Posts: 30
Joined: Sat Nov 10, 2018 2:12 am

Re: Open form twice

Postby Martin » Wed Apr 15, 2020 12:50 am

I see that this fix has been included in the official nubuilder files.
https://github.com/steven-copley/nubuil ... n.js#L1341
Martin
 
Posts: 30
Joined: Sat Nov 10, 2018 2:12 am

Re: Open form twice

Postby Timo » Tue May 12, 2020 12:49 am

From a Browse form, I'd like to open two different records in two tabs (to compare them etc.)

Ctrl+klick opens the first records.

Ctrl+klick --> nothing happens when clicking the 2nd record !?
Timo
 
Posts: 201
Joined: Fri Mar 16, 2018 5:56 am

Re: Open form twice

Postby kev1n » Wed May 13, 2020 5:43 pm

Change:
Code: Select all
nuSelectBrowse = function (e, t){}               //-- so that it doesn't run twice.


To:

Code: Select all
      if (e.ctrlKey == false) {
          nuSelectBrowse = function (e, t) {} //-- so that it doesn't run twice.
      }


Here:
https://github.com/steven-copley/nubuil ... m.js#L3771


By changing that, you can open as many records from a Browse Screen as you want.

@Steven: Could you include that?
kev1n
 
Posts: 717
Joined: Mon Oct 15, 2018 2:13 am


Return to General