Fix that columns named « toString » are displayed as collapsed (#2531)
Closes #2451
This commit is contained in:
parent
d7ee1f5b3d
commit
5c6386f5cb
@ -229,7 +229,7 @@ DataTableView.prototype._renderDataTables = function(table, headerTable) {
|
||||
for (var c = 0; c < columns.length; c++) {
|
||||
var column = columns[c];
|
||||
var td = tr.insertCell(tr.cells.length);
|
||||
if (column.name in self._collapsedColumnNames) {
|
||||
if (self._collapsedColumnNames.hasOwnProperty(column.name)) {
|
||||
$(td).html(' ');
|
||||
} else {
|
||||
for (var k = 0; k < keys.length; k++) {
|
||||
@ -316,7 +316,7 @@ DataTableView.prototype._renderDataTables = function(table, headerTable) {
|
||||
var createColumnHeader = function(column, index) {
|
||||
var td = trHead.insertCell(trHead.cells.length);
|
||||
$(td).addClass("column-header").attr('title', column.name);
|
||||
if (column.name in self._collapsedColumnNames) {
|
||||
if (self._collapsedColumnNames.hasOwnProperty(column.name)) {
|
||||
$(td).html(" ").click(function(evt) {
|
||||
delete self._collapsedColumnNames[column.name];
|
||||
self.render();
|
||||
@ -405,7 +405,7 @@ DataTableView.prototype._renderDataTables = function(table, headerTable) {
|
||||
for (var i = 0; i < columns.length; i++) {
|
||||
var column = columns[i];
|
||||
var td = tr.insertCell(tr.cells.length);
|
||||
if (column.name in self._collapsedColumnNames) {
|
||||
if (self._collapsedColumnNames.hasOwnProperty(column.name)) {
|
||||
td.innerHTML = " ";
|
||||
} else {
|
||||
var cell = (column.cellIndex < cells.length) ? cells[column.cellIndex] : null;
|
||||
|
Loading…
Reference in New Issue
Block a user