Commit e5c91702 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update views/grid to add the conversion of column.summaryRenderer.

parent 368bdac7
......@@ -78,6 +78,7 @@
var cfgGrid = {{=XML(cfg_grid)}},
cfgStore = {{=XML(cfg_store)}},
columns = cfgGrid.columns,
features = cfgGrid.features,
divgrid = '{{=divgrid}}',
nColumns = columns.length,
i, grid;
......@@ -87,7 +88,7 @@
// Ext JS 6.0.1 this cause crash of the grid when a hidden column is activated
// The workaround is to destroy the flex property and to use the
// columnWidth instead. the latter is a percentage ranging from 0 to 1.
//
for (i = 0; i < nColumns; i += 1) {
column = columns[i];
if (column.flex !== undefined && column.columnWidth === undefined) {
......@@ -100,18 +101,23 @@
delete column.flex;
}
// convert renderer property
// convert renderer / summaryRenderer properties
// typicaly a string to a function
//
for (i = 0; i < nColumns; i += 1) {
column = columns[i];
if (column.renderer !== undefined) {
column.renderer = eval(column.renderer);
if (columns[i].renderer !== undefined) {
columns[i].renderer = eval(columns[i].renderer);
}
if (columns[i].summaryRenderer !== undefined) {
columns[i].summaryRenderer = eval(columns[i].summaryRenderer);
}
}
// instantiate the grid
//
cfgGrid = Ext.apply(cfgGrid, {
plugins: ['pGridExport', 'pMathJax'],
store: cfgStore,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment