You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

620 lines
20 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. This file is part of Ext JS 3.4
  3. Copyright (c) 2011-2013 Sencha Inc
  4. Contact: http://www.sencha.com/contact
  5. GNU General Public License Usage
  6. This file may be used under the terms of the GNU General Public License version 3.0 as
  7. published by the Free Software Foundation and appearing in the file LICENSE included in the
  8. packaging of this file.
  9. Please review the following information to ensure the GNU General Public License version 3.0
  10. requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  11. If you are unsure which license is appropriate for your use, please contact the sales department
  12. at http://www.sencha.com/contact.
  13. Build date: 2013-04-03 15:07:25
  14. */
  15. Ext.ns('Ext.ux.form');
  16. /**
  17. * @class Ext.ux.form.MultiSelect
  18. * @extends Ext.form.Field
  19. * A control that allows selection and form submission of multiple list items.
  20. *
  21. * @history
  22. * 2008-06-19 bpm Original code contributed by Toby Stuart (with contributions from Robert Williams)
  23. * 2008-06-19 bpm Docs and demo code clean up
  24. *
  25. * @constructor
  26. * Create a new MultiSelect
  27. * @param {Object} config Configuration options
  28. * @xtype multiselect
  29. */
  30. Ext.ux.form.MultiSelect = Ext.extend(Ext.form.Field, {
  31. /**
  32. * @cfg {String} legend Wraps the object with a fieldset and specified legend.
  33. */
  34. /**
  35. * @cfg {Ext.ListView} view The {@link Ext.ListView} used to render the multiselect list.
  36. */
  37. /**
  38. * @cfg {String/Array} dragGroup The ddgroup name(s) for the MultiSelect DragZone (defaults to undefined).
  39. */
  40. /**
  41. * @cfg {String/Array} dropGroup The ddgroup name(s) for the MultiSelect DropZone (defaults to undefined).
  42. */
  43. /**
  44. * @cfg {Boolean} ddReorder Whether the items in the MultiSelect list are drag/drop reorderable (defaults to false).
  45. */
  46. ddReorder:false,
  47. /**
  48. * @cfg {Object/Array} tbar The top toolbar of the control. This can be a {@link Ext.Toolbar} object, a
  49. * toolbar config, or an array of buttons/button configs to be added to the toolbar.
  50. */
  51. /**
  52. * @cfg {String} appendOnly True if the list should only allow append drops when drag/drop is enabled
  53. * (use for lists which are sorted, defaults to false).
  54. */
  55. appendOnly:false,
  56. /**
  57. * @cfg {Number} width Width in pixels of the control (defaults to 100).
  58. */
  59. width:100,
  60. /**
  61. * @cfg {Number} height Height in pixels of the control (defaults to 100).
  62. */
  63. height:100,
  64. /**
  65. * @cfg {String/Number} displayField Name/Index of the desired display field in the dataset (defaults to 0).
  66. */
  67. displayField:0,
  68. /**
  69. * @cfg {String/Number} valueField Name/Index of the desired value field in the dataset (defaults to 1).
  70. */
  71. valueField:1,
  72. /**
  73. * @cfg {Boolean} allowBlank False to require at least one item in the list to be selected, true to allow no
  74. * selection (defaults to true).
  75. */
  76. allowBlank:true,
  77. /**
  78. * @cfg {Number} minSelections Minimum number of selections allowed (defaults to 0).
  79. */
  80. minSelections:0,
  81. /**
  82. * @cfg {Number} maxSelections Maximum number of selections allowed (defaults to Number.MAX_VALUE).
  83. */
  84. maxSelections:Number.MAX_VALUE,
  85. /**
  86. * @cfg {String} blankText Default text displayed when the control contains no items (defaults to the same value as
  87. * {@link Ext.form.TextField#blankText}.
  88. */
  89. blankText:Ext.form.TextField.prototype.blankText,
  90. /**
  91. * @cfg {String} minSelectionsText Validation message displayed when {@link #minSelections} is not met (defaults to 'Minimum {0}
  92. * item(s) required'). The {0} token will be replaced by the value of {@link #minSelections}.
  93. */
  94. minSelectionsText:'Minimum {0} item(s) required',
  95. /**
  96. * @cfg {String} maxSelectionsText Validation message displayed when {@link #maxSelections} is not met (defaults to 'Maximum {0}
  97. * item(s) allowed'). The {0} token will be replaced by the value of {@link #maxSelections}.
  98. */
  99. maxSelectionsText:'Maximum {0} item(s) allowed',
  100. /**
  101. * @cfg {String} delimiter The string used to delimit between items when set or returned as a string of values
  102. * (defaults to ',').
  103. */
  104. delimiter:',',
  105. /**
  106. * @cfg {Ext.data.Store/Array} store The data source to which this MultiSelect is bound (defaults to <tt>undefined</tt>).
  107. * Acceptable values for this property are:
  108. * <div class="mdetail-params"><ul>
  109. * <li><b>any {@link Ext.data.Store Store} subclass</b></li>
  110. * <li><b>an Array</b> : Arrays will be converted to a {@link Ext.data.ArrayStore} internally.
  111. * <div class="mdetail-params"><ul>
  112. * <li><b>1-dimensional array</b> : (e.g., <tt>['Foo','Bar']</tt>)<div class="sub-desc">
  113. * A 1-dimensional array will automatically be expanded (each array item will be the combo
  114. * {@link #valueField value} and {@link #displayField text})</div></li>
  115. * <li><b>2-dimensional array</b> : (e.g., <tt>[['f','Foo'],['b','Bar']]</tt>)<div class="sub-desc">
  116. * For a multi-dimensional array, the value in index 0 of each item will be assumed to be the combo
  117. * {@link #valueField value}, while the value at index 1 is assumed to be the combo {@link #displayField text}.
  118. * </div></li></ul></div></li></ul></div>
  119. */
  120. cls: 'ux-form-multiselect',
  121. // private
  122. defaultAutoCreate : {tag: "div"},
  123. // private
  124. initComponent: function(){
  125. Ext.ux.form.MultiSelect.superclass.initComponent.call(this);
  126. if(Ext.isArray(this.store)){
  127. if (Ext.isArray(this.store[0])){
  128. this.store = new Ext.data.ArrayStore({
  129. fields: ['value','text'],
  130. data: this.store
  131. });
  132. this.valueField = 'value';
  133. }else{
  134. this.store = new Ext.data.ArrayStore({
  135. fields: ['text'],
  136. data: this.store,
  137. expandData: true
  138. });
  139. this.valueField = 'text';
  140. }
  141. this.displayField = 'text';
  142. } else {
  143. this.store = Ext.StoreMgr.lookup(this.store);
  144. }
  145. this.addEvents({
  146. 'dblclick' : true,
  147. 'click' : true,
  148. 'change' : true,
  149. 'drop' : true
  150. });
  151. },
  152. // private
  153. onRender: function(ct, position){
  154. Ext.ux.form.MultiSelect.superclass.onRender.call(this, ct, position);
  155. var fs = this.fs = new Ext.form.FieldSet({
  156. renderTo: this.el,
  157. title: this.legend,
  158. height: this.height,
  159. width: this.width,
  160. style: "padding:0;",
  161. tbar: this.tbar
  162. });
  163. fs.body.addClass('ux-mselect');
  164. this.view = new Ext.ListView({
  165. selectedClass: 'ux-mselect-selected',
  166. multiSelect: true,
  167. store: this.store,
  168. columns: [{ header: 'Value', width: 1, dataIndex: this.displayField }],
  169. hideHeaders: true
  170. });
  171. fs.add(this.view);
  172. this.view.on('click', this.onViewClick, this);
  173. this.view.on('beforeclick', this.onViewBeforeClick, this);
  174. this.view.on('dblclick', this.onViewDblClick, this);
  175. this.hiddenName = this.name || Ext.id();
  176. var hiddenTag = { tag: "input", type: "hidden", value: "", name: this.hiddenName };
  177. this.hiddenField = this.el.createChild(hiddenTag);
  178. this.hiddenField.dom.disabled = this.hiddenName != this.name;
  179. fs.doLayout();
  180. },
  181. // private
  182. afterRender: function(){
  183. Ext.ux.form.MultiSelect.superclass.afterRender.call(this);
  184. if (this.ddReorder && !this.dragGroup && !this.dropGroup){
  185. this.dragGroup = this.dropGroup = 'MultiselectDD-' + Ext.id();
  186. }
  187. if (this.draggable || this.dragGroup){
  188. this.dragZone = new Ext.ux.form.MultiSelect.DragZone(this, {
  189. ddGroup: this.dragGroup
  190. });
  191. }
  192. if (this.droppable || this.dropGroup){
  193. this.dropZone = new Ext.ux.form.MultiSelect.DropZone(this, {
  194. ddGroup: this.dropGroup
  195. });
  196. }
  197. },
  198. // private
  199. onViewClick: function(vw, index, node, e) {
  200. this.fireEvent('change', this, this.getValue(), this.hiddenField.dom.value);
  201. this.hiddenField.dom.value = this.getValue();
  202. this.fireEvent('click', this, e);
  203. this.validate();
  204. },
  205. // private
  206. onViewBeforeClick: function(vw, index, node, e) {
  207. if (this.disabled || this.readOnly) {
  208. return false;
  209. }
  210. },
  211. // private
  212. onViewDblClick : function(vw, index, node, e) {
  213. return this.fireEvent('dblclick', vw, index, node, e);
  214. },
  215. /**
  216. * Returns an array of data values for the selected items in the list. The values will be separated
  217. * by {@link #delimiter}.
  218. * @return {Array} value An array of string data values
  219. */
  220. getValue: function(valueField){
  221. var returnArray = [];
  222. var selectionsArray = this.view.getSelectedIndexes();
  223. if (selectionsArray.length == 0) {return '';}
  224. for (var i=0; i<selectionsArray.length; i++) {
  225. returnArray.push(this.store.getAt(selectionsArray[i]).get((valueField != null) ? valueField : this.valueField));
  226. }
  227. return returnArray.join(this.delimiter);
  228. },
  229. /**
  230. * Sets a delimited string (using {@link #delimiter}) or array of data values into the list.
  231. * @param {String/Array} values The values to set
  232. */
  233. setValue: function(values) {
  234. var index;
  235. var selections = [];
  236. this.view.clearSelections();
  237. this.hiddenField.dom.value = '';
  238. if (!values || (values == '')) { return; }
  239. if (!Ext.isArray(values)) { values = values.split(this.delimiter); }
  240. for (var i=0; i<values.length; i++) {
  241. index = this.view.store.indexOf(this.view.store.query(this.valueField,
  242. new RegExp('^' + values[i] + '$', "i")).itemAt(0));
  243. selections.push(index);
  244. }
  245. this.view.select(selections);
  246. this.hiddenField.dom.value = this.getValue();
  247. this.validate();
  248. },
  249. // inherit docs
  250. reset : function() {
  251. this.setValue('');
  252. },
  253. // inherit docs
  254. getRawValue: function(valueField) {
  255. var tmp = this.getValue(valueField);
  256. if (tmp.length) {
  257. tmp = tmp.split(this.delimiter);
  258. }
  259. else {
  260. tmp = [];
  261. }
  262. return tmp;
  263. },
  264. // inherit docs
  265. setRawValue: function(values){
  266. setValue(values);
  267. },
  268. // inherit docs
  269. validateValue : function(value){
  270. if (value.length < 1) { // if it has no value
  271. if (this.allowBlank) {
  272. this.clearInvalid();
  273. return true;
  274. } else {
  275. this.markInvalid(this.blankText);
  276. return false;
  277. }
  278. }
  279. if (value.length < this.minSelections) {
  280. this.markInvalid(String.format(this.minSelectionsText, this.minSelections));
  281. return false;
  282. }
  283. if (value.length > this.maxSelections) {
  284. this.markInvalid(String.format(this.maxSelectionsText, this.maxSelections));
  285. return false;
  286. }
  287. return true;
  288. },
  289. // inherit docs
  290. disable: function(){
  291. this.disabled = true;
  292. this.hiddenField.dom.disabled = true;
  293. this.fs.disable();
  294. },
  295. // inherit docs
  296. enable: function(){
  297. this.disabled = false;
  298. this.hiddenField.dom.disabled = false;
  299. this.fs.enable();
  300. },
  301. // inherit docs
  302. destroy: function(){
  303. Ext.destroy(this.fs, this.dragZone, this.dropZone);
  304. Ext.ux.form.MultiSelect.superclass.destroy.call(this);
  305. }
  306. });
  307. Ext.reg('multiselect', Ext.ux.form.MultiSelect);
  308. //backwards compat
  309. Ext.ux.Multiselect = Ext.ux.form.MultiSelect;
  310. Ext.ux.form.MultiSelect.DragZone = function(ms, config){
  311. this.ms = ms;
  312. this.view = ms.view;
  313. var ddGroup = config.ddGroup || 'MultiselectDD';
  314. var dd;
  315. if (Ext.isArray(ddGroup)){
  316. dd = ddGroup.shift();
  317. } else {
  318. dd = ddGroup;
  319. ddGroup = null;
  320. }
  321. Ext.ux.form.MultiSelect.DragZone.superclass.constructor.call(this, this.ms.fs.body, { containerScroll: true, ddGroup: dd });
  322. this.setDraggable(ddGroup);
  323. };
  324. Ext.extend(Ext.ux.form.MultiSelect.DragZone, Ext.dd.DragZone, {
  325. onInitDrag : function(x, y){
  326. var el = Ext.get(this.dragData.ddel.cloneNode(true));
  327. this.proxy.update(el.dom);
  328. el.setWidth(el.child('em').getWidth());
  329. this.onStartDrag(x, y);
  330. return true;
  331. },
  332. // private
  333. collectSelection: function(data) {
  334. data.repairXY = Ext.fly(this.view.getSelectedNodes()[0]).getXY();
  335. var i = 0;
  336. this.view.store.each(function(rec){
  337. if (this.view.isSelected(i)) {
  338. var n = this.view.getNode(i);
  339. var dragNode = n.cloneNode(true);
  340. dragNode.id = Ext.id();
  341. data.ddel.appendChild(dragNode);
  342. data.records.push(this.view.store.getAt(i));
  343. data.viewNodes.push(n);
  344. }
  345. i++;
  346. }, this);
  347. },
  348. // override
  349. onEndDrag: function(data, e) {
  350. var d = Ext.get(this.dragData.ddel);
  351. if (d && d.hasClass("multi-proxy")) {
  352. d.remove();
  353. }
  354. },
  355. // override
  356. getDragData: function(e){
  357. var target = this.view.findItemFromChild(e.getTarget());
  358. if(target) {
  359. if (!this.view.isSelected(target) && !e.ctrlKey && !e.shiftKey) {
  360. this.view.select(target);
  361. this.ms.setValue(this.ms.getValue());
  362. }
  363. if (this.view.getSelectionCount() == 0 || e.ctrlKey || e.shiftKey) return false;
  364. var dragData = {
  365. sourceView: this.view,
  366. viewNodes: [],
  367. records: []
  368. };
  369. if (this.view.getSelectionCount() == 1) {
  370. var i = this.view.getSelectedIndexes()[0];
  371. var n = this.view.getNode(i);
  372. dragData.viewNodes.push(dragData.ddel = n);
  373. dragData.records.push(this.view.store.getAt(i));
  374. dragData.repairXY = Ext.fly(n).getXY();
  375. } else {
  376. dragData.ddel = document.createElement('div');
  377. dragData.ddel.className = 'multi-proxy';
  378. this.collectSelection(dragData);
  379. }
  380. return dragData;
  381. }
  382. return false;
  383. },
  384. // override the default repairXY.
  385. getRepairXY : function(e){
  386. return this.dragData.repairXY;
  387. },
  388. // private
  389. setDraggable: function(ddGroup){
  390. if (!ddGroup) return;
  391. if (Ext.isArray(ddGroup)) {
  392. Ext.each(ddGroup, this.setDraggable, this);
  393. return;
  394. }
  395. this.addToGroup(ddGroup);
  396. }
  397. });
  398. Ext.ux.form.MultiSelect.DropZone = function(ms, config){
  399. this.ms = ms;
  400. this.view = ms.view;
  401. var ddGroup = config.ddGroup || 'MultiselectDD';
  402. var dd;
  403. if (Ext.isArray(ddGroup)){
  404. dd = ddGroup.shift();
  405. } else {
  406. dd = ddGroup;
  407. ddGroup = null;
  408. }
  409. Ext.ux.form.MultiSelect.DropZone.superclass.constructor.call(this, this.ms.fs.body, { containerScroll: true, ddGroup: dd });
  410. this.setDroppable(ddGroup);
  411. };
  412. Ext.extend(Ext.ux.form.MultiSelect.DropZone, Ext.dd.DropZone, {
  413. /**
  414. * Part of the Ext.dd.DropZone interface. If no target node is found, the
  415. * whole Element becomes the target, and this causes the drop gesture to append.
  416. */
  417. getTargetFromEvent : function(e) {
  418. var target = e.getTarget();
  419. return target;
  420. },
  421. // private
  422. getDropPoint : function(e, n, dd){
  423. if (n == this.ms.fs.body.dom) { return "below"; }
  424. var t = Ext.lib.Dom.getY(n), b = t + n.offsetHeight;
  425. var c = t + (b - t) / 2;
  426. var y = Ext.lib.Event.getPageY(e);
  427. if(y <= c) {
  428. return "above";
  429. }else{
  430. return "below";
  431. }
  432. },
  433. // private
  434. isValidDropPoint: function(pt, n, data) {
  435. if (!data.viewNodes || (data.viewNodes.length != 1)) {
  436. return true;
  437. }
  438. var d = data.viewNodes[0];
  439. if (d == n) {
  440. return false;
  441. }
  442. if ((pt == "below") && (n.nextSibling == d)) {
  443. return false;
  444. }
  445. if ((pt == "above") && (n.previousSibling == d)) {
  446. return false;
  447. }
  448. return true;
  449. },
  450. // override
  451. onNodeEnter : function(n, dd, e, data){
  452. return false;
  453. },
  454. // override
  455. onNodeOver : function(n, dd, e, data){
  456. var dragElClass = this.dropNotAllowed;
  457. var pt = this.getDropPoint(e, n, dd);
  458. if (this.isValidDropPoint(pt, n, data)) {
  459. if (this.ms.appendOnly) {
  460. return "x-tree-drop-ok-below";
  461. }
  462. // set the insert point style on the target node
  463. if (pt) {
  464. var targetElClass;
  465. if (pt == "above"){
  466. dragElClass = n.previousSibling ? "x-tree-drop-ok-between" : "x-tree-drop-ok-above";
  467. targetElClass = "x-view-drag-insert-above";
  468. } else {
  469. dragElClass = n.nextSibling ? "x-tree-drop-ok-between" : "x-tree-drop-ok-below";
  470. targetElClass = "x-view-drag-insert-below";
  471. }
  472. if (this.lastInsertClass != targetElClass){
  473. Ext.fly(n).replaceClass(this.lastInsertClass, targetElClass);
  474. this.lastInsertClass = targetElClass;
  475. }
  476. }
  477. }
  478. return dragElClass;
  479. },
  480. // private
  481. onNodeOut : function(n, dd, e, data){
  482. this.removeDropIndicators(n);
  483. },
  484. // private
  485. onNodeDrop : function(n, dd, e, data){
  486. if (this.ms.fireEvent("drop", this, n, dd, e, data) === false) {
  487. return false;
  488. }
  489. var pt = this.getDropPoint(e, n, dd);
  490. if (n != this.ms.fs.body.dom)
  491. n = this.view.findItemFromChild(n);
  492. if(this.ms.appendOnly) {
  493. insertAt = this.view.store.getCount();
  494. } else {
  495. insertAt = n == this.ms.fs.body.dom ? this.view.store.getCount() - 1 : this.view.indexOf(n);
  496. if (pt == "below") {
  497. insertAt++;
  498. }
  499. }
  500. var dir = false;
  501. // Validate if dragging within the same MultiSelect
  502. if (data.sourceView == this.view) {
  503. // If the first element to be inserted below is the target node, remove it
  504. if (pt == "below") {
  505. if (data.viewNodes[0] == n) {
  506. data.viewNodes.shift();
  507. }
  508. } else { // If the last element to be inserted above is the target node, remove it
  509. if (data.viewNodes[data.viewNodes.length - 1] == n) {
  510. data.viewNodes.pop();
  511. }
  512. }
  513. // Nothing to drop...
  514. if (!data.viewNodes.length) {
  515. return false;
  516. }
  517. // If we are moving DOWN, then because a store.remove() takes place first,
  518. // the insertAt must be decremented.
  519. if (insertAt > this.view.store.indexOf(data.records[0])) {
  520. dir = 'down';
  521. insertAt--;
  522. }
  523. }
  524. for (var i = 0; i < data.records.length; i++) {
  525. var r = data.records[i];
  526. if (data.sourceView) {
  527. data.sourceView.store.remove(r);
  528. }
  529. this.view.store.insert(dir == 'down' ? insertAt : insertAt++, r);
  530. var si = this.view.store.sortInfo;
  531. if(si){
  532. this.view.store.sort(si.field, si.direction);
  533. }
  534. }
  535. return true;
  536. },
  537. // private
  538. removeDropIndicators : function(n){
  539. if(n){
  540. Ext.fly(n).removeClass([
  541. "x-view-drag-insert-above",
  542. "x-view-drag-insert-left",
  543. "x-view-drag-insert-right",
  544. "x-view-drag-insert-below"]);
  545. this.lastInsertClass = "_noclass";
  546. }
  547. },
  548. // private
  549. setDroppable: function(ddGroup){
  550. if (!ddGroup) return;
  551. if (Ext.isArray(ddGroup)) {
  552. Ext.each(ddGroup, this.setDroppable, this);
  553. return;
  554. }
  555. this.addToGroup(ddGroup);
  556. }
  557. });