pve-manager/www/manager6/form/DayOfWeekSelector.js
Dominik Csapak c0b9cfab96 add weekdays to comboitems at runtime
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@proxmox.com>
2016-04-06 16:36:29 +02:00

19 lines
688 B
JavaScript

Ext.define('PVE.form.DayOfWeekSelector', {
extend: 'PVE.form.KVComboBox',
alias: ['widget.pveDayOfWeekSelector'],
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])],
['wed', Ext.util.Format.htmlDecode(Ext.Date.dayNames[3])],
['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();
}
});