Welcome to the nuBuilder Forums!
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Open form twice
-
- Posts: 30
- Joined: Fri Nov 09, 2018 5:42 pm
Open form twice
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?
-
- Posts: 30
- Joined: Fri Nov 09, 2018 5:42 pm
Re: Open form twice
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.
This function prevents a button from being clicked a second time. However, if the ctrl key is pressed, this function should not be called.
-
- nuBuilder Team
- Posts: 4581
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 536 times
- Contact:
FIX for nuStopClick
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');
}
}
-
- Posts: 30
- Joined: Fri Nov 09, 2018 5:42 pm
-
- Posts: 30
- Joined: Fri Nov 09, 2018 5:42 pm
Re: Open form twice
I see that this fix has been included in the official nuBuilder files.
https://github.com/steven-copley/nubuil ... n.js#L1341
https://github.com/steven-copley/nubuil ... n.js#L1341
Re: Open form twice
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 !?
Ctrl+klick opens the first records.
Ctrl+klick --> nothing happens when clicking the 2nd record !?
-
- nuBuilder Team
- Posts: 4581
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 536 times
- Contact:
Re: Open form twice
Change:
To:
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?
Code: Select all
nuSelectBrowse = function (e, t){} //-- so that it doesn't run twice.
Code: Select all
if (e.ctrlKey == false) {
nuSelectBrowse = function (e, t) {} //-- so that it doesn't run twice.
}
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?
-
- 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
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)kev1n wrote:Change:To:Code: Select all
nuSelectBrowse = function (e, t){} //-- so that it doesn't run twice.
Here:Code: Select all
if (e.ctrlKey == false) { nuSelectBrowse = function (e, t) {} //-- so that it doesn't run twice. }
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?
nuBuilderForte .... BIG Like !!!