mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Make ReloadSearchForm work properly when the "submit" event handler is declared either with or without a "namespace" portion (e.g. 'submit.itop' vs 'submit')
SVN:trunk[3816]
This commit is contained in:
@@ -227,13 +227,18 @@ function ReloadSearchForm(divId, sClassName, sBaseClass, sContext)
|
||||
for(var index = 0; index < aSubmit.length; index++)
|
||||
{
|
||||
// Restore the previously bound submit handlers
|
||||
var sEventName = 'submit';
|
||||
if (aSubmit[index].namespace != undefined)
|
||||
{
|
||||
sEventName += '.'+aSubmit[index].namespace;
|
||||
}
|
||||
if (aSubmit[index].data != undefined)
|
||||
{
|
||||
oForm.bind('submit.'+aSubmit[index].namespace, aSubmit[index].data, aSubmit[index].handler)
|
||||
oForm.bind(sEventName, aSubmit[index].data, aSubmit[index].handler)
|
||||
}
|
||||
else
|
||||
{
|
||||
oForm.bind('submit.'+aSubmit[index].namespace, aSubmit[index].handler)
|
||||
oForm.bind(sEventName, aSubmit[index].handler)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user