Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Open form twice

Questions related to using nuBuilder Forte.
Post Reply
Martin
Posts: 30
Joined: Fri Nov 09, 2018 5:42 pm

Open form twice

Unread post 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?
Martin
Posts: 30
Joined: Fri Nov 09, 2018 5:42 pm

Re: Open form twice

Unread post 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.
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

FIX for nuStopClick

Unread post 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');
	}	
}
Martin
Posts: 30
Joined: Fri Nov 09, 2018 5:42 pm

Re: Open form twice

Unread post by Martin »

kev1n, work like a charm !
Martin
Posts: 30
Joined: Fri Nov 09, 2018 5:42 pm

Re: Open form twice

Unread post by Martin »

I see that this fix has been included in the official nuBuilder files.
https://github.com/steven-copley/nubuil ... n.js#L1341
Timo
Posts: 217
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

Re: Open form twice

Unread post 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 !?
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Open form twice

Unread post 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?
gerese
Posts: 132
Joined: Sun Dec 16, 2018 6:13 pm
Location: România
Has thanked: 30 times
Been thanked: 4 times

Re: Open form twice

Unread post 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)
nuBuilderForte .... BIG Like !!!
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Open form twice

Unread post by admin »

People,

The fix for nuSelectBrowse() has been added.

Thanks


Steven
Post Reply