summaryrefslogtreecommitdiffstats
path: root/devtools/client/shared/widgets/TableWidget.js
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-02 14:59:24 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-02 14:59:24 +0100
commit71fd51a863171d9f462d1311749de717361406a6 (patch)
treeb071df1f04808b437eb3d8dac6017b42ab7b2950 /devtools/client/shared/widgets/TableWidget.js
parent43ddb9b8c08ac148a9b03f16f45ec2cb71243f81 (diff)
downloadUXP-71fd51a863171d9f462d1311749de717361406a6.tar
UXP-71fd51a863171d9f462d1311749de717361406a6.tar.gz
UXP-71fd51a863171d9f462d1311749de717361406a6.tar.lz
UXP-71fd51a863171d9f462d1311749de717361406a6.tar.xz
UXP-71fd51a863171d9f462d1311749de717361406a6.zip
Bug 1320362: Move indexedDb storage type in the storage inspector into a new column
Issue #31
Diffstat (limited to 'devtools/client/shared/widgets/TableWidget.js')
-rw-r--r--devtools/client/shared/widgets/TableWidget.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/devtools/client/shared/widgets/TableWidget.js b/devtools/client/shared/widgets/TableWidget.js
index 96c020230..84645b5b1 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;
@@ -1061,6 +1068,23 @@ Column.prototype = {
},
/**
+ * 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
*/
set sorted(value) {