#765: prevent two persons to edit the same object at the same time.

SVN:trunk[3617]
This commit is contained in:
Denis Flaven
2015-07-02 15:40:39 +00:00
parent 7f65e9fd5e
commit 9917d6355c
13 changed files with 784 additions and 69 deletions

View File

@@ -90,14 +90,17 @@ function ActivateStep(iTargetStep)
//$('#wizStep'+(iTargetStep)).block({ message: null });
}
function OnUnload(sTransactionId)
function OnUnload(sTransactionId, sObjClass, iObjKey, sToken)
{
if (!window.bInSubmit)
{
// If it's not a submit, then it's a "cancel" (Pressing the Cancel button, closing the window, using the back button...)
$.post(GetAbsoluteUrlAppRoot()+'pages/ajax.render.php', {operation: 'on_form_cancel', transaction_id: sTransactionId }, function()
{
// Do nothing for now...
// IMPORTANT: the ajax request MUST BE synchronous to be executed in this context
$.ajax({
url: GetAbsoluteUrlAppRoot()+'pages/ajax.render.php',
async: false,
method: 'POST',
data: {operation: 'on_form_cancel', transaction_id: sTransactionId, obj_class: sObjClass, obj_key: iObjKey, token: sToken }
});
}
}