mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
N°2657 - MTP : Progress Bar has disappeared
This commit is contained in:
@@ -56,6 +56,7 @@ abstract class Controller
|
||||
private $m_aDefaultParams;
|
||||
private $m_aLinkedScripts;
|
||||
private $m_aLinkedStylesheets;
|
||||
private $m_aSaas;
|
||||
private $m_aAjaxTabs;
|
||||
|
||||
|
||||
@@ -69,6 +70,7 @@ abstract class Controller
|
||||
{
|
||||
$this->m_aLinkedScripts = array();
|
||||
$this->m_aLinkedStylesheets = array();
|
||||
$this->m_aSaas = array();
|
||||
$this->m_aAjaxTabs = array();
|
||||
$this->m_aDefaultParams = array();
|
||||
$this->SetViewPath($sViewPath);
|
||||
@@ -291,6 +293,21 @@ abstract class Controller
|
||||
$this->DisplayPage($aParams, $sTemplateName, 'ajax');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display an AJAX page (ajax_page)
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @param array $aParams Params used by the twig template
|
||||
* @param null $sTemplateName Name of the twig template, ie MyTemplate for MyTemplate.html.twig
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function DisplaySetupPage($aParams = array(), $sTemplateName = null)
|
||||
{
|
||||
$this->DisplayPage($aParams, $sTemplateName, 'setup');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the twig page based on the name or the operation
|
||||
*
|
||||
@@ -330,6 +347,10 @@ abstract class Controller
|
||||
{
|
||||
$this->AddLinkedStylesheetToPage($sLinkedStylesheet);
|
||||
}
|
||||
foreach ($this->m_aSaas as $sSaasRelPath)
|
||||
{
|
||||
$this->AddSaasToPage($sSaasRelPath);
|
||||
}
|
||||
$this->OutputPage();
|
||||
}
|
||||
|
||||
@@ -463,6 +484,18 @@ abstract class Controller
|
||||
$this->m_aLinkedStylesheets[] = $sStylesheet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an linked stylesheet to the current Page
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @param string $sSaasRelPath SCSS Stylesheet relative path to link
|
||||
*/
|
||||
public function AddSaas($sSaasRelPath)
|
||||
{
|
||||
$this->m_aSaas[] = $sSaasRelPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an AJAX tab to the current page
|
||||
*
|
||||
@@ -529,6 +562,10 @@ abstract class Controller
|
||||
case 'ajax':
|
||||
$this->m_oPage = new ajax_page($this->GetOperationTitle());
|
||||
break;
|
||||
|
||||
case 'setup':
|
||||
$this->m_oPage = new SetupPage($this->GetOperationTitle());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -572,6 +609,11 @@ abstract class Controller
|
||||
$this->m_oPage->add_linked_stylesheet($sLinkedStylesheet);
|
||||
}
|
||||
|
||||
private function AddSaasToPage($sSaasRelPath)
|
||||
{
|
||||
$this->m_oPage->add_saas($sSaasRelPath);
|
||||
}
|
||||
|
||||
private function AddAjaxTabToPage($sCode, $sTitle, $sURL, $bCache)
|
||||
{
|
||||
$this->m_oPage->AddAjaxTab($sCode, $sURL, $bCache, $sTitle);
|
||||
|
||||
Reference in New Issue
Block a user