Save & Close

Questions related to customising nuBuilder Forte with JavaScript or PHP.

Save & Close

Unread postby vario » Sat Sep 25, 2021 2:46 am

In nuBuilderPro I could do a "save & close" using nuSaveForm with operation=2.

My workaround is to call nuSaveAction() followed by nuGetBreadcrumb() but nuGetBreadcrumb executes before the save has returned, so I have the following workaround:

Code: Select all
nuSaveAction();
setTimeout(() => { nuGetBreadcrumb(2); }, 500);


Is this a reasonable method or does anyone have a better suggestion?
vario
 
Posts: 74
Joined: Mon Dec 05, 2011 8:53 pm
Location: Newton Abbot, UK
nuBuilder Version: 4.5

Re: Save & Close

Unread postby kev1n » Sat Sep 25, 2021 3:57 am

kev1n
nuBuilder Team
 
Posts: 2062
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: Save & Close

Unread postby vario » Sun Sep 26, 2021 5:42 pm

I have a form to apply pre-defined adjustments to (potentially) alot of data and trying to keep the number of user clicks to a minimum.
I have the "save & close" in the click event of buttons (one for each adjustment type) on the edit form, so not quite what I'm looking for as this still makes two clicks per adjustment!
vario
 
Posts: 74
Joined: Mon Dec 05, 2011 8:53 pm
Location: Newton Abbot, UK
nuBuilder Version: 4.5

Re: Save & Close

Unread postby kev1n » Sun Sep 26, 2021 11:18 pm

To be honest, I don't quite understand what you are trying to do. Apparently, it's not just a save + close
kev1n
nuBuilder Team
 
Posts: 2062
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: Save & Close

Unread postby vario » Fri Oct 01, 2021 6:46 pm

It is save&close, just done from the onclick event of a button, after modifying the data:

Code: Select all
$('#ftx_pos_regno').val($('#ftx_card_vrn_driver').val()).change();
$('#ftx_exception').val('0').change();
nuSaveAction();
setTimeout(() => { nuOpenPreviousBreadcrumb(); }, 500);
vario
 
Posts: 74
Joined: Mon Dec 05, 2011 8:53 pm
Location: Newton Abbot, UK
nuBuilder Version: 4.5


Return to Custom Code

Who is online

Users browsing this forum: pmjd and 8 guests