]> git.proxmox.com Git - pve-manager.git/blame - www/manager6/form/CalendarEvent.js
depend on and use libjs-qrcodejs
[pve-manager.git] / www / manager6 / form / CalendarEvent.js
CommitLineData
56da9214
DC
1Ext.define('PVE.form.CalendarEvent', {
2 extend: 'Ext.form.field.ComboBox',
3 xtype: 'pveCalendarEvent',
4
5 editable: true,
8e57774e 6 emptyText: gettext('Editable'), // FIXME: better way to convey that to confused users?
56da9214
DC
7
8 valueField: 'value',
56da9214
DC
9 queryMode: 'local',
10
8e57774e
TL
11 matchFieldWidth: false,
12 listConfig: {
13 maxWidth: 450,
14 },
15
56da9214 16 store: {
8058410f 17 field: ['value', 'text'],
56da9214 18 data: [
42b45f8f 19 { value: '*/30', text: Ext.String.format(gettext("Every {0} minutes"), 30) },
8058410f
TL
20 { value: '*/2:00', text: gettext("Every two hours") },
21 { value: '2,22:30', text: gettext("Every day") + " 02:30, 22:30" },
22 { value: 'mon..fri', text: gettext("Monday to Friday") + " 00:00" },
23 { value: 'mon..fri */1:00', text: gettext("Monday to Friday") + ': ' + gettext("hourly") },
9a621f71
TL
24 {
25 value: 'mon..fri 7..18:00/15',
26 text: gettext("Monday to Friday") + ', '
27 + Ext.String.format(gettext('{0} to {1}'), '08:00', '18:45') + ': '
28 + Ext.String.format(gettext("Every {0} minutes"), 15),
29 },
8058410f 30 { value: 'sun 01:00', text: gettext("Sunday") + " 01:00" },
9a621f71 31 { value: 'sat *-1..7 15:00', text: gettext("First Saturday each Month") + " 15:00" },
f6710aac 32 ],
56da9214
DC
33 },
34
35 tpl: [
36 '<ul class="x-list-plain"><tpl for=".">',
37 '<li role="option" class="x-boundlist-item">{text}</li>',
f6710aac 38 '</tpl></ul>',
56da9214
DC
39 ],
40
41 displayTpl: [
42 '<tpl for=".">',
9a621f71 43 '{value}',
f6710aac
TL
44 '</tpl>',
45 ],
56da9214
DC
46
47});