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
16 * @class Ext.calendar.StatusProxy
17 * A specialized drag proxy that supports a drop status icon, {@link Ext.Layer} styles and auto-repair. It also
18 * contains a calendar-specific drag status message containing details about the dragged event's target drop date range.
19 * This is the default drag proxy used by all calendar views.
21 * @param {Object} config
23 Ext.calendar.StatusProxy = function(config) {
24 Ext.apply(this, config);
25 this.id = this.id || Ext.id();
26 this.el = new Ext.Layer({
29 cls: 'ext-dd-drag-proxy x-dd-drag-proxy ' + this.dropNotAllowed,
35 cls: 'ext-dd-ghost-ct',
38 cls: 'x-dd-drag-ghost'
47 shadow: !config || config.shadow !== false
49 this.ghost = Ext.get(this.el.dom.childNodes[1].childNodes[0]);
50 this.message = Ext.get(this.el.dom.childNodes[1].childNodes[1]);
51 this.dropStatus = this.dropNotAllowed;
54 Ext.extend(Ext.calendar.StatusProxy, Ext.dd.StatusProxy, {
55 <div id="cfg-Ext.dd.ScrollManager-moveEventCls"></div>/**
56 * @cfg {String} moveEventCls
57 * The CSS class to apply to the status element when an event is being dragged (defaults to 'ext-cal-dd-move').
59 moveEventCls: 'ext-cal-dd-move',
60 <div id="cfg-Ext.dd.ScrollManager-addEventCls"></div>/**
61 * @cfg {String} addEventCls
62 * The CSS class to apply to the status element when drop is not allowed (defaults to 'ext-cal-dd-add').
64 addEventCls: 'ext-cal-dd-add',
67 update: function(html) {
68 if (typeof html == 'string') {
69 this.ghost.update(html);
71 this.ghost.update('');
72 html.style.margin = '0';
73 this.ghost.dom.appendChild(html);
75 var el = this.ghost.dom.firstChild;
77 Ext.fly(el).setStyle('float', 'none').setHeight('auto');
78 Ext.getDom(el).id += '-ddproxy';
82 <div id="method-Ext.dd.ScrollManager-updateMsg"></div>/**
83 * Update the calendar-specific drag status message without altering the ghost element.
84 * @param {String} msg The new status message
86 updateMsg: function(msg) {
87 this.message.update(msg);