mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-27 11:46:44 +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': {
|
||||
header: gettext('Name'),
|
||||
flex: 2,
|
||||
@ -343,13 +343,12 @@ Ext.define('PVE.storage.ContentView', {
|
||||
},
|
||||
};
|
||||
|
||||
if (!me.showColumns) {
|
||||
me.showColumns = ['name', 'comment', 'date', 'format', 'size'];
|
||||
if (me.hideColumns) {
|
||||
me.hideColumns.forEach(key => delete availableColumns[key]);
|
||||
} else if (!me.hasCommentColumn) {
|
||||
delete availableColumns.comment;
|
||||
}
|
||||
var columns = [];
|
||||
me.showColumns.forEach(function(datum) {
|
||||
columns.push(availableColumns[datum]);
|
||||
});
|
||||
const columns = Object.values(availableColumns);
|
||||
|
||||
Ext.apply(me, {
|
||||
store: store,
|
||||
|
Loading…
Reference in New Issue
Block a user