/*!
- * Ext JS Library 3.0.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
height: this.height,\r
width: this.width,\r
style: "padding:0;",\r
- tbar: this.tbar,\r
- bodyStyle: 'overflow: auto;'\r
+ tbar: this.tbar\r
});\r
+ fs.body.addClass('ux-mselect');\r
\r
this.view = new Ext.ListView({\r
multiSelect: true,\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