Added option to toggle show/hide null values in cells in data-table
This commit is contained in:
parent
716a1606b4
commit
9c05326573
@ -600,6 +600,7 @@
|
|||||||
"view": "View",
|
"view": "View",
|
||||||
"collapse-all": "Collapse all columns",
|
"collapse-all": "Collapse all columns",
|
||||||
"expand-all": "Expand all columns",
|
"expand-all": "Expand all columns",
|
||||||
|
"display-null": "Show/Hide 'null' values in cells",
|
||||||
"reorder-perma": "Reorder rows permanently",
|
"reorder-perma": "Reorder rows permanently",
|
||||||
"by": "By",
|
"by": "By",
|
||||||
"custom-text-trans": "Custom text transform on column",
|
"custom-text-trans": "Custom text transform on column",
|
||||||
|
@ -39,6 +39,7 @@ function DataTableView(div) {
|
|||||||
this._collapsedColumnNames = {};
|
this._collapsedColumnNames = {};
|
||||||
this._sorting = { criteria: [] };
|
this._sorting = { criteria: [] };
|
||||||
this._columnHeaderUIs = [];
|
this._columnHeaderUIs = [];
|
||||||
|
this._shownulls = false;
|
||||||
|
|
||||||
this._showRows(0);
|
this._showRows(0);
|
||||||
}
|
}
|
||||||
@ -134,7 +135,10 @@ DataTableView.prototype.render = function() {
|
|||||||
|
|
||||||
this._renderDataTables(elmts.table[0], elmts.headerTable[0]);
|
this._renderDataTables(elmts.table[0], elmts.headerTable[0]);
|
||||||
this._div.empty().append(html);
|
this._div.empty().append(html);
|
||||||
|
|
||||||
|
// show/hide null values in cells
|
||||||
|
$(".data-table-null").toggle(self._shownulls);
|
||||||
|
|
||||||
this.resize();
|
this.resize();
|
||||||
|
|
||||||
elmts.dataTableContainer[0].scrollLeft = scrollLeft;
|
elmts.dataTableContainer[0].scrollLeft = scrollLeft;
|
||||||
@ -741,6 +745,13 @@ DataTableView.prototype._createMenuForAllColumns = function(elmt) {
|
|||||||
self._collapsedColumnNames = [];
|
self._collapsedColumnNames = [];
|
||||||
self.render();
|
self.render();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: $.i18n._('core-views')["display-null"],
|
||||||
|
id: "core/display-null",
|
||||||
|
click: function() {
|
||||||
|
$(".data-table-null").toggle();
|
||||||
|
self._shownulls = !(self._shownulls);
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -203,6 +203,7 @@ div.data-table-cell-content-numeric > a.data-table-cell-edit {
|
|||||||
|
|
||||||
.data-table-null {
|
.data-table-null {
|
||||||
color: #aaa;
|
color: #aaa;
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.data-table-error {
|
.data-table-error {
|
||||||
|
Loading…
Reference in New Issue
Block a user