]> git.proxmox.com Git - proxmox-widget-toolkit.git/blame - src/form/PruneKeepField.js
fixup prune field usage
[proxmox-widget-toolkit.git] / src / form / PruneKeepField.js
CommitLineData
914070be 1Ext.define('Proxmox.form.field.PruneKeep', {
9b4b2e74
TL
2 extend: 'Proxmox.form.field.Integer',
3 xtype: 'pmxPruneKeepField',
4
5 allowBlank: true,
6 minValue: 1,
7
8 listeners: {
9 change: function(field, newValue, oldValue) {
10 if (newValue !== this.originalValue) {
11 this.triggers.clear.setVisible(true);
12 }
13 },
14 },
15 triggers: {
16 clear: {
17 cls: 'pmx-clear-trigger',
18 weight: -1,
19 hidden: true,
20 handler: function() {
21 this.triggers.clear.setVisible(false);
22 this.setValue(this.originalValue);
23 },
24 },
25 },
26
27});