mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-27 07:17:56 +00:00
ui: reverse showColumns to hideColumns, default to hide comment
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
896475ee5b
commit
6ecc74209f
@ -311,7 +311,7 @@ Ext.define('PVE.storage.ContentView', {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
var availableColumns = {
|
let availableColumns = {
|
||||||
'name': {
|
'name': {
|
||||||
header: gettext('Name'),
|
header: gettext('Name'),
|
||||||
flex: 2,
|
flex: 2,
|
||||||
@ -343,13 +343,12 @@ Ext.define('PVE.storage.ContentView', {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!me.showColumns) {
|
if (me.hideColumns) {
|
||||||
me.showColumns = ['name', 'comment', 'date', 'format', 'size'];
|
me.hideColumns.forEach(key => delete availableColumns[key]);
|
||||||
|
} else if (!me.hasCommentColumn) {
|
||||||
|
delete availableColumns.comment;
|
||||||
}
|
}
|
||||||
var columns = [];
|
const columns = Object.values(availableColumns);
|
||||||
me.showColumns.forEach(function(datum) {
|
|
||||||
columns.push(availableColumns[datum]);
|
|
||||||
});
|
|
||||||
|
|
||||||
Ext.apply(me, {
|
Ext.apply(me, {
|
||||||
store: store,
|
store: store,
|
||||||
|
Loading…
Reference in New Issue
Block a user