File: Ext.calendar.EventRecord.html

package info (click to toggle)
icinga-web 1.7.1%2Bdfsg2-6
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 83,496 kB
  • sloc: php: 252,926; xml: 142,251; sql: 8,190; sh: 1,039; makefile: 575; perl: 215; python: 194
file content (30 lines) | stat: -rw-r--r-- 5,833 bytes parent folder | download | duplicates (3)
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
<div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.calendar.EventRecord-props"><img src="resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>&#13;<a class="inner-link" href="#Ext.calendar.EventRecord-methods"><img src="resources/images/default/s.gif" class="item-icon icon-method">Methods</a>&#13;<a class="inner-link" href="#Ext.calendar.EventRecord-events"><img src="resources/images/default/s.gif" class="item-icon icon-event">Events</a>&#13;<a class="bookmark" href="../docs/?class=Ext.calendar.EventRecord"><img src="resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>&#13;</div><h1>Class <a href="source/EventRecord.html#cls-Ext.calendar.EventRecord">Ext.calendar.EventRecord</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.calendar</td></tr><tr><td class="label">Defined In:</td><td class="hd-info"><a href="source/EventRecord.html#cls-Ext.calendar.EventRecord">EventRecord.js</a></td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/EventRecord.html#cls-Ext.calendar.EventRecord">EventRecord</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr></table><div class="description"><p>This is the <a href="output/Ext.data.Record.html" ext:cls="Ext.data.Record">Record</a> specification for calendar event data used by the
<a href="output/Ext.calendar.CalendarPanel.html" ext:cls="Ext.calendar.CalendarPanel">CalendarPanel</a>'s underlying store. It can be overridden as 
necessary to customize the fields supported by events, although the existing column names should
not be altered. If your model fields are named differently you should update the <b>mapping</b>
configs accordingly.</p>
<p>The only required fields when creating a new event record instance are StartDate and
EndDate.  All other fields are either optional are will be defaulted if blank.</p>
<p>Here is a basic example for how to create a new record of this type:<pre><code>rec = <b>new</b> Ext.calendar.EventRecord({
    StartDate: <em>'2101-01-12 12:00:00'</em>,
    EndDate: <em>'2101-01-12 13:30:00'</em>,
    Title: <em>'My cool event'</em>,
    Notes: <em>'Some notes'</em>
});</code></pre>
If you have overridden any of the record's data mappings via the Ext.calendar.EventMappings object
you may need to set the values using this alternate syntax to ensure that the fields match up correctly:<pre><code><b>var</b> M = Ext.calendar.EventMappings;

rec = <b>new</b> Ext.calendar.EventRecord();
rec.data[M.StartDate.name] = <em>'2101-01-12 12:00:00'</em>;
rec.data[M.EndDate.name] = <em>'2101-01-12 13:30:00'</em>;
rec.data[M.Title.name] = <em>'My cool event'</em>;
rec.data[M.Notes.name] = <em>'Some notes'</em>;</code></pre></div><div class="hr"></div><a id="Ext.calendar.EventRecord-props"></a><h2>Public Properties</h2><div class="no-members">This class has no public properties.</div><a id="Ext.calendar.EventRecord-methods"></a><h2>Public Methods</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Method</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.calendar.EventRecord-EventRecord"></a><b><a href="source/EventRecord.html#cls-Ext.calendar.EventRecord">EventRecord</a></b>(&nbsp;<span title="Optional" class="optional">[<code>Object&nbsp;data</code>]</span>,&nbsp;<span title="Optional" class="optional">[<code>Object&nbsp;id</code>]</span>&nbsp;)
    <div class="mdesc"><div class="short"></div><div class="long"><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>data</code> : Object<div class="sub-desc">(Optional) An object, the properties of which provide values for the new Record's
fields. If not specified the <a href="output/Ext.data.Field.html#Ext.data.Field-defaultValue" ext:member="defaultValue" ext:cls="Ext.data.Field">defaultValue</a>
for each field will be assigned.</div></li><li><code>id</code> : Object<div class="sub-desc">(Optional) The id of the Record. The id is used by the
<a href="output/Ext.data.Store.html" ext:cls="Ext.data.Store">Ext.data.Store</a> object which owns the Record to index its collection
of Records (therefore this id should be unique within each store). If an
id is not specified a <a href="output/Ext.calendar.EventRecord.html#Ext.calendar.EventRecord-phantom" ext:member="phantom" ext:cls="Ext.calendar.EventRecord">phantom</a>
Record will be created with an <a href="output/Ext.calendar.EventRecord.html#Ext.calendar.EventRecord-Record.id" ext:member="Record.id" ext:cls="Ext.calendar.EventRecord">automatically generated id</a>.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">EventRecord</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.calendar.EventRecord-EventRecord.reconfigure"></a><b><a href="source/EventRecord.html#method-Ext.calendar.EventRecord-EventRecord.reconfigure">EventRecord.reconfigure</a></b>()
    :
                                        void<div class="mdesc"><div class="short">Reconfigures the default record definition based on the current Ext.calendar.EventMappings object</div><div class="long">Reconfigures the default record definition based on the current Ext.calendar.EventMappings object<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">EventRecord</td></tr></tbody></table><a id="Ext.calendar.EventRecord-events"></a><h2>Public Events</h2><div class="no-members">This class has no public events.</div></div>