[pve-devel] [PATCH manager 2/3] add weekdays to comboitems at runtime
Dominik Csapak
d.csapak at proxmox.com
Wed Apr 6 14:34:56 CEST 2016
the translation of extjs has not been applied
at the time of class declaration, so that
the weekdays were always "Sunday", "Monday", etc.
when we declare them in initComponent, the translations are there
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/form/DayOfWeekSelector.js | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/www/manager6/form/DayOfWeekSelector.js b/www/manager6/form/DayOfWeekSelector.js
index 4fbc180..09f8754 100644
--- a/www/manager6/form/DayOfWeekSelector.js
+++ b/www/manager6/form/DayOfWeekSelector.js
@@ -1,7 +1,10 @@
Ext.define('PVE.form.DayOfWeekSelector', {
extend: 'PVE.form.KVComboBox',
alias: ['widget.pveDayOfWeekSelector'],
- comboItems: [
+ comboItems:[],
+ initComponent: function(){
+ var me = this;
+ me.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])],
@@ -9,5 +12,7 @@ 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])]
- ]
+ ];
+ this.callParent();
+ }
});
--
2.1.4
More information about the pve-devel
mailing list