Page 1 of 1

Open form twice

PostPosted: Wed Jan 09, 2019 2:31 pm
by Martin
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?

Re: Open form twice

PostPosted: Fri Jan 11, 2019 2:26 pm
by Martin
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.

FIX for nuStopClick

PostPosted: Fri Jan 11, 2019 11:56 pm
by kev1n
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');
   }   
}

Re: Open form twice

PostPosted: Thu Jan 24, 2019 12:43 pm
by Martin
kev1n, work like a charm !

Re: Open form twice

PostPosted: Wed Apr 15, 2020 12:50 am
by Martin
I see that this fix has been included in the official nubuilder files.
https://github.com/steven-copley/nubuil ... n.js#L1341

Re: Open form twice

PostPosted: Tue May 12, 2020 12:49 am
by Timo
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 !?

Re: Open form twice

PostPosted: Wed May 13, 2020 5:43 pm
by kev1n
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?

Re: Open form twice

PostPosted: Sat Jun 27, 2020 9:51 pm
by gerese
kev1n wrote: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?


Hi, in this case no jquery is executed from the editing part of the form. (for example I have some hidden fields when I use only click on the record, but .... they appear when I open the editing form using "Ctrl + click" on a record)

Re: Open form twice

PostPosted: Sun Jun 28, 2020 8:28 am
by admin
People,

The fix for nuSelectBrowse() has been added.

Thanks


Steven