From 71fd51a863171d9f462d1311749de717361406a6 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Fri, 2 Mar 2018 14:59:24 +0100 Subject: Bug 1320362: Move indexedDb storage type in the storage inspector into a new column Issue #31 --- devtools/client/shared/widgets/TableWidget.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'devtools/client/shared') diff --git a/devtools/client/shared/widgets/TableWidget.js b/devtools/client/shared/widgets/TableWidget.js index 96c020230d..84645b5b1b 100644 --- a/devtools/client/shared/widgets/TableWidget.js +++ b/devtools/client/shared/widgets/TableWidget.js @@ -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 */ -- cgit v1.2.3