1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
| /*
| * A simple reusable store that loads static calendar field definitions into memory
| * and can be bound to the CalendarCombo widget and used for calendar color selection.
| */
| Ext.define('Ext.calendar.data.MemoryCalendarStore', {
| extend: 'Ext.data.Store',
| model: 'Ext.calendar.data.CalendarModel',
|
| requires: [
| 'Ext.data.proxy.Memory',
| 'Ext.data.reader.Json',
| 'Ext.data.writer.Json',
| 'Ext.calendar.data.CalendarModel',
| 'Ext.calendar.data.CalendarMappings'
| ],
|
| proxy: {
| type: 'memory',
| reader: {
| type: 'json',
| root: 'calendars'
| },
| writer: {
| type: 'json'
| }
| },
|
| autoLoad: true,
|
| initComponent: function() {
| var me = this,
| calendarData = Ext.calendar.data;
|
| me.sorters = me.sorters || [{
| property: calendarData.CalendarMappings.Title.name,
| direction: 'ASC'
| }];
|
| me.idProperty = me.idProperty || calendarData.CalendarMappings.CalendarId.name || 'id';
|
| me.fields = calendarData.CalendarModel.prototype.fields.getRange();
|
| me.callParent(arguments);
| }
| });
|
|