]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | /*\r |
2 | * @class Ext.calendar.dd.StatusProxy\r | |
3 | * A specialized drag proxy that supports a drop status icon and auto-repair. It also\r | |
4 | * contains a calendar-specific drag status message containing details about the dragged event's target drop date range. \r | |
5 | * This is the default drag proxy used by all calendar views.\r | |
6 | * @constructor\r | |
7 | * @param {Object} config\r | |
8 | */\r | |
9 | Ext.define('Ext.calendar.dd.StatusProxy', {\r | |
10 | \r | |
11 | extend: 'Ext.dd.StatusProxy',\r | |
12 | \r | |
13 | animRepair: true,\r | |
14 | \r | |
15 | /**\r | |
16 | * @cfg {String} moveEventCls\r | |
17 | * The CSS class to apply to the status element when an event is being dragged (defaults to 'ext-cal-dd-move').\r | |
18 | */\r | |
19 | moveEventCls : 'ext-cal-dd-move',\r | |
20 | \r | |
21 | /**\r | |
22 | * @cfg {String} addEventCls\r | |
23 | * The CSS class to apply to the status element when drop is not allowed (defaults to 'ext-cal-dd-add').\r | |
24 | */\r | |
25 | addEventCls : 'ext-cal-dd-add',\r | |
26 | \r | |
27 | // inherit docs\r | |
28 | childEls: [\r | |
29 | 'ghost',\r | |
30 | 'message'\r | |
31 | ],\r | |
32 | \r | |
33 | // inherit docs\r | |
34 | renderTpl: [\r | |
35 | '<div class="' + Ext.baseCSSPrefix + 'dd-drop-icon"></div>' +\r | |
36 | '<div class="ext-dd-ghost-ct">' +\r | |
37 | '<div id="{id}-ghost" data-ref="ghost" class="' + Ext.baseCSSPrefix + 'dd-drag-ghost"></div>' +\r | |
38 | '<div id="{id}-message" data-ref="message" class="' + Ext.baseCSSPrefix + 'dd-msg"></div>' +\r | |
39 | '</div>'\r | |
40 | ],\r | |
41 | \r | |
42 | // inherit docs\r | |
43 | update : function(html){\r | |
44 | this.callParent(arguments);\r | |
45 | \r | |
46 | var el = this.ghost.dom.firstChild;\r | |
47 | if(el){\r | |
48 | // if the ghost contains an event clone (from dragging an existing event)\r | |
49 | // set it to auto height to ensure visual consistency\r | |
50 | Ext.fly(el).setHeight('auto');\r | |
51 | }\r | |
52 | },\r | |
53 | \r | |
54 | /* @private\r | |
55 | * Update the calendar-specific drag status message without altering the ghost element.\r | |
56 | * @param {String} msg The new status message\r | |
57 | */\r | |
58 | updateMsg : function(msg){\r | |
59 | this.message.update(msg);\r | |
60 | }\r | |
61 | }); |