AntonLV před 5 roky
rodič
revize
4c1250d0c9
2 změnil soubory, kde provedl 8 přidání a 3 odebrání
  1. 2 2
      inc/classes/BxDolGrid.php
  2. 6 1
      template/scripts/BxBaseGrid.php

+ 2 - 2
inc/classes/BxDolGrid.php

@@ -416,7 +416,7 @@ class BxDolGrid extends BxDolFactory implements iBxDolFactoryObject, iBxDolRepla
 
         // calculate total records count
         if ($this->_aOptions['show_total_count'] == 1){
-             $this->_iTotalCount = $this->_getDataSqCounter($sQuery, $sFilter);
+             $this->_iTotalCount = $this->_getDataSqlCounter($sQuery, $sFilter);
         }
         
         // add order
@@ -426,7 +426,7 @@ class BxDolGrid extends BxDolFactory implements iBxDolFactoryObject, iBxDolRepla
         return $oDb->getAll($sQuery);
     }
 
-    protected function _getDataSqCounter($sQuery, $sFilter)
+    protected function _getDataSqlCounter($sQuery, $sFilter)
     {
         $oDb = BxDolDb::getInstance();
 

+ 6 - 1
template/scripts/BxBaseGrid.php

@@ -263,7 +263,7 @@ class BxBaseGrid extends BxDolGrid
                     'bx_if:counter' => array (
                         'condition' => $this->_aOptions['show_total_count'] == 1,
                         'content' => array(
-                            'counter' => _t('_sys_grid_total_count', $this->_iTotalCount),
+                            'counter' => $this->_getCounter(),
                         ),
                     ),
                 ),
@@ -623,6 +623,11 @@ class BxBaseGrid extends BxDolGrid
         return $oForm->genRow($aInput);
     }
 
+    protected function _getCounter()
+    {
+        return _t('_sys_grid_total_count', $this->_iTotalCount);
+    }
+
     protected function _limitMaxLength ($mixedValue, $sKey, $aField, $aRow, $isDisplayPopupOnTextOverflow, $bReturnString = true)
     {
         if ($aField['chars_limit'] > 0)