mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 01:58:47 +02:00
New flag to open/collapse the search form at the top of a page in an OQLMenuNode.
SVN:trunk[4052]
This commit is contained in:
@@ -618,6 +618,7 @@ class OQLMenuNode extends MenuNode
|
||||
protected $sPageTitle;
|
||||
protected $sOQL;
|
||||
protected $bSearch;
|
||||
protected $bSearchFormOpen;
|
||||
|
||||
/**
|
||||
* Extra parameters to be passed to the display block to fine tune its appearence
|
||||
@@ -637,12 +638,13 @@ class OQLMenuNode extends MenuNode
|
||||
* @param integer $iAllowedResults Expected "rights" for the action: either UR_ALLOWED_YES, UR_ALLOWED_NO, UR_ALLOWED_DEPENDS or a mix of them...
|
||||
* @return MenuNode
|
||||
*/
|
||||
public function __construct($sMenuId, $sOQL, $iParentIndex, $fRank = 0, $bSearch = false, $sEnableClass = null, $iActionCode = null, $iAllowedResults = UR_ALLOWED_YES, $sEnableStimulus = null)
|
||||
public function __construct($sMenuId, $sOQL, $iParentIndex, $fRank = 0, $bSearch = false, $sEnableClass = null, $iActionCode = null, $iAllowedResults = UR_ALLOWED_YES, $sEnableStimulus = null, $bSearchFormOpen = true)
|
||||
{
|
||||
parent::__construct($sMenuId, $iParentIndex, $fRank, $sEnableClass, $iActionCode, $iAllowedResults, $sEnableStimulus);
|
||||
$this->sPageTitle = "Menu:$sMenuId+";
|
||||
$this->sOQL = $sOQL;
|
||||
$this->bSearch = $bSearch;
|
||||
$this->bSearchFormOpen = $bSearchFormOpen;
|
||||
$this->m_aParams = array();
|
||||
$this->aReflectionProperties['oql'] = $sOQL;
|
||||
$this->aReflectionProperties['do_search'] = $bSearch;
|
||||
@@ -671,7 +673,7 @@ class OQLMenuNode extends MenuNode
|
||||
Dict::S($this->sPageTitle),
|
||||
'Menu_'.$this->GetMenuId(),
|
||||
$this->bSearch, // Search pane
|
||||
true, // Search open
|
||||
$this->bSearchFormOpen, // Search open
|
||||
$oPage,
|
||||
array_merge($this->m_aParams, $aExtraParams),
|
||||
true
|
||||
|
||||
@@ -1738,7 +1738,8 @@ EOF;
|
||||
case 'OQLMenuNode':
|
||||
$sOQL = self::QuoteForPHP($oMenu->GetChildText('oql'));
|
||||
$bSearch = ($oMenu->GetChildText('do_search') == '1') ? 'true' : 'false';
|
||||
$sNewMenu = "new OQLMenuNode('$sMenuId', $sOQL, $sParentSpec, $fRank, $bSearch);";
|
||||
$sSearchFormOpen = ($oMenu->GetChildText('search_form_open') == '1') ? 'true' : 'false';
|
||||
$sNewMenu = "new OQLMenuNode('$sMenuId', $sOQL, $sParentSpec, $fRank, $bSearch, $sSearchFormOpen);";
|
||||
break;
|
||||
|
||||
case 'NewObjectMenuNode':
|
||||
|
||||
Reference in New Issue
Block a user