/*!
- * Ext JS Library 3.1.0
- * Copyright(c) 2006-2009 Ext JS, LLC
+ * Ext JS Library 3.1.1
+ * Copyright(c) 2006-2010 Ext JS, LLC
* licensing@extjs.com
* http://www.extjs.com/license
*/
* @constructor\r
* Create a new MultiSelect\r
* @param {Object} config Configuration options\r
- * @xtype multiselect \r
+ * @xtype multiselect\r
*/\r
Ext.ux.form.MultiSelect = Ext.extend(Ext.form.Field, {\r
/**\r
this.onStartDrag(x, y);\r
return true;\r
},\r
- \r
+\r
// private\r
collectSelection: function(data) {\r
data.repairXY = Ext.fly(this.view.getSelectedNodes()[0]).getXY();\r
\r
Ext.extend(Ext.ux.form.MultiSelect.DropZone, Ext.dd.DropZone, {\r
/**\r
- * Part of the Ext.dd.DropZone interface. If no target node is found, the\r
- * whole Element becomes the target, and this causes the drop gesture to append.\r
- */\r
+ * Part of the Ext.dd.DropZone interface. If no target node is found, the\r
+ * whole Element becomes the target, and this causes the drop gesture to append.\r
+ */\r
getTargetFromEvent : function(e) {\r
var target = e.getTarget();\r
return target;\r
var pt = this.getDropPoint(e, n, dd);\r
if (n != this.ms.fs.body.dom)\r
n = this.view.findItemFromChild(n);\r
- var insertAt = (this.ms.appendOnly || (n == this.ms.fs.body.dom)) ? this.view.store.getCount() : this.view.indexOf(n);\r
- if (pt == "below") {\r
- insertAt++;\r
+\r
+ if(this.ms.appendOnly) {\r
+ insertAt = this.view.store.getCount();\r
+ } else {\r
+ insertAt = n == this.ms.fs.body.dom ? this.view.store.getCount() - 1 : this.view.indexOf(n);\r
+ if (pt == "below") {\r
+ insertAt++;\r
+ }\r
}\r
\r
var dir = false;\r