diff --git a/fin-hypergrid.dev.html b/fin-hypergrid.dev.html index 69dc098fa..903b9f1a7 100644 --- a/fin-hypergrid.dev.html +++ b/fin-hypergrid.dev.html @@ -21341,6 +21341,9 @@ + + + @@ -22437,6 +22440,9 @@ + + + @@ -22680,6 +22686,9 @@ + + + @@ -22976,6 +22985,9 @@ + + + @@ -23272,6 +23284,9 @@ + + + @@ -23606,6 +23621,9 @@ + + + @@ -23716,6 +23734,9 @@ + + + @@ -23895,6 +23916,9 @@ + + + @@ -24549,6 +24573,9 @@ + + + @@ -24835,6 +24862,9 @@ + + + @@ -25025,6 +25055,9 @@ + + + @@ -25209,6 +25242,9 @@ + + + @@ -25407,6 +25443,9 @@ + + + @@ -25722,6 +25761,9 @@ + + + @@ -26357,6 +26399,9 @@ + + + @@ -26508,6 +26553,9 @@ + + + @@ -26606,6 +26654,9 @@ + + + @@ -27469,6 +27520,9 @@ + + + @@ -27667,6 +27721,9 @@ + + + @@ -28120,6 +28177,9 @@ + + + @@ -28735,6 +28795,9 @@ + + + @@ -29172,6 +29235,9 @@ + + + @@ -29603,6 +29669,9 @@ + + + @@ -29649,16 +29718,20 @@ var icommify = function(v) { if (v) { return numeral(v).format('0,0'); + } else if (v === 0) { + return '0.00'; } else { - return v; + return ''; } }; var fcommify = function(v) { if (v) { return numeral(v).format('0,0.00'); + } else if (v === 0) { + return '0.00'; } else { - return v; + return ''; } }; @@ -29686,32 +29759,18 @@ var propertiesMap = { columns: { TEST: { - formatter: function(v) { - if (v) { - var result = numeral(v).format('$0,0.00'); - return result; - } else { - return v; - } - }, + formatter: fcommify, alignment: 'right', modifyConfig: function(cell) { noop(cell); } }, USD: { - formatter: function(v) { - if (v) { - var result = numeral(v).format('0,0.00'); - return result; - } else { - return v; - } - }, + formatter: fcommify, alignment: 'right', modifyConfig: function(cell) { cell.config.fgColor = '#1C4A16'; //'#53FF07'; //green - if (cell.config.value.indexOf('-1') > -1) { + if (cell.config.value < 0) { cell.config.fgColor = '#C13527'; //'#FF1515'; //red } } @@ -29728,7 +29787,7 @@ alignment: 'right', modifyConfig: function(cell) { cell.config.fgColor = '#669203'; //'#53FF07'; //green - if (cell.config.value.indexOf('-1') > -1) { + if (cell.config.value < 0) { cell.config.fgColor = '#C13527'; //'#FF1515'; //red } } @@ -29802,14 +29861,12 @@ var colPropertyAlias = self.block.O.columns[colId]; if (colPropertyAlias) { colProps = columns[colPropertyAlias]; + colProps.modifyConfig(cell); } var formatter = colProps ? colProps.formatter : typeFormatMap[type] || function(v) { return v; }; config.value = formatter(config.value); - if (colPropertyAlias) { - colProps.modifyConfig(cell); - } return cell; }; provider.getFixedColumnCell = function(config) { @@ -30327,6 +30384,9 @@ + + + @@ -30651,6 +30711,9 @@ + + + @@ -30946,6 +31009,9 @@ + + + @@ -31187,6 +31253,9 @@ + + + @@ -31365,6 +31434,9 @@ + + + @@ -31546,6 +31618,9 @@ + + + @@ -31721,6 +31796,9 @@ + + + @@ -31896,6 +31974,9 @@ + + + @@ -32071,6 +32152,9 @@ + + + @@ -32311,6 +32395,9 @@ + + + diff --git a/fin-hypergrid.min.html b/fin-hypergrid.min.html index 3edfa1d1c..2152d2139 100644 --- a/fin-hypergrid.min.html +++ b/fin-hypergrid.min.html @@ -28,4 +28,4 @@ ⬤ {{labelAdapter(item)}} -
  • \ No newline at end of file +
  • \ No newline at end of file diff --git a/polymer/css/behaviors/fin-hypergrid-behavior-base.css b/polymer/css/behaviors/fin-hypergrid-behavior-base.css index 6e07ae269..e6f4bbea5 100644 --- a/polymer/css/behaviors/fin-hypergrid-behavior-base.css +++ b/polymer/css/behaviors/fin-hypergrid-behavior-base.css @@ -49,6 +49,9 @@ + + + diff --git a/polymer/css/behaviors/fin-hypergrid-behavior-default.css b/polymer/css/behaviors/fin-hypergrid-behavior-default.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/behaviors/fin-hypergrid-behavior-default.css +++ b/polymer/css/behaviors/fin-hypergrid-behavior-default.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/behaviors/fin-hypergrid-behavior-gol.css b/polymer/css/behaviors/fin-hypergrid-behavior-gol.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/behaviors/fin-hypergrid-behavior-gol.css +++ b/polymer/css/behaviors/fin-hypergrid-behavior-gol.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/behaviors/fin-hypergrid-behavior-in-memory.css b/polymer/css/behaviors/fin-hypergrid-behavior-in-memory.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/behaviors/fin-hypergrid-behavior-in-memory.css +++ b/polymer/css/behaviors/fin-hypergrid-behavior-in-memory.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/behaviors/fin-hypergrid-behavior-json.css b/polymer/css/behaviors/fin-hypergrid-behavior-json.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/behaviors/fin-hypergrid-behavior-json.css +++ b/polymer/css/behaviors/fin-hypergrid-behavior-json.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/behaviors/fin-hypergrid-behavior-q.css b/polymer/css/behaviors/fin-hypergrid-behavior-q.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/behaviors/fin-hypergrid-behavior-q.css +++ b/polymer/css/behaviors/fin-hypergrid-behavior-q.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/behaviors/fin-hypergrid-behavior-qtree.css b/polymer/css/behaviors/fin-hypergrid-behavior-qtree.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/behaviors/fin-hypergrid-behavior-qtree.css +++ b/polymer/css/behaviors/fin-hypergrid-behavior-qtree.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/behaviors/fin-hypergrid-behavior-web-worker.css b/polymer/css/behaviors/fin-hypergrid-behavior-web-worker.css index 64ffd6a90..96f57f073 100644 --- a/polymer/css/behaviors/fin-hypergrid-behavior-web-worker.css +++ b/polymer/css/behaviors/fin-hypergrid-behavior-web-worker.css @@ -19,5 +19,8 @@ + + + diff --git a/polymer/css/cell-editors/fin-hypergrid-cell-editor-base.css b/polymer/css/cell-editors/fin-hypergrid-cell-editor-base.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/cell-editors/fin-hypergrid-cell-editor-base.css +++ b/polymer/css/cell-editors/fin-hypergrid-cell-editor-base.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/cell-editors/fin-hypergrid-cell-editor-choice.css b/polymer/css/cell-editors/fin-hypergrid-cell-editor-choice.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/cell-editors/fin-hypergrid-cell-editor-choice.css +++ b/polymer/css/cell-editors/fin-hypergrid-cell-editor-choice.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/cell-editors/fin-hypergrid-cell-editor-color.css b/polymer/css/cell-editors/fin-hypergrid-cell-editor-color.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/cell-editors/fin-hypergrid-cell-editor-color.css +++ b/polymer/css/cell-editors/fin-hypergrid-cell-editor-color.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/cell-editors/fin-hypergrid-cell-editor-date.css b/polymer/css/cell-editors/fin-hypergrid-cell-editor-date.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/cell-editors/fin-hypergrid-cell-editor-date.css +++ b/polymer/css/cell-editors/fin-hypergrid-cell-editor-date.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/cell-editors/fin-hypergrid-cell-editor-simple.css b/polymer/css/cell-editors/fin-hypergrid-cell-editor-simple.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/cell-editors/fin-hypergrid-cell-editor-simple.css +++ b/polymer/css/cell-editors/fin-hypergrid-cell-editor-simple.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/cell-editors/fin-hypergrid-cell-editor-slider.css b/polymer/css/cell-editors/fin-hypergrid-cell-editor-slider.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/cell-editors/fin-hypergrid-cell-editor-slider.css +++ b/polymer/css/cell-editors/fin-hypergrid-cell-editor-slider.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/cell-editors/fin-hypergrid-cell-editor-spinner.css b/polymer/css/cell-editors/fin-hypergrid-cell-editor-spinner.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/cell-editors/fin-hypergrid-cell-editor-spinner.css +++ b/polymer/css/cell-editors/fin-hypergrid-cell-editor-spinner.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/cell-editors/fin-hypergrid-cell-editor-textfield.css b/polymer/css/cell-editors/fin-hypergrid-cell-editor-textfield.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/cell-editors/fin-hypergrid-cell-editor-textfield.css +++ b/polymer/css/cell-editors/fin-hypergrid-cell-editor-textfield.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/data.css b/polymer/css/data.css index 5b39f37a7..c846af796 100644 --- a/polymer/css/data.css +++ b/polymer/css/data.css @@ -103,6 +103,9 @@ + + + diff --git a/polymer/css/features/fin-hypergrid-feature-base.css b/polymer/css/features/fin-hypergrid-feature-base.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/features/fin-hypergrid-feature-base.css +++ b/polymer/css/features/fin-hypergrid-feature-base.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/features/fin-hypergrid-feature-cell-click.css b/polymer/css/features/fin-hypergrid-feature-cell-click.css index 03cee4fe4..ffa2eca8b 100644 --- a/polymer/css/features/fin-hypergrid-feature-cell-click.css +++ b/polymer/css/features/fin-hypergrid-feature-cell-click.css @@ -67,6 +67,9 @@ + + + diff --git a/polymer/css/features/fin-hypergrid-feature-cell-editing.css b/polymer/css/features/fin-hypergrid-feature-cell-editing.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/features/fin-hypergrid-feature-cell-editing.css +++ b/polymer/css/features/fin-hypergrid-feature-cell-editing.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/features/fin-hypergrid-feature-cell-selection.css b/polymer/css/features/fin-hypergrid-feature-cell-selection.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/features/fin-hypergrid-feature-cell-selection.css +++ b/polymer/css/features/fin-hypergrid-feature-cell-selection.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/features/fin-hypergrid-feature-column-moving.css b/polymer/css/features/fin-hypergrid-feature-column-moving.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/features/fin-hypergrid-feature-column-moving.css +++ b/polymer/css/features/fin-hypergrid-feature-column-moving.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/features/fin-hypergrid-feature-column-resizing.css b/polymer/css/features/fin-hypergrid-feature-column-resizing.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/features/fin-hypergrid-feature-column-resizing.css +++ b/polymer/css/features/fin-hypergrid-feature-column-resizing.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/features/fin-hypergrid-feature-column-sorting.css b/polymer/css/features/fin-hypergrid-feature-column-sorting.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/features/fin-hypergrid-feature-column-sorting.css +++ b/polymer/css/features/fin-hypergrid-feature-column-sorting.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/features/fin-hypergrid-feature-key-paging.css b/polymer/css/features/fin-hypergrid-feature-key-paging.css index 96f57f073..970969985 100644 --- a/polymer/css/features/fin-hypergrid-feature-key-paging.css +++ b/polymer/css/features/fin-hypergrid-feature-key-paging.css @@ -20,6 +20,9 @@ + + + diff --git a/polymer/css/features/fin-hypergrid-feature-on-hover.css b/polymer/css/features/fin-hypergrid-feature-on-hover.css index f98fc039f..89024f009 100644 --- a/polymer/css/features/fin-hypergrid-feature-on-hover.css +++ b/polymer/css/features/fin-hypergrid-feature-on-hover.css @@ -75,6 +75,9 @@ + + + diff --git a/polymer/css/features/fin-hypergrid-feature-overlay.css b/polymer/css/features/fin-hypergrid-feature-overlay.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/features/fin-hypergrid-feature-overlay.css +++ b/polymer/css/features/fin-hypergrid-feature-overlay.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/features/fin-hypergrid-feature-row-resizing.css b/polymer/css/features/fin-hypergrid-feature-row-resizing.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/features/fin-hypergrid-feature-row-resizing.css +++ b/polymer/css/features/fin-hypergrid-feature-row-resizing.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/features/fin-hypergrid-feature-thumbwheel-scrolling.css b/polymer/css/features/fin-hypergrid-feature-thumbwheel-scrolling.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/features/fin-hypergrid-feature-thumbwheel-scrolling.css +++ b/polymer/css/features/fin-hypergrid-feature-thumbwheel-scrolling.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/fin-hypergrid-cell-provider.css b/polymer/css/fin-hypergrid-cell-provider.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/fin-hypergrid-cell-provider.css +++ b/polymer/css/fin-hypergrid-cell-provider.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/fin-hypergrid-excel.css b/polymer/css/fin-hypergrid-excel.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/fin-hypergrid-excel.css +++ b/polymer/css/fin-hypergrid-excel.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/fin-hypergrid-renderer.css b/polymer/css/fin-hypergrid-renderer.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/fin-hypergrid-renderer.css +++ b/polymer/css/fin-hypergrid-renderer.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/fin-hypergrid-selection-model.css b/polymer/css/fin-hypergrid-selection-model.css index ab1493c9c..1d03609df 100644 --- a/polymer/css/fin-hypergrid-selection-model.css +++ b/polymer/css/fin-hypergrid-selection-model.css @@ -153,6 +153,9 @@ + + + diff --git a/polymer/css/fin-hypergrid.css b/polymer/css/fin-hypergrid.css index 3167f359b..653ef9cc7 100644 --- a/polymer/css/fin-hypergrid.css +++ b/polymer/css/fin-hypergrid.css @@ -219,6 +219,9 @@ fin-vampire-bar { + + + diff --git a/polymer/js/behaviors/fin-hypergrid-behavior-qtree.js b/polymer/js/behaviors/fin-hypergrid-behavior-qtree.js index c52a81fe8..84a84ef37 100644 --- a/polymer/js/behaviors/fin-hypergrid-behavior-qtree.js +++ b/polymer/js/behaviors/fin-hypergrid-behavior-qtree.js @@ -38,16 +38,20 @@ var icommify = function(v) { if (v) { return numeral(v).format('0,0'); + } else if (v === 0) { + return '0.00'; } else { - return v; + return ''; } }; var fcommify = function(v) { if (v) { return numeral(v).format('0,0.00'); + } else if (v === 0) { + return '0.00'; } else { - return v; + return ''; } }; @@ -75,32 +79,18 @@ var propertiesMap = { columns: { TEST: { - formatter: function(v) { - if (v) { - var result = numeral(v).format('$0,0.00'); - return result; - } else { - return v; - } - }, + formatter: fcommify, alignment: 'right', modifyConfig: function(cell) { noop(cell); } }, USD: { - formatter: function(v) { - if (v) { - var result = numeral(v).format('0,0.00'); - return result; - } else { - return v; - } - }, + formatter: fcommify, alignment: 'right', modifyConfig: function(cell) { cell.config.fgColor = '#1C4A16'; //'#53FF07'; //green - if (cell.config.value.indexOf('-1') > -1) { + if (cell.config.value < 0) { cell.config.fgColor = '#C13527'; //'#FF1515'; //red } } @@ -117,7 +107,7 @@ alignment: 'right', modifyConfig: function(cell) { cell.config.fgColor = '#669203'; //'#53FF07'; //green - if (cell.config.value.indexOf('-1') > -1) { + if (cell.config.value < 0) { cell.config.fgColor = '#C13527'; //'#FF1515'; //red } } @@ -191,14 +181,12 @@ var colPropertyAlias = self.block.O.columns[colId]; if (colPropertyAlias) { colProps = columns[colPropertyAlias]; + colProps.modifyConfig(cell); } var formatter = colProps ? colProps.formatter : typeFormatMap[type] || function(v) { return v; }; config.value = formatter(config.value); - if (colPropertyAlias) { - colProps.modifyConfig(cell); - } return cell; }; provider.getFixedColumnCell = function(config) {