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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The source code</title>
<link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../resources/prettify/prettify.js"></script>
</head>
<body onload="prettyPrint();">
<pre class="prettyprint lang-js">/*!
* Ext JS Library 3.3.1
* Copyright(c) 2006-2010 Sencha Inc.
* licensing@sencha.com
* http://www.sencha.com/license
*/
/*
* @class Ext.calendar.StatusProxy
* A specialized drag proxy that supports a drop status icon, {@link Ext.Layer} styles and auto-repair. It also
* contains a calendar-specific drag status message containing details about the dragged event's target drop date range.
* This is the default drag proxy used by all calendar views.
* @constructor
* @param {Object} config
*/
Ext.calendar.StatusProxy = function(config) {
Ext.apply(this, config);
this.id = this.id || Ext.id();
this.el = new Ext.Layer({
dh: {
id: this.id,
cls: 'ext-dd-drag-proxy x-dd-drag-proxy ' + this.dropNotAllowed,
cn: [
{
cls: 'x-dd-drop-icon'
},
{
cls: 'ext-dd-ghost-ct',
cn: [
{
cls: 'x-dd-drag-ghost'
},
{
cls: 'ext-dd-msg'
}
]
}
]
},
shadow: !config || config.shadow !== false
});
this.ghost = Ext.get(this.el.dom.childNodes[1].childNodes[0]);
this.message = Ext.get(this.el.dom.childNodes[1].childNodes[1]);
this.dropStatus = this.dropNotAllowed;
};
Ext.extend(Ext.calendar.StatusProxy, Ext.dd.StatusProxy, {
<div id="cfg-Ext.dd.ScrollManager-moveEventCls"></div>/**
* @cfg {String} moveEventCls
* The CSS class to apply to the status element when an event is being dragged (defaults to 'ext-cal-dd-move').
*/
moveEventCls: 'ext-cal-dd-move',
<div id="cfg-Ext.dd.ScrollManager-addEventCls"></div>/**
* @cfg {String} addEventCls
* The CSS class to apply to the status element when drop is not allowed (defaults to 'ext-cal-dd-add').
*/
addEventCls: 'ext-cal-dd-add',
// inherit docs
update: function(html) {
if (typeof html == 'string') {
this.ghost.update(html);
} else {
this.ghost.update('');
html.style.margin = '0';
this.ghost.dom.appendChild(html);
}
var el = this.ghost.dom.firstChild;
if (el) {
Ext.fly(el).setStyle('float', 'none').setHeight('auto');
Ext.getDom(el).id += '-ddproxy';
}
},
<div id="method-Ext.dd.ScrollManager-updateMsg"></div>/**
* Update the calendar-specific drag status message without altering the ghost element.
* @param {String} msg The new status message
*/
updateMsg: function(msg) {
this.message.update(msg);
}
});</pre>
</body>
</html>
|