Alien-Web-ExtJS-V3
view release on metacpan or search on metacpan
share/examples/calendar/calendar-all-debug.js view on Meta::CPAN
shim.hide();
}
});
var shim = this.shims[0];
if (!shim) {
shim = this.createShim();
this.shims[0] = shim;
}
shim.isActive = true;
shim.show();
shim.setBox(box);
},
onNodeDrop: function(n, dd, e, data) {
var rec;
if (n && data) {
if (data.type == 'eventdrag') {
rec = this.view.getEventRecordFromEl(data.ddel);
this.view.onEventDrop(rec, n.date);
this.onCalendarDragComplete();
delete this.dragOffset;
return true;
}
if (data.type == 'eventresize') {
rec = this.view.getEventRecordFromEl(data.ddel);
this.view.onEventResize(rec, data.resizeDates);
this.onCalendarDragComplete();
delete this.resizeDt;
return true;
}
if (data.type == 'caldrag') {
Ext.destroy(this.dragStartMarker);
delete this.dragStartMarker;
delete this.dragCreateDt;
this.view.onCalendarEndDrag(this.dragStartDate, this.dragEndDate,
this.onCalendarDragComplete.createDelegate(this));
//shims are NOT cleared here -- they stay visible until the handling
//code calls the onCalendarDragComplete callback which hides them.
return true;
}
}
this.onCalendarDragComplete();
return false;
}
});
/**
* @class Ext.calendar.EventMappings
* @extends Object
* A simple object that provides the field definitions for EventRecords so that they can be easily overridden.
*/
Ext.calendar.EventMappings = {
EventId: {
name: 'EventId',
mapping: 'id',
type: 'int'
},
CalendarId: {
name: 'CalendarId',
mapping: 'cid',
type: 'int'
},
Title: {
name: 'Title',
mapping: 'title',
type: 'string'
},
StartDate: {
name: 'StartDate',
mapping: 'start',
type: 'date',
dateFormat: 'c'
},
EndDate: {
name: 'EndDate',
mapping: 'end',
type: 'date',
dateFormat: 'c'
},
Location: {
name: 'Location',
mapping: 'loc',
type: 'string'
},
Notes: {
name: 'Notes',
mapping: 'notes',
type: 'string'
},
Url: {
name: 'Url',
mapping: 'url',
type: 'string'
},
IsAllDay: {
name: 'IsAllDay',
mapping: 'ad',
type: 'boolean'
},
Reminder: {
name: 'Reminder',
mapping: 'rem',
type: 'string'
},
IsNew: {
name: 'IsNew',
mapping: 'n',
type: 'boolean'
}
};
/**
* @class Ext.calendar.EventRecord
* @extends Ext.data.Record
* <p>This is the {@link Ext.data.Record Record} specification for calendar event data used by the
* {@link Ext.calendar.CalendarPanel CalendarPanel}'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
( run in 1.017 second using v1.01-cache-2.11-cpan-ceb78f64989 )