Support of derived classes in "add_remove" edition mode for AttributeLinkSet fields (the search form was not refreshing / loading properly when toggling the class to search for).

SVN:2.1.1[3824]
This commit is contained in:
Denis Flaven
2015-11-20 14:26:05 +00:00
parent b4b25b3c5b
commit 7c3a3820b7
3 changed files with 7 additions and 3 deletions

View File

@@ -294,7 +294,7 @@ class UILinksWidgetDirect
$valuesDef = $oLinksetDef->GetValuesDef(); $valuesDef = $oLinksetDef->GetValuesDef();
if ($valuesDef === null) if ($valuesDef === null)
{ {
$oFilter = new DBObjectSearch($this->sLinkedClass); $oFilter = new DBObjectSearch($sRemoteClass);
} }
else else
{ {

View File

@@ -238,8 +238,12 @@ $(function()
} }
); );
oParams.operation = 'searchObjectsToAdd2'; oParams.operation = 'searchObjectsToAdd2';
oParams['class'] = this.options.class_name;
oParams.real_class = ''; oParams.real_class = '';
if ((oParams['class'] != undefined) && (oParams['class'] != ''))
{
oParams.real_class = oParams['class'];
}
oParams['class'] = this.options.class_name;
oParams.att_code = this.options.att_code; oParams.att_code = this.options.att_code;
oParams.iInputId = this.id; oParams.iInputId = this.id;
if (this.options.oWizardHelper) if (this.options.oWizardHelper)

View File

@@ -201,7 +201,7 @@ function ReloadSearchForm(divId, sClassName, sBaseClass, sContext)
{ {
// Restore the previously bound submit handlers // Restore the previously bound submit handlers
var sEventName = 'submit'; var sEventName = 'submit';
if (aSubmit[index].namespace != undefined) if ((aSubmit[index].namespace != undefined) && (aSubmit[index].namespace != ''))
{ {
sEventName += '.'+aSubmit[index].namespace; sEventName += '.'+aSubmit[index].namespace;
} }