* [pbs-devel] [PATCH proxmox-backup 1/3] docs: lto barcod generator: disable add button when fields are not valid @ 2024-03-06 15:10 Dominik Csapak 2024-03-06 15:11 ` [pbs-devel] [PATCH proxmox-backup 2/3] docs: lto barcode generator: add lto-9 type Dominik Csapak ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: Dominik Csapak @ 2024-03-06 15:10 UTC (permalink / raw) To: pbs-devel otherwise we end up with entries in the list that won't be displayed/printed anyway. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> --- docs/lto-barcode/label-setup.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/lto-barcode/label-setup.js b/docs/lto-barcode/label-setup.js index e65cc7a4..b42a3080 100644 --- a/docs/lto-barcode/label-setup.js +++ b/docs/lto-barcode/label-setup.js @@ -46,6 +46,23 @@ Ext.define('LabelSetupPanel', { let params = view.getValues(); list.getStore().add(params); }, + + validitychange: function() { + let me = this; + let isValid = true; + me.getView().query('field').forEach((field) => { + if (!field.isValid()) { + isValid = false; + } + }); + me.lookup('addButton').setDisabled(!isValid); + }, + + control: { + 'field': { + validitychange: 'validitychange', + }, + }, }, items: [ @@ -93,6 +110,7 @@ Ext.define('LabelSetupPanel', { { xtype: 'button', text: 'Add', + reference: 'addButton', handler: 'onAdd', }, ], -- 2.39.2 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [pbs-devel] [PATCH proxmox-backup 2/3] docs: lto barcode generator: add lto-9 type 2024-03-06 15:10 [pbs-devel] [PATCH proxmox-backup 1/3] docs: lto barcod generator: disable add button when fields are not valid Dominik Csapak @ 2024-03-06 15:11 ` Dominik Csapak 2024-03-06 15:11 ` [pbs-devel] [PATCH proxmox-backup 3/3] docs: lto barcode generator: add worm tape types Dominik Csapak ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: Dominik Csapak @ 2024-03-06 15:11 UTC (permalink / raw) To: pbs-devel and make it the new default Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> --- docs/lto-barcode/label-setup.js | 2 +- docs/lto-barcode/tape-type.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/lto-barcode/label-setup.js b/docs/lto-barcode/label-setup.js index b42a3080..c7362aad 100644 --- a/docs/lto-barcode/label-setup.js +++ b/docs/lto-barcode/label-setup.js @@ -84,7 +84,7 @@ Ext.define('LabelSetupPanel', { xtype: 'ltoTapeType', name: 'tape_type', fieldLabel: 'Type', - value: 'L8', + value: 'L9', }, { xtype: 'ltoLabelStyle', diff --git a/docs/lto-barcode/tape-type.js b/docs/lto-barcode/tape-type.js index 33ec0152..7edb59ea 100644 --- a/docs/lto-barcode/tape-type.js +++ b/docs/lto-barcode/tape-type.js @@ -11,6 +11,7 @@ Ext.define('LtoTapeType', { store: { field: ['value', 'text'], data: [ + { value: 'L9', text: "LTO-9" }, { value: 'L8', text: "LTO-8" }, { value: 'L7', text: "LTO-7" }, { value: 'L6', text: "LTO-6" }, -- 2.39.2 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [pbs-devel] [PATCH proxmox-backup 3/3] docs: lto barcode generator: add worm tape types 2024-03-06 15:10 [pbs-devel] [PATCH proxmox-backup 1/3] docs: lto barcod generator: disable add button when fields are not valid Dominik Csapak 2024-03-06 15:11 ` [pbs-devel] [PATCH proxmox-backup 2/3] docs: lto barcode generator: add lto-9 type Dominik Csapak @ 2024-03-06 15:11 ` Dominik Csapak 2024-03-06 15:13 ` [pbs-devel] [PATCH proxmox-backup 1/3] docs: lto barcod generator: disable add button when fields are not valid Dominik Csapak 2024-03-07 8:46 ` [pbs-devel] applied: " Dietmar Maurer 3 siblings, 0 replies; 5+ messages in thread From: Dominik Csapak @ 2024-03-06 15:11 UTC (permalink / raw) To: pbs-devel see https://www.ibm.com/docs/en/ts4500-tape-library?topic=media-lto-bar-code-labels for a reference of the codes Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> --- alternatively we could add a 'WORM' checkbox, but then we'd have to modify the value before adding it to the list. docs/lto-barcode/tape-type.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/lto-barcode/tape-type.js b/docs/lto-barcode/tape-type.js index 7edb59ea..e487f47b 100644 --- a/docs/lto-barcode/tape-type.js +++ b/docs/lto-barcode/tape-type.js @@ -12,12 +12,19 @@ Ext.define('LtoTapeType', { field: ['value', 'text'], data: [ { value: 'L9', text: "LTO-9" }, + { value: 'LZ', text: "LTO-9 (WORM)" }, { value: 'L8', text: "LTO-8" }, + { value: 'LY', text: "LTO-8 (WORM)" }, { value: 'L7', text: "LTO-7" }, + { value: 'LX', text: "LTO-7 (WORM)" }, { value: 'L6', text: "LTO-6" }, + { value: 'LW', text: "LTO-6 (WORM)" }, { value: 'L5', text: "LTO-5" }, + { value: 'LV', text: "LTO-5 (WORM)" }, { value: 'L4', text: "LTO-4" }, + { value: 'LU', text: "LTO-4 (WORM)" }, { value: 'L3', text: "LTO-3" }, + { value: 'LT', text: "LTO-3 (WORM)" }, { value: 'CU', text: "Cleaning Unit" }, ], }, -- 2.39.2 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [pbs-devel] [PATCH proxmox-backup 1/3] docs: lto barcod generator: disable add button when fields are not valid 2024-03-06 15:10 [pbs-devel] [PATCH proxmox-backup 1/3] docs: lto barcod generator: disable add button when fields are not valid Dominik Csapak 2024-03-06 15:11 ` [pbs-devel] [PATCH proxmox-backup 2/3] docs: lto barcode generator: add lto-9 type Dominik Csapak 2024-03-06 15:11 ` [pbs-devel] [PATCH proxmox-backup 3/3] docs: lto barcode generator: add worm tape types Dominik Csapak @ 2024-03-06 15:13 ` Dominik Csapak 2024-03-07 8:46 ` [pbs-devel] applied: " Dietmar Maurer 3 siblings, 0 replies; 5+ messages in thread From: Dominik Csapak @ 2024-03-06 15:13 UTC (permalink / raw) To: pbs-devel argh, sorry for the typo in the commit subject i'll fix it for a v2, but if someone could fix it up when applying i'd appreciate it ;) ^ permalink raw reply [flat|nested] 5+ messages in thread
* [pbs-devel] applied: [PATCH proxmox-backup 1/3] docs: lto barcod generator: disable add button when fields are not valid 2024-03-06 15:10 [pbs-devel] [PATCH proxmox-backup 1/3] docs: lto barcod generator: disable add button when fields are not valid Dominik Csapak ` (2 preceding siblings ...) 2024-03-06 15:13 ` [pbs-devel] [PATCH proxmox-backup 1/3] docs: lto barcod generator: disable add button when fields are not valid Dominik Csapak @ 2024-03-07 8:46 ` Dietmar Maurer 3 siblings, 0 replies; 5+ messages in thread From: Dietmar Maurer @ 2024-03-07 8:46 UTC (permalink / raw) To: Proxmox Backup Server development discussion, Dominik Csapak applied serie ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-03-07 8:46 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-03-06 15:10 [pbs-devel] [PATCH proxmox-backup 1/3] docs: lto barcod generator: disable add button when fields are not valid Dominik Csapak 2024-03-06 15:11 ` [pbs-devel] [PATCH proxmox-backup 2/3] docs: lto barcode generator: add lto-9 type Dominik Csapak 2024-03-06 15:11 ` [pbs-devel] [PATCH proxmox-backup 3/3] docs: lto barcode generator: add worm tape types Dominik Csapak 2024-03-06 15:13 ` [pbs-devel] [PATCH proxmox-backup 1/3] docs: lto barcod generator: disable add button when fields are not valid Dominik Csapak 2024-03-07 8:46 ` [pbs-devel] applied: " Dietmar Maurer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox