HomeHelpTrac

Changeset 15727 for trunk/templates


Ignore:
Timestamp:
12/06/11 22:25:16 (6 months ago)
Author:
Alexander Trofimov
Message:

Grid - allow to override popup options

Location:
trunk/templates/base
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/templates/base/grid.html

    r15711 r15727  
    8181                order_dir: '__order_dir__', 
    8282                text_search_input: '<bx_text_js:_sys_grid_search />', 
     83                popup_options: __popup_options__, 
    8384                columns: __columns__ 
    8485            }); 
  • trunk/templates/base/scripts/BxBaseGrid.php

    r15724 r15727  
    1818 
    1919    protected $_oTemplate; 
     20    protected $_aPopupOptions = false; 
    2021 
    2122    public function __construct ($aOptions, $oTemplate) { 
     
    152153            $aData = $this->_getData ($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage); 
    153154 
     155        } 
     156 
     157        $sPopupOptions = '{}'; 
     158        if (!empty($this->_aPopupOptions) && is_array($this->_aPopupOptions)) { 
     159            require_once(BX_DIRECTORY_PATH_PLUGINS . 'Services_JSON.php'); 
     160            $oParser = new Services_JSON(); 
     161            $sPopupOptions = $oParser->encode($this->_aPopupOptions); 
    154162        } 
    155163 
     
    173181            'order_field' => bx_js_string($sOrderField, BX_JS_STR_APOS), 
    174182            'order_dir' => bx_js_string($sOrderDir, BX_JS_STR_APOS), 
     183            'popup_options' => $sPopupOptions, 
    175184            'columns' => count($this->_aOptions['fields']), 
    176185            'bx_if:actions_bulk' => array ( 
Note: See TracChangeset for help on using the changeset viewer.