- Better management of (truncated) list of linked objects (Trac #219)

- New type of display block to display some "actions" (New/Search) for a given class of objects.

SVN:trunk[709]
This commit is contained in:
Denis Flaven
2010-08-27 15:34:47 +00:00
parent 88efd37525
commit bd001f8072
2 changed files with 30 additions and 3 deletions

View File

@@ -483,6 +483,10 @@ abstract class cmdbAbstractObject extends CMDBObject
$divId = $aExtraParams['block_id'];
$sFilter = $oSet->GetFilter()->serialize();
$aExtraParams['display_limit'] = false; // To expand the full list
foreach($oSet->GetFilter()->GetInternalParams() as $sName => $sValue)
{
$aExtraParams['query_params'][$sName] = $sValue;
}
$sExtraParams = addslashes(str_replace('"', "'", json_encode($aExtraParams))); // JSON encode, change the style of the quotes and escape them
$sHtml .= '<tr class="containerHeader"><td>'.Dict::Format('UI:TruncatedResults', utils::GetConfig()->GetMinDisplayLimit(), $oSet->Count()).'&nbsp;&nbsp;<a href="#open_'.$divId.'" onClick="Javascript:ReloadTruncatedList(\''.$divId.'\', \''.$sFilter.'\', \''.$sExtraParams.'\');">'.Dict::S('UI:DisplayAll').'</a></td><td>';
$oPage->add_ready_script("$('#{$divId} table.listResults').addClass('truncated');");