Upgrade to ExtJS 3.1.0 - Released 12/16/2009
[extjs.git] / src / widgets / grid / ColumnDD.js
index bbc844e..b739af1 100644 (file)
@@ -1,24 +1,26 @@
 /*!
- * Ext JS Library 3.0.3
+ * Ext JS Library 3.1.0
  * Copyright(c) 2006-2009 Ext JS, LLC
  * licensing@extjs.com
  * http://www.extjs.com/license
  */
 // private\r
 // This is a support class used internally by the Grid components\r
-Ext.grid.HeaderDragZone = function(grid, hd, hd2){\r
-    this.grid = grid;\r
-    this.view = grid.getView();\r
-    this.ddGroup = "gridHeader" + this.grid.getGridEl().id;\r
-    Ext.grid.HeaderDragZone.superclass.constructor.call(this, hd);\r
-    if(hd2){\r
-        this.setHandleElId(Ext.id(hd));\r
-        this.setOuterHandleElId(Ext.id(hd2));\r
-    }\r
-    this.scroll = false;\r
-};\r
-Ext.extend(Ext.grid.HeaderDragZone, Ext.dd.DragZone, {\r
+Ext.grid.HeaderDragZone = Ext.extend(Ext.dd.DragZone, {\r
     maxDragWidth: 120,\r
+    \r
+    constructor : function(grid, hd, hd2){\r
+        this.grid = grid;\r
+        this.view = grid.getView();\r
+        this.ddGroup = "gridHeader" + this.grid.getGridEl().id;\r
+        Ext.grid.HeaderDragZone.superclass.constructor.call(this, hd);\r
+        if(hd2){\r
+            this.setHandleElId(Ext.id(hd));\r
+            this.setOuterHandleElId(Ext.id(hd2));\r
+        }\r
+        this.scroll = false;\r
+    },\r
+    \r
     getDragData : function(e){\r
         var t = Ext.lib.Event.getTarget(e);\r
         var h = this.view.findHeaderCell(t);\r
@@ -54,28 +56,29 @@ Ext.extend(Ext.grid.HeaderDragZone, Ext.dd.DragZone, {
 \r
 // private\r
 // This is a support class used internally by the Grid components\r
-Ext.grid.HeaderDropZone = function(grid, hd, hd2){\r
-    this.grid = grid;\r
-    this.view = grid.getView();\r
-    // split the proxies so they don't interfere with mouse events\r
-    this.proxyTop = Ext.DomHelper.append(document.body, {\r
-        cls:"col-move-top", html:" "\r
-    }, true);\r
-    this.proxyBottom = Ext.DomHelper.append(document.body, {\r
-        cls:"col-move-bottom", html:" "\r
-    }, true);\r
-    this.proxyTop.hide = this.proxyBottom.hide = function(){\r
-        this.setLeftTop(-100,-100);\r
-        this.setStyle("visibility", "hidden");\r
-    };\r
-    this.ddGroup = "gridHeader" + this.grid.getGridEl().id;\r
-    // temporarily disabled\r
-    //Ext.dd.ScrollManager.register(this.view.scroller.dom);\r
-    Ext.grid.HeaderDropZone.superclass.constructor.call(this, grid.getGridEl().dom);\r
-};\r
-Ext.extend(Ext.grid.HeaderDropZone, Ext.dd.DropZone, {\r
+Ext.grid.HeaderDropZone = Ext.extend(Ext.dd.DropZone, {\r
     proxyOffsets : [-4, -9],\r
     fly: Ext.Element.fly,\r
+    \r
+    constructor : function(grid, hd, hd2){\r
+        this.grid = grid;\r
+        this.view = grid.getView();\r
+        // split the proxies so they don't interfere with mouse events\r
+        this.proxyTop = Ext.DomHelper.append(document.body, {\r
+            cls:"col-move-top", html:" "\r
+        }, true);\r
+        this.proxyBottom = Ext.DomHelper.append(document.body, {\r
+            cls:"col-move-bottom", html:" "\r
+        }, true);\r
+        this.proxyTop.hide = this.proxyBottom.hide = function(){\r
+            this.setLeftTop(-100,-100);\r
+            this.setStyle("visibility", "hidden");\r
+        };\r
+        this.ddGroup = "gridHeader" + this.grid.getGridEl().id;\r
+        // temporarily disabled\r
+        //Ext.dd.ScrollManager.register(this.view.scroller.dom);\r
+        Ext.grid.HeaderDropZone.superclass.constructor.call(this, grid.getGridEl().dom);\r
+    },\r
 \r
     getTargetFromEvent : function(e){\r
         var t = Ext.lib.Event.getTarget(e);\r
@@ -181,15 +184,14 @@ Ext.extend(Ext.grid.HeaderDropZone, Ext.dd.DropZone, {
     }\r
 });\r
 \r
-\r
-Ext.grid.GridView.ColumnDragZone = function(grid, hd){\r
-    Ext.grid.GridView.ColumnDragZone.superclass.constructor.call(this, grid, hd, null);\r
-    this.proxy.el.addClass('x-grid3-col-dd');\r
-};\r
-\r
-Ext.extend(Ext.grid.GridView.ColumnDragZone, Ext.grid.HeaderDragZone, {\r
+Ext.grid.GridView.ColumnDragZone = Ext.extend(Ext.grid.HeaderDragZone, {\r
+    \r
+    constructor : function(grid, hd){\r
+        Ext.grid.GridView.ColumnDragZone.superclass.constructor.call(this, grid, hd, null);\r
+        this.proxy.el.addClass('x-grid3-col-dd');\r
+    },\r
+    \r
     handleMouseDown : function(e){\r
-\r
     },\r
 \r
     callHandleMouseDown : function(e){\r