Page 1 of 1

Open form twice

Posted: Wed Jan 09, 2019 6:01 am
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

Posted: Fri Jan 11, 2019 5:56 am
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

Posted: Fri Jan 11, 2019 3:26 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

Posted: Thu Jan 24, 2019 4:13 am
by Martin
kev1n, work like a charm !

Re: Open form twice

Posted: Tue Apr 14, 2020 5:20 pm
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

Posted: Mon May 11, 2020 5:19 pm
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

Posted: Wed May 13, 2020 10:13 am
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

Posted: Sat Jun 27, 2020 2:21 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

Posted: Sun Jun 28, 2020 12:58 am
by admin
People,

The fix for nuSelectBrowse() has been added.

Thanks


Steven