Page 1 of 1

Save & Close

Posted: Fri Sep 24, 2021 7:16 pm
by vario
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?

Re: Save & Close

Posted: Fri Sep 24, 2021 8:27 pm
by kev1n

Re: Save & Close

Posted: Sun Sep 26, 2021 10:12 am
by vario
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!

Re: Save & Close

Posted: Sun Sep 26, 2021 3:48 pm
by kev1n
To be honest, I don't quite understand what you are trying to do. Apparently, it's not just a save + close

Re: Save & Close

Posted: Fri Oct 01, 2021 11:16 am
by vario
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);