-<html>\r
-<head>\r
- <title>The source code</title>\r
- <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
- <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
-</head>\r
-<body onload="prettyPrint();">\r
- <pre class="prettyprint lang-js"><div id="cls-Ext.dd.Registry"></div>/**\r
- * @class Ext.dd.Registry\r
- * Provides easy access to all drag drop components that are registered on a page. Items can be retrieved either\r
- * directly by DOM node id, or by passing in the drag drop event that occurred and looking up the event target.\r
- * @singleton\r
- */\r
-Ext.dd.Registry = function(){\r
- var elements = {}; \r
- var handles = {}; \r
- var autoIdSeed = 0;\r
-\r
- var getId = function(el, autogen){\r
- if(typeof el == "string"){\r
- return el;\r
- }\r
- var id = el.id;\r
- if(!id && autogen !== false){\r
- id = "extdd-" + (++autoIdSeed);\r
- el.id = id;\r
- }\r
- return id;\r
- };\r
- \r
- return {\r
- <div id="method-Ext.dd.Registry-register"></div>/**\r
- * Resgister a drag drop element\r
- * @param {String/HTMLElement) element The id or DOM node to register\r
- * @param {Object} data (optional) An custom data object that will be passed between the elements that are involved\r
- * in drag drop operations. You can populate this object with any arbitrary properties that your own code\r
- * knows how to interpret, plus there are some specific properties known to the Registry that should be\r
- * populated in the data object (if applicable):\r
- * <pre>\r
-Value Description<br />\r
---------- ------------------------------------------<br />\r
-handles Array of DOM nodes that trigger dragging<br />\r
- for the element being registered<br />\r
-isHandle True if the element passed in triggers<br />\r
- dragging itself, else false\r
-</pre>\r
- */\r
- register : function(el, data){\r
- data = data || {};\r
- if(typeof el == "string"){\r
- el = document.getElementById(el);\r
- }\r
- data.ddel = el;\r
- elements[getId(el)] = data;\r
- if(data.isHandle !== false){\r
- handles[data.ddel.id] = data;\r
- }\r
- if(data.handles){\r
- var hs = data.handles;\r
- for(var i = 0, len = hs.length; i < len; i++){\r
- handles[getId(hs[i])] = data;\r
- }\r
- }\r
- },\r
-\r
- <div id="method-Ext.dd.Registry-unregister"></div>/**\r
- * Unregister a drag drop element\r
- * @param {String/HTMLElement) element The id or DOM node to unregister\r
- */\r
- unregister : function(el){\r
- var id = getId(el, false);\r
- var data = elements[id];\r
- if(data){\r
- delete elements[id];\r
- if(data.handles){\r
- var hs = data.handles;\r
- for(var i = 0, len = hs.length; i < len; i++){\r
- delete handles[getId(hs[i], false)];\r
- }\r
- }\r
- }\r
- },\r
-\r
- <div id="method-Ext.dd.Registry-getHandle"></div>/**\r
- * Returns the handle registered for a DOM Node by id\r
- * @param {String/HTMLElement} id The DOM node or id to look up\r
- * @return {Object} handle The custom handle data\r
- */\r
- getHandle : function(id){\r
- if(typeof id != "string"){ // must be element?\r
- id = id.id;\r
- }\r
- return handles[id];\r
- },\r
-\r
- <div id="method-Ext.dd.Registry-getHandleFromEvent"></div>/**\r
- * Returns the handle that is registered for the DOM node that is the target of the event\r
- * @param {Event} e The event\r
- * @return {Object} handle The custom handle data\r
- */\r
- getHandleFromEvent : function(e){\r
- var t = Ext.lib.Event.getTarget(e);\r
- return t ? handles[t.id] : null;\r
- },\r
-\r
- <div id="method-Ext.dd.Registry-getTarget"></div>/**\r
- * Returns a custom data object that is registered for a DOM node by id\r
- * @param {String/HTMLElement} id The DOM node or id to look up\r
- * @return {Object} data The custom data\r
- */\r
- getTarget : function(id){\r
- if(typeof id != "string"){ // must be element?\r
- id = id.id;\r
- }\r
- return elements[id];\r
- },\r
-\r
- <div id="method-Ext.dd.Registry-getTargetFromEvent"></div>/**\r
- * Returns a custom data object that is registered for the DOM node that is the target of the event\r
- * @param {Event} e The event\r
- * @return {Object} data The custom data\r
- */\r
- getTargetFromEvent : function(e){\r
- var t = Ext.lib.Event.getTarget(e);\r
- return t ? elements[t.id] || handles[t.id] : null;\r
- }\r
- };\r
-}();</pre> \r
-</body>\r
+<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.2.0
+ * Copyright(c) 2006-2010 Ext JS, Inc.
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+<div id="cls-Ext.dd.Registry"></div>/**
+ * @class Ext.dd.Registry
+ * Provides easy access to all drag drop components that are registered on a page. Items can be retrieved either
+ * directly by DOM node id, or by passing in the drag drop event that occurred and looking up the event target.
+ * @singleton
+ */
+Ext.dd.Registry = function(){
+ var elements = {};
+ var handles = {};
+ var autoIdSeed = 0;
+
+ var getId = function(el, autogen){
+ if(typeof el == "string"){
+ return el;
+ }
+ var id = el.id;
+ if(!id && autogen !== false){
+ id = "extdd-" + (++autoIdSeed);
+ el.id = id;
+ }
+ return id;
+ };
+
+ return {
+ <div id="method-Ext.dd.Registry-register"></div>/**
+ * Resgister a drag drop element
+ * @param {String/HTMLElement} element The id or DOM node to register
+ * @param {Object} data (optional) An custom data object that will be passed between the elements that are involved
+ * in drag drop operations. You can populate this object with any arbitrary properties that your own code
+ * knows how to interpret, plus there are some specific properties known to the Registry that should be
+ * populated in the data object (if applicable):
+ * <pre>
+Value Description<br />
+--------- ------------------------------------------<br />
+handles Array of DOM nodes that trigger dragging<br />
+ for the element being registered<br />
+isHandle True if the element passed in triggers<br />
+ dragging itself, else false
+</pre>
+ */
+ register : function(el, data){
+ data = data || {};
+ if(typeof el == "string"){
+ el = document.getElementById(el);
+ }
+ data.ddel = el;
+ elements[getId(el)] = data;
+ if(data.isHandle !== false){
+ handles[data.ddel.id] = data;
+ }
+ if(data.handles){
+ var hs = data.handles;
+ for(var i = 0, len = hs.length; i < len; i++){
+ handles[getId(hs[i])] = data;
+ }
+ }
+ },
+
+ <div id="method-Ext.dd.Registry-unregister"></div>/**
+ * Unregister a drag drop element
+ * @param {String/HTMLElement} element The id or DOM node to unregister
+ */
+ unregister : function(el){
+ var id = getId(el, false);
+ var data = elements[id];
+ if(data){
+ delete elements[id];
+ if(data.handles){
+ var hs = data.handles;
+ for(var i = 0, len = hs.length; i < len; i++){
+ delete handles[getId(hs[i], false)];
+ }
+ }
+ }
+ },
+
+ <div id="method-Ext.dd.Registry-getHandle"></div>/**
+ * Returns the handle registered for a DOM Node by id
+ * @param {String/HTMLElement} id The DOM node or id to look up
+ * @return {Object} handle The custom handle data
+ */
+ getHandle : function(id){
+ if(typeof id != "string"){ // must be element?
+ id = id.id;
+ }
+ return handles[id];
+ },
+
+ <div id="method-Ext.dd.Registry-getHandleFromEvent"></div>/**
+ * Returns the handle that is registered for the DOM node that is the target of the event
+ * @param {Event} e The event
+ * @return {Object} handle The custom handle data
+ */
+ getHandleFromEvent : function(e){
+ var t = Ext.lib.Event.getTarget(e);
+ return t ? handles[t.id] : null;
+ },
+
+ <div id="method-Ext.dd.Registry-getTarget"></div>/**
+ * Returns a custom data object that is registered for a DOM node by id
+ * @param {String/HTMLElement} id The DOM node or id to look up
+ * @return {Object} data The custom data
+ */
+ getTarget : function(id){
+ if(typeof id != "string"){ // must be element?
+ id = id.id;
+ }
+ return elements[id];
+ },
+
+ <div id="method-Ext.dd.Registry-getTargetFromEvent"></div>/**
+ * Returns a custom data object that is registered for the DOM node that is the target of the event
+ * @param {Event} e The event
+ * @return {Object} data The custom data
+ */
+ getTargetFromEvent : function(e){
+ var t = Ext.lib.Event.getTarget(e);
+ return t ? elements[t.id] || handles[t.id] : null;
+ }
+ };
+}();</pre>
+</body>