Allow to set a customized placeholder for ajax tabs in scrollable mode

This commit is contained in:
Stephen Abello
2021-02-19 17:38:27 +01:00
parent e5d8c885bc
commit ea502e9c81
13 changed files with 355 additions and 46 deletions

View File

@@ -113,13 +113,17 @@ class TabContainer extends UIContentBlock
/**
* @param string $sTabCode
* @param string $sTitle
* @param string|null $sPlaceholder
*
* @return \Combodo\iTop\Application\UI\Base\Layout\TabContainer\Tab\Tab
* @throws \Combodo\iTop\Application\UI\Base\UIException
*/
public function AddAjaxTab(string $sTabCode, string $sTitle): Tab
public function AddAjaxTab(string $sTabCode, string $sTitle, ?string $sPlaceholder = null): Tab
{
$oTab = new AjaxTab($sTabCode, $sTitle);
if($sPlaceholder === null){
$sPlaceholder = AjaxTab::DEFAULT_TAB_PLACEHOLDER_REL_PATH;
}
$oTab = new AjaxTab($sTabCode, $sTitle, $sPlaceholder);
$this->AddSubBlock($oTab);
return $oTab;
}