From: Thomas Lamprecht Date: Wed, 23 Jun 2021 17:57:30 +0000 (+0200) Subject: apt repos: move Official to the right & use checkbox to render enabled X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=03c4c65bab76aa0559b98606b13e955deba8c87d;p=proxmox-widget-toolkit.git apt repos: move Official to the right & use checkbox to render enabled Signed-off-by: Thomas Lamprecht --- diff --git a/src/node/APTRepositories.js b/src/node/APTRepositories.js index fd4a350..fb6edaf 100644 --- a/src/node/APTRepositories.js +++ b/src/node/APTRepositories.js @@ -123,27 +123,12 @@ Ext.define('Proxmox.node.APTRepositoriesGrid', { columns: [ { - header: gettext('Official'), - dataIndex: 'OfficialHost', - renderer: function(value, cell, record) { - let icon = (cls) => ``; - - const enabled = record.data.Enabled; - - if (value === undefined || value === null) { - return icon('fa-question-circle-o'); - } - if (!value) { - return icon('fa-times ' + (enabled ? 'critical' : 'faded')); - } - return icon('fa-check ' + (enabled ? 'good' : 'faded')); - }, - width: 70, - }, - { + xtype: 'checkcolumn', header: gettext('Enabled'), dataIndex: 'Enabled', - renderer: Proxmox.Utils.format_enabled_toggle, + listeners: { + beforecheckchange: () => false, // veto, we don't want to allow inline change - to subtle + }, width: 90, }, { @@ -205,6 +190,23 @@ Ext.define('Proxmox.node.APTRepositoriesGrid', { }, flex: 1, }, + { + header: gettext('Official'), + dataIndex: 'OfficialHost', + renderer: function(value, cell, record) { + let icon = (cls) => ``; + + if (value === undefined || value === null) { + return icon('fa-question-circle-o'); + } + const enabled = record.data.Enabled; + if (!value) { + return icon('fa-question ' + (enabled ? 'warning' : 'faded')); + } + return icon('fa-check ' + (enabled ? 'good' : 'faded')); + }, + width: 70, + }, { header: gettext('Comment'), dataIndex: 'Comment',