[pve-devel] [PATCH pve-manager] ext5migrate: adapt Backup items to new KVCombobox parent class
Emmanuel Kasper
e.kasper at proxmox.com
Mon Aug 31 11:34:44 CEST 2015
This allows the Backup to work with ExtJS5
---
www/manager5/form/BackupModeSelector.js | 17 +++++------------
www/manager5/form/CompressionSelector.js | 17 +++++------------
www/manager5/form/DayOfWeekSelector.js | 11 ++---------
www/manager5/form/EmailNotificationSelector.js | 15 ++++-----------
4 files changed, 16 insertions(+), 44 deletions(-)
diff --git a/www/manager5/form/BackupModeSelector.js b/www/manager5/form/BackupModeSelector.js
index 715d9eb..c97b691 100644
--- a/www/manager5/form/BackupModeSelector.js
+++ b/www/manager5/form/BackupModeSelector.js
@@ -1,16 +1,9 @@
Ext.define('PVE.form.BackupModeSelector', {
extend: 'PVE.form.KVComboBox',
alias: ['widget.pveBackupModeSelector'],
-
- initComponent: function() {
- var me = this;
-
- me.data = [
- ['snapshot', gettext('Snapshot')],
- ['suspend', gettext('Suspend')],
- ['stop', gettext('Stop')]
- ];
-
- me.callParent();
- }
+ comboItems: [
+ ['snapshot', gettext('Snapshot')],
+ ['suspend', gettext('Suspend')],
+ ['stop', gettext('Stop')]
+ ]
});
diff --git a/www/manager5/form/CompressionSelector.js b/www/manager5/form/CompressionSelector.js
index f32cae1..0c96eab 100644
--- a/www/manager5/form/CompressionSelector.js
+++ b/www/manager5/form/CompressionSelector.js
@@ -1,16 +1,9 @@
Ext.define('PVE.form.CompressionSelector', {
extend: 'PVE.form.KVComboBox',
alias: ['widget.pveCompressionSelector'],
-
- initComponent: function() {
- var me = this;
-
- me.data = [
- ['', PVE.Utils.noneText],
- ['lzo', 'LZO (' + gettext('fast') + ')'],
- ['gzip', 'GZIP (' + gettext('good') + ')']
- ];
-
- me.callParent();
- }
+ comboItems: [
+ ['', PVE.Utils.noneText],
+ ['lzo', 'LZO (' + gettext('fast') + ')'],
+ ['gzip', 'GZIP (' + gettext('good') + ')']
+ ]
});
diff --git a/www/manager5/form/DayOfWeekSelector.js b/www/manager5/form/DayOfWeekSelector.js
index c03c430..4fbc180 100644
--- a/www/manager5/form/DayOfWeekSelector.js
+++ b/www/manager5/form/DayOfWeekSelector.js
@@ -1,11 +1,7 @@
Ext.define('PVE.form.DayOfWeekSelector', {
extend: 'PVE.form.KVComboBox',
alias: ['widget.pveDayOfWeekSelector'],
-
- initComponent: function() {
- var me = this;
-
- me.data = [
+ comboItems: [
['sun', Ext.util.Format.htmlDecode(Ext.Date.dayNames[0])],
['mon', Ext.util.Format.htmlDecode(Ext.Date.dayNames[1])],
['tue', Ext.util.Format.htmlDecode(Ext.Date.dayNames[2])],
@@ -13,8 +9,5 @@ Ext.define('PVE.form.DayOfWeekSelector', {
['thu', Ext.util.Format.htmlDecode(Ext.Date.dayNames[4])],
['fri', Ext.util.Format.htmlDecode(Ext.Date.dayNames[5])],
['sat', Ext.util.Format.htmlDecode(Ext.Date.dayNames[6])]
- ];
-
- me.callParent();
- }
+ ]
});
diff --git a/www/manager5/form/EmailNotificationSelector.js b/www/manager5/form/EmailNotificationSelector.js
index 1bdef20..36e35c5 100644
--- a/www/manager5/form/EmailNotificationSelector.js
+++ b/www/manager5/form/EmailNotificationSelector.js
@@ -1,15 +1,8 @@
Ext.define('PVE.form.EmailNotificationSelector', {
extend: 'PVE.form.KVComboBox',
alias: ['widget.pveEmailNotificationSelector'],
-
- initComponent: function() {
- var me = this;
-
- me.data = [
- ['always', gettext('Always')],
- ['failure', gettext('On failure only')]
- ];
-
- me.callParent();
- }
+ comboItems: [
+ ['always', gettext('Always')],
+ ['failure', gettext('On failure only')]
+ ]
});
--
2.1.4
More information about the pve-devel
mailing list