diff --git a/application/dashlet.class.inc.php b/application/dashlet.class.inc.php index d0ece5dc1..75683b21d 100644 --- a/application/dashlet.class.inc.php +++ b/application/dashlet.class.inc.php @@ -988,6 +988,7 @@ HTML; $oField = new DesignerLongTextField('query', Dict::S('UI:DashletObjectList:Prop-Query'), $this->aProperties['query']); $oField->SetMandatory(); + $oField->AddCSSClass("ibo-queryoql"); $oForm->AddField($oField); $oField = new DesignerBooleanField('menu', Dict::S('UI:DashletObjectList:Prop-Menu'), $this->aProperties['menu']); @@ -1024,6 +1025,7 @@ HTML; $oField = new DesignerHiddenField('query', Dict::S('UI:DashletObjectList:Prop-Query'), $sOQL); $oField->SetMandatory(); + $oField->AddCSSClass("ibo-queryoql"); $oForm->AddField($oField); $oField = new DesignerBooleanField('menu', Dict::S('UI:DashletObjectList:Prop-Menu'), $this->aProperties['menu']); @@ -1373,10 +1375,10 @@ abstract class DashletGroupBy extends Dashlet $oField = new DesignerLongTextField('query', Dict::S('UI:DashletGroupBy:Prop-Query'), $this->aProperties['query']); $oField->SetMandatory(); + $oField->AddCSSClass("ibo-queryoql"); $oForm->AddField($oField); - try - { + try { // Group by field: build the list of possible values (attribute codes + ...) $aGroupBy = $this->GetGroupByOptions($this->aProperties['query']); @@ -1630,16 +1632,14 @@ abstract class DashletGroupBy extends Dashlet $oField = new DesignerHiddenField('query', Dict::S('UI:DashletGroupBy:Prop-Query'), $sOQL); $oField->SetMandatory(); + $oField->AddCSSClass("ibo-queryoql"); $oForm->AddField($oField); - if (!is_null($sOQL)) - { + if (!is_null($sOQL)) { $oField = new DesignerComboField('group_by', Dict::S('UI:DashletGroupBy:Prop-GroupBy'), null); $aGroupBy = $this->GetGroupByOptions($sOQL); $oField->SetAllowedValues($aGroupBy); - } - else - { + } else { // Creating a form for reading parameters! $oField = new DesignerTextField('group_by', Dict::S('UI:DashletGroupBy:Prop-GroupBy'), null); } @@ -2183,6 +2183,7 @@ class DashletHeaderDynamic extends Dashlet $oField = new DesignerLongTextField('query', Dict::S('UI:DashletHeaderDynamic:Prop-Query'), $this->aProperties['query']); $oField->SetMandatory(); + $oField->AddCSSClass("ibo-queryoql"); $oForm->AddField($oField); try diff --git a/application/displayblock.class.inc.php b/application/displayblock.class.inc.php index 680896a29..cb376a810 100644 --- a/application/displayblock.class.inc.php +++ b/application/displayblock.class.inc.php @@ -151,12 +151,6 @@ class DisplayBlock 'order_direction', /** string order direction 'asc' or 'desc' */ 'display_limit', - 'surround_with_panel', - /**bool true if list may be render in panel block*/ - 'panel_title', - /**string title of panel block*/ - 'panel_class', - /**string class for panel block style*/ ], 'csv' => [], 'join' => array_merge([ @@ -179,12 +173,6 @@ class DisplayBlock /**positive or negative*/ 'max_height', /** string Max. height of the list, if not specified will occupy all the available height no matter the pagination */ - 'surround_with_panel', - /**bool true if list may be render in panel block*/ - 'panel_title', - /**string title of panel block*/ - 'panel_class', - /**string class for panel block style*/ ], DataTableUIBlockFactory::GetAllowedParams()), 'list_search' => array_merge([ 'update_history', @@ -271,6 +259,12 @@ class DisplayBlock 'withJSRefreshCallBack', /** true if dashboard page */ 'from_dashboard_page', + /**bool true if list may be render in panel block*/ + 'surround_with_panel', + /**string title of panel block*/ + 'panel_title', + /**string class for panel block style*/ + 'panel_class', ]; if (isset($aAllowedParams[$sStyle])) { @@ -1040,10 +1034,12 @@ JS $sHyperlink = $aCount['link']; $sCountLabel = $aCount['label']; $oPill = PillFactory::MakeForState($sClass, $sStateValue) - ->SetUrl($sHyperlink) ->SetTooltip($sStateLabel) ->AddHtml("$sCountLabel") ->AddHtml("$sStateLabel"); + if ($sHyperlink != '-') { + $oPill->SetUrl($sHyperlink); + } $oBlock->AddSubBlock($oPill); } $aExtraParams['query_params'] = $this->m_oFilter->GetInternalParams(); @@ -1541,6 +1537,13 @@ JS $oBlock->sUrl = $sUrl; + if (isset($aExtraParams["surround_with_panel"]) && $aExtraParams["surround_with_panel"]) { + $oPanel = PanelUIBlockFactory::MakeForClass($aExtraParams["panel_class"], $aExtraParams["panel_title"]); + $oPanel->AddSubBlock($oBlock); + + return $oPanel; + } + return $oBlock; } @@ -1622,6 +1625,13 @@ JS $oBlock->sURLForRefresh = str_replace("'", "\'", $sUrl); break; } + if (isset($aExtraParams["surround_with_panel"]) && $aExtraParams["surround_with_panel"]) { + $oPanel = PanelUIBlockFactory::MakeForClass($aExtraParams["panel_class"], $aExtraParams["panel_title"]); + $oPanel->AddSubBlock($oBlock); + + return $oPanel; + } + return $oBlock; } diff --git a/application/forms.class.inc.php b/application/forms.class.inc.php index ca50712b2..906882d22 100644 --- a/application/forms.class.inc.php +++ b/application/forms.class.inc.php @@ -203,51 +203,41 @@ class DesignerForm $sActionUrl = addslashes($this->sSubmitTo); $sJSSubmitParams = json_encode($this->aSubmitParams); $sFormId = $this->GetFormId(); - if ($this->oParentForm == null) - { + if ($this->oParentForm == null) { $sReturn = '