]>
git.proxmox.com Git - extjs.git/blob - extjs/examples/classic/calendar/src/dd/StatusProxy.js
2 * @class Ext.calendar.dd.StatusProxy
3 * A specialized drag proxy that supports a drop status icon and auto-repair. It also
4 * contains a calendar-specific drag status message containing details about the dragged event's target drop date range.
5 * This is the default drag proxy used by all calendar views.
7 * @param {Object} config
9 Ext
.define('Ext.calendar.dd.StatusProxy', {
11 extend
: 'Ext.dd.StatusProxy',
16 * @cfg {String} moveEventCls
17 * The CSS class to apply to the status element when an event is being dragged (defaults to 'ext-cal-dd-move').
19 moveEventCls
: 'ext-cal-dd-move',
22 * @cfg {String} addEventCls
23 * The CSS class to apply to the status element when drop is not allowed (defaults to 'ext-cal-dd-add').
25 addEventCls
: 'ext-cal-dd-add',
35 '<div class="' + Ext
.baseCSSPrefix
+ 'dd-drop-icon"></div>' +
36 '<div class="ext-dd-ghost-ct">' +
37 '<div id="{id}-ghost" data-ref="ghost" class="' + Ext
.baseCSSPrefix
+ 'dd-drag-ghost"></div>' +
38 '<div id="{id}-message" data-ref="message" class="' + Ext
.baseCSSPrefix
+ 'dd-msg"></div>' +
43 update : function(html
){
44 this.callParent(arguments
);
46 var el
= this.ghost
.dom
.firstChild
;
48 // if the ghost contains an event clone (from dragging an existing event)
49 // set it to auto height to ensure visual consistency
50 Ext
.fly(el
).setHeight('auto');
55 * Update the calendar-specific drag status message without altering the ghost element.
56 * @param {String} msg The new status message
58 updateMsg : function(msg
){
59 this.message
.update(msg
);