3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4 <title>The source code</title>
5 <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
6 <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
8 <body onload="prettyPrint();">
9 <pre class="prettyprint lang-js">/*!
10 * Ext JS Library 3.3.1
11 * Copyright(c) 2006-2010 Sencha Inc.
12 * licensing@sencha.com
13 * http://www.sencha.com/license
15 <div id="cls-Ext.calendar.EventMappings"></div>/**
16 * @class Ext.calendar.EventMappings
18 * A simple object that provides the field definitions for EventRecords so that they can be easily overridden.
20 Ext.calendar.EventMappings = {
80 <div id="cls-Ext.calendar.EventRecord"></div>/**
81 * @class Ext.calendar.EventRecord
82 * @extends Ext.data.Record
83 * <p>This is the {@link Ext.data.Record Record} specification for calendar event data used by the
84 * {@link Ext.calendar.CalendarPanel CalendarPanel}'s underlying store. It can be overridden as
85 * necessary to customize the fields supported by events, although the existing column names should
86 * not be altered. If your model fields are named differently you should update the <b>mapping</b>
87 * configs accordingly.</p>
88 * <p>The only required fields when creating a new event record instance are StartDate and
89 * EndDate. All other fields are either optional are will be defaulted if blank.</p>
90 * <p>Here is a basic example for how to create a new record of this type:<pre><code>
91 rec = new Ext.calendar.EventRecord({
92 StartDate: '2101-01-12 12:00:00',
93 EndDate: '2101-01-12 13:30:00',
94 Title: 'My cool event',
98 * If you have overridden any of the record's data mappings via the Ext.calendar.EventMappings object
99 * you may need to set the values using this alternate syntax to ensure that the fields match up correctly:<pre><code>
100 var M = Ext.calendar.EventMappings;
102 rec = new Ext.calendar.EventRecord();
103 rec.data[M.StartDate.name] = '2101-01-12 12:00:00';
104 rec.data[M.EndDate.name] = '2101-01-12 13:30:00';
105 rec.data[M.Title.name] = 'My cool event';
106 rec.data[M.Notes.name] = 'Some notes';
109 * @param {Object} data (Optional) An object, the properties of which provide values for the new Record's
110 * fields. If not specified the {@link Ext.data.Field#defaultValue defaultValue}
111 * for each field will be assigned.
112 * @param {Object} id (Optional) The id of the Record. The id is used by the
113 * {@link Ext.data.Store} object which owns the Record to index its collection
114 * of Records (therefore this id should be unique within each store). If an
115 * id is not specified a {@link #phantom}
116 * Record will be created with an {@link #Record.id automatically generated id}.
119 var M = Ext.calendar.EventMappings;
121 Ext.calendar.EventRecord = Ext.data.Record.create([
135 <div id="method-Ext.calendar.EventRecord-EventRecord.reconfigure"></div>/**
136 * Reconfigures the default record definition based on the current Ext.calendar.EventMappings object
138 Ext.calendar.EventRecord.reconfigure = function() {
139 Ext.calendar.EventRecord = Ext.data.Record.create([