mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 01:28:47 +02:00
Advanced Search
SVN:b1162[5391]
This commit is contained in:
@@ -50,7 +50,9 @@ class NiceWebPage extends WebPage
|
||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/datatable.js');
|
||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.positionBy.js');
|
||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.popupmenu.js');
|
||||
$this->add_ready_script(
|
||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_handler.js');
|
||||
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria.js');
|
||||
$this->add_ready_script(
|
||||
<<< EOF
|
||||
//add new widget called TruncatedList to properly display truncated lists when they are sorted
|
||||
$.tablesorter.addWidget({
|
||||
|
||||
@@ -38,6 +38,15 @@ use WebPage;
|
||||
|
||||
class SearchForm
|
||||
{
|
||||
/**
|
||||
* @param \WebPage $oPage
|
||||
* @param \CMDBObjectSet $oSet
|
||||
* @param array $aExtraParams
|
||||
*
|
||||
* @return string
|
||||
* @throws \CoreException
|
||||
* @throws \DictExceptionMissingString
|
||||
*/
|
||||
public static function GetSearchForm(WebPage $oPage, CMDBObjectSet $oSet, $aExtraParams = array())
|
||||
{
|
||||
$sHtml = '';
|
||||
@@ -110,8 +119,6 @@ class SearchForm
|
||||
),
|
||||
);
|
||||
|
||||
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_handler.js');
|
||||
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria.js');
|
||||
$oPage->add_ready_script('$("#fs_'.$sSearchFormId.'").search_form_handler('.json_encode($aSearchParams).');');
|
||||
|
||||
return $sHtml;
|
||||
@@ -137,10 +144,10 @@ class SearchForm
|
||||
$aField['code'] = $sFilterCode;
|
||||
$aField['class'] = $sClassName;
|
||||
$aField['class_alias'] = $sClassAlias;
|
||||
$aField['label'] = Dict::S('Class:'.$sClassName.'/Attribute:'.$sFilterCode);
|
||||
if (array_key_exists($sFilterCode, $aAttrDefs))
|
||||
{
|
||||
$oAttrDef = $aAttrDefs[$sFilterCode];
|
||||
$aField['label'] = $oAttrDef->GetLabel();
|
||||
$aField['widget'] = $oAttrDef->GetSearchType();
|
||||
$aField['allowed_values'] = self::GetFieldAllowedValues($oAttrDef);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user