mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
Advanced Search: Fix direct links search
SVN:b1162[5603]
This commit is contained in:
@@ -396,6 +396,8 @@ class UILinksWidgetDirect
|
||||
}
|
||||
if ($oCurrentObj != null)
|
||||
{
|
||||
$this->SetSearchDefaultFromContext($oCurrentObj, $oFilter);
|
||||
|
||||
$aArgs = array_merge($oCurrentObj->ToArgs('this'), $oFilter->GetInternalParams());
|
||||
$oFilter->SetInternalParams($aArgs);
|
||||
}
|
||||
|
||||
@@ -184,6 +184,15 @@ $(function()
|
||||
oParams.real_class = '';
|
||||
oParams.att_code = this.options.att_code;
|
||||
oParams.iInputId = this.id;
|
||||
|
||||
// Gather the already linked target objects
|
||||
oParams.aAlreadyLinked = new Array();
|
||||
$('#'+this.id+' .listResults td input:checkbox').each(function () {
|
||||
iKey = parseInt(this.value, 10); // Numbers are in base 10
|
||||
oParams.aAlreadyLinked.push(iKey);
|
||||
}
|
||||
);
|
||||
|
||||
if (this.options.oWizardHelper)
|
||||
{
|
||||
this.options.oWizardHelper.UpdateWizard();
|
||||
|
||||
@@ -58,7 +58,7 @@ class SearchFormTest extends ItopDataTestCase
|
||||
{
|
||||
return array(
|
||||
array("SELECT Contact", 8, 'zlist'),
|
||||
array("SELECT Contact AS C WHERE C.status = 'active'", 2, 'others'),
|
||||
array("SELECT Contact AS C WHERE C.status = 'active'", 3, 'others'),
|
||||
array("SELECT Person", 12, 'zlist'),
|
||||
array(
|
||||
"SELECT Person AS p JOIN UserRequest AS u ON u.agent_id = p.id WHERE u.status != 'closed'",
|
||||
|
||||
Reference in New Issue
Block a user