Handle the OnBeforeUnload events to call OnFormCancel handlers when needed so that the plug-ins have a chance to perform some cleanup.

SVN:trunk[1328]
This commit is contained in:
Denis Flaven
2011-07-05 08:46:31 +00:00
parent 8a547bf104
commit 52fb63c0ee
5 changed files with 44 additions and 7 deletions

View File

@@ -1564,7 +1564,8 @@ EOF
}
$iTransactionId = utils::GetNewTransactionId();
$oPage->SetTransactionId($iTransactionId);
$oPage->add("<form action=\"$sFormAction\" id=\"form_{$this->m_iFormId}\" enctype=\"multipart/form-data\" method=\"post\" onSubmit=\"return CheckFields('form_{$this->m_iFormId}', true)\">\n");
$oPage->add("<form action=\"$sFormAction\" id=\"form_{$this->m_iFormId}\" enctype=\"multipart/form-data\" method=\"post\" onSubmit=\"return OnSubmit('form_{$this->m_iFormId}');\">\n");
$oPage->add_ready_script("$(window).unload(function() { OnUnload('$iTransactionId') } );\n");
$oPage->AddTabContainer(OBJECT_PROPERTIES_TAB, $sPrefix);
$oPage->SetCurrentTabContainer(OBJECT_PROPERTIES_TAB);