Bug 1320362: Move indexedDb storage type in the storage inspector into a new column

Issue #31
This commit is contained in:
janekptacijarabaci 2018-03-02 14:59:24 +01:00 committed by Roy Tam
commit 1ea18fdaf7
6 changed files with 51 additions and 6 deletions

View file

@ -719,6 +719,10 @@ TableWidget.prototype = {
if (hiddenColumns.includes(id) || privateColumns.includes(id)) {
// Hide the column.
this.columns.get(id).toggleColumn();
if (privateColumns.includes(id)) {
this.columns.get(id).private = true;
}
}
}
this.sortedOn = sortOn;
@ -978,6 +982,9 @@ module.exports.TableWidget = TableWidget;
* The displayed string on the column's header.
*/
function Column(table, id, header) {
// By default cells are visible in the UI.
this._private = false;
this.tbody = table.tbody;
this.document = table.document;
this.window = table.window;
@ -1060,6 +1067,23 @@ Column.prototype = {
return this._sortState || 0;
},
/**
* Get the private state of the column (visibility in the UI).
*/
get private() {
return this._private;
},
/**
* Set the private state of the column (visibility in the UI).
*
* @param {Boolean} state
* Private (true or false)
*/
set private(state) {
this._private = state;
},
/**
* Sets the sorted value
*/