47 return Zurmo::t(
'Core',
'Filters');
55 OperatorStaticDropDownElement::registerOnLoadAndOnChangeScript();
73 $content .=
'<div class="wrapper">';
74 $content .=
'<div class="wide form">';
75 $content .=
'<div class="left-column full-width">';
77 list($form, $formStart) = $clipWidget->renderBeginWidget(
79 array(
'id' => static::getFormId(),
81 'enableAjaxValidation' =>
true,
85 $content .= $formStart;
89 $content .= ZurmoHtml::tag(
'div', array(
'class' =>
'dynamic-rows'), $itemsContent);
91 $formEnd = $clipWidget->renderEndWidget();
93 $content .=
'</div></div>';
94 $content .= $this->renderModalContainer();
114 assert(
'is_int($rowCount)');
118 $trackableStructurePosition =
false;
119 $report = $this->params[
"relationModel"];
124 foreach ($report->getFilters() as $filterForReportForm)
126 if ($filterForReportForm->availableAtRunTime)
128 $nodeIdWithoutTreeType = $filterForReportForm->attributeIndexOrDerivedType;
131 $treeType, $rowCount);
135 $rowCount, $inputPrefixData,
137 resolveAttributeByNodeId($nodeIdWithoutTreeType),
138 (
bool)$trackableStructurePosition,
false, null);
139 $view->addWrapper =
false;
140 $items[] = array(
'content' => $view->render());
154 foreach ($items as $item)
156 $content .= ZurmoHtml::tag(
'li', array(), $item[
'content']);
158 return ZurmoHtml::tag(
'ul', array(), $content);
167 'validateOnSubmit' =>
true,
168 'validateOnChange' =>
false,
169 'beforeValidate' =>
'js:$(this).beforeValidateAction',
170 'afterValidate' =>
'js:$(this).afterValidateAjaxAction',
180 return Yii::app()->createUrl(
'reports/default/applyRuntimeFilters',
181 array(
'id' => $this->params[
"relationModel"]->
getId()));
190 return "$('#apply-runtime-filters').removeClass('loading');
191 $('#apply-runtime-filters').removeClass('loading-ajax-submit');
192 $('#ReportResultsGridForPortletView').find('.refreshPortletLink').click();
193 $('#ReportChartForPortletView').find('.refreshPortletLink').click();
194 $('#ReportSQLForPortletView').find('.refreshPortletLink').click();
204 $content =
'<div class="view-toolbar-container clearfix">';
205 $content .=
'<div class="form-toolbar">';
207 $content .=
'</div></div>';
218 $params[
'label'] = Zurmo::t(
'Core',
'Apply');
219 $params[
'htmlOptions'] = array(
'id' =>
'apply-runtime-filters',
220 'onclick' =>
'js:$(this).addClass("attachLoadingTarget");');
222 $this->params[
'relationModel']->
getId(), array());
224 return $resetElement->render() . $applyElement->render();
227 protected function renderModalContainer()
229 return ZurmoHtml::tag(
'div', array(
230 'id' => ModelElement::MODAL_CONTAINER_PREFIX .
'-' . $this->
getFormId()
renderConfigSaveAjax($formName)
renderItems(&$rowCount, WizardActiveForm $form)
static resolveStickyDataToReport(Report $report, array $stickyData)
static resolveInputPrefixData($formModelClassName, $treeType, $rowNumber)
renderViewToolBarContainer($form)
static getDataByKey($key)
getNonSortableListContent(Array $items)
renderViewToolBarLinks($form)