public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 8/9] ui: use isActionDisabled
Date: Wed, 26 May 2021 11:12:05 +0200	[thread overview]
Message-ID: <20210526091206.21979-9-d.csapak@proxmox.com> (raw)
In-Reply-To: <20210526091206.21979-1-d.csapak@proxmox.com>

isDisabled is deprecated for actions in actioncolumns
(it produces a warning for now)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/datastore/Content.js   | 12 ++++++------
 www/tape/BackupOverview.js |  2 +-
 www/tape/ChangerStatus.js  | 18 +++++++++---------
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/www/datastore/Content.js b/www/datastore/Content.js
index 5be5bb93..101763aa 100644
--- a/www/datastore/Content.js
+++ b/www/datastore/Content.js
@@ -632,19 +632,19 @@ Ext.define('PBS.DataStoreContent', {
 		    handler: 'onVerify',
 		    getTip: (v, m, rec) => Ext.String.format(gettext("Verify '{0}'"), v),
 		    getClass: (v, m, rec) => rec.data.leaf ? 'pmx-hidden' : 'pve-icon-verify-lettering',
-		    isDisabled: (v, r, c, i, rec) => !!rec.data.leaf,
+		    isActionDisabled: (v, r, c, i, rec) => !!rec.data.leaf,
                 },
                 {
 		    handler: 'onChangeOwner',
 		    getClass: (v, m, rec) => rec.parentNode.id ==='root' ? 'fa fa-user' : 'pmx-hidden',
 		    getTip: (v, m, rec) => Ext.String.format(gettext("Change owner of '{0}'"), v),
-		    isDisabled: (v, r, c, i, rec) => rec.parentNode.id !=='root',
+		    isActionDisabled: (v, r, c, i, rec) => rec.parentNode.id !=='root',
                 },
 		{
 		    handler: 'onPrune',
 		    getTip: (v, m, rec) => Ext.String.format(gettext("Prune '{0}'"), v),
 		    getClass: (v, m, rec) => rec.parentNode.id ==='root' ? 'fa fa-scissors' : 'pmx-hidden',
-		    isDisabled: (v, r, c, i, rec) => rec.parentNode.id !=='root',
+		    isActionDisabled: (v, r, c, i, rec) => rec.parentNode.id !=='root',
 		},
 		{
 		    handler: 'onForget',
@@ -652,13 +652,13 @@ Ext.define('PBS.DataStoreContent', {
 			? Ext.String.format(gettext("Permanently forget snapshot '{0}'"), v)
 			: Ext.String.format(gettext("Permanently forget group '{0}'"), v),
 		    getClass: (v, m, rec) => !rec.data.leaf ? 'fa critical fa-trash-o' : 'pmx-hidden',
-		    isDisabled: (v, r, c, i, rec) => !!rec.data.leaf,
+		    isActionDisabled: (v, r, c, i, rec) => !!rec.data.leaf,
 		},
 		{
 		    handler: 'downloadFile',
 		    getTip: (v, m, rec) => Ext.String.format(gettext("Download '{0}'"), v),
 		    getClass: (v, m, rec) => rec.data.leaf && rec.data.filename ? 'fa fa-download' : 'pmx-hidden',
-		    isDisabled: (v, r, c, i, rec) => !rec.data.leaf || !rec.data.filename || rec.data['crypt-mode'] > 2,
+		    isActionDisabled: (v, r, c, i, rec) => !rec.data.leaf || !rec.data.filename || rec.data['crypt-mode'] > 2,
 		},
 		{
 		    handler: 'openPxarBrowser',
@@ -670,7 +670,7 @@ Ext.define('PBS.DataStoreContent', {
 			}
 			return 'pmx-hidden';
 		    },
-		    isDisabled: (v, r, c, i, rec) => {
+		    isActionDisabled: (v, r, c, i, rec) => {
 			let data = rec.data;
 			return !(data.leaf &&
 			    data.filename &&
diff --git a/www/tape/BackupOverview.js b/www/tape/BackupOverview.js
index 1ccbb7f4..92d5cea4 100644
--- a/www/tape/BackupOverview.js
+++ b/www/tape/BackupOverview.js
@@ -272,7 +272,7 @@ Ext.define('PBS.TapeManagement.BackupOverview', {
 		    handler: 'restoreBackups',
 		    tooltip: gettext('Restore'),
 		    getClass: (v, m, rec) => rec.data.restore ? 'fa fa-fw fa-undo' : 'pmx-hidden',
-		    isDisabled: (v, r, c, i, rec) => !rec.data.restore,
+		    isActionDisabled: (v, r, c, i, rec) => !rec.data.restore,
                 },
 	    ],
 	},
diff --git a/www/tape/ChangerStatus.js b/www/tape/ChangerStatus.js
index 0fad11b3..ef9f5732 100644
--- a/www/tape/ChangerStatus.js
+++ b/www/tape/ChangerStatus.js
@@ -747,19 +747,19 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
 				    iconCls: 'fa fa-rotate-90 fa-exchange',
 				    handler: 'slotTransfer',
 				    tooltip: gettext('Transfer'),
-				    isDisabled: (v, r, c, i, rec) => rec.data['is-empty'],
+				    isActionDisabled: (v, r, c, i, rec) => rec.data['is-empty'],
 				},
 				{
 				    iconCls: 'fa fa-trash-o',
 				    handler: 'format',
 				    tooltip: gettext('Format'),
-				    isDisabled: (v, r, c, i, rec) => rec.data['is-empty'],
+				    isActionDisabled: (v, r, c, i, rec) => rec.data['is-empty'],
 				},
 				{
 				    iconCls: 'fa fa-rotate-90 fa-upload',
 				    handler: 'load',
 				    tooltip: gettext('Load'),
-				    isDisabled: (v, r, c, i, rec) => rec.data['is-empty'],
+				    isActionDisabled: (v, r, c, i, rec) => rec.data['is-empty'],
 				},
 			    ],
 			},
@@ -885,31 +885,31 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
 					    iconCls: 'fa fa-rotate-270 fa-upload',
 					    handler: 'unload',
 					    tooltip: gettext('Unload'),
-					    isDisabled: (v, r, c, i, rec) => rec.data['is-empty'] || rec.data['is-blocked'],
+					    isActionDisabled: (v, r, c, i, rec) => rec.data['is-empty'] || rec.data['is-blocked'],
 					},
 					{
 					    iconCls: 'fa fa-hdd-o',
 					    handler: 'cartridgeMemory',
 					    tooltip: gettext('Cartridge Memory'),
-					    isDisabled: (v, r, c, i, rec) => rec.data['is-empty'] || rec.data['is-blocked'],
+					    isActionDisabled: (v, r, c, i, rec) => rec.data['is-empty'] || rec.data['is-blocked'],
 					},
 					{
 					    iconCls: 'fa fa-line-chart',
 					    handler: 'volumeStatistics',
 					    tooltip: gettext('Volume Statistics'),
-					    isDisabled: (v, r, c, i, rec) => rec.data['is-empty'] || rec.data['is-blocked'],
+					    isActionDisabled: (v, r, c, i, rec) => rec.data['is-empty'] || rec.data['is-blocked'],
 					},
 					{
 					    iconCls: 'fa fa-tag',
 					    handler: 'readLabel',
 					    tooltip: gettext('Read Label'),
-					    isDisabled: (v, r, c, i, rec) => rec.data['is-empty'] || rec.data['is-blocked'],
+					    isActionDisabled: (v, r, c, i, rec) => rec.data['is-empty'] || rec.data['is-blocked'],
 					},
 					{
 					    iconCls: 'fa fa-info-circle',
 					    tooltip: gettext('Status'),
 					    handler: 'status',
-					    isDisabled: (v, r, c, i, rec) => rec.data['is-blocked'],
+					    isActionDisabled: (v, r, c, i, rec) => rec.data['is-blocked'],
 					},
 				    ],
 				},
@@ -953,7 +953,7 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
 					    iconCls: 'fa fa-rotate-270 fa-upload',
 					    handler: 'importTape',
 					    tooltip: gettext('Import'),
-					    isDisabled: (v, r, c, i, rec) => rec.data['is-empty'],
+					    isActionDisabled: (v, r, c, i, rec) => rec.data['is-empty'],
 					},
 				    ],
 				    width: 80,
-- 
2.20.1





  parent reply	other threads:[~2021-05-26  9:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26  9:11 [pbs-devel] [PATCH proxmox-backup 0/9] fixes/changes extjs 7.0 Dominik Csapak
2021-05-26  9:11 ` [pbs-devel] [PATCH proxmox-backup 1/9] ui: MainView: do not use unnecessary panels Dominik Csapak
2021-05-26  9:11 ` [pbs-devel] [PATCH proxmox-backup 2/9] ui: form/CalendarEvent: do not set displayField Dominik Csapak
2021-05-26  9:12 ` [pbs-devel] [PATCH proxmox-backup 3/9] ui: panel/UsageChart: change downloadServerUrl Dominik Csapak
2021-05-26  9:12 ` [pbs-devel] [PATCH proxmox-backup 4/9] ui: datastore/Summary: change destroy listener Dominik Csapak
2021-05-26  9:12 ` [pbs-devel] [PATCH proxmox-backup 5/9] ui: MainView: navigation: use different ui class Dominik Csapak
2021-05-26  9:12 ` [pbs-devel] [PATCH proxmox-backup 6/9] ui: css: fix text-align pmx-button-badge Dominik Csapak
2021-05-26  9:12 ` [pbs-devel] [PATCH proxmox-backup 7/9] ui: MainView: use new beforeChangePath signature Dominik Csapak
2021-05-26  9:12 ` Dominik Csapak [this message]
2021-07-08  9:45   ` [pbs-devel] applied: [PATCH proxmox-backup 8/9] ui: use isActionDisabled Thomas Lamprecht
2021-05-26  9:12 ` [pbs-devel] [PATCH proxmox-backup 9/9] ui: MainView: fix redirectTo call Dominik Csapak
2021-07-08  9:45   ` [pbs-devel] applied: " Thomas Lamprecht
2021-05-26 17:21 ` [pbs-devel] applied: [PATCH proxmox-backup 0/9] fixes/changes extjs 7.0 Thomas Lamprecht
2021-07-08  9:09 ` [pbs-devel] " Dominik Csapak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210526091206.21979-9-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal