Permalink
Browse files

Fix call to isAllowed

Referring to the discussion about commit c1d6a86, isAllowed should be called with the currentItem instead of the item's placeholder, which is pretty useless.
  • Loading branch information...
1 parent 552453c commit 28fc2a03db30f1c3ff5aabf92099cb5417c9c2c7 @vcarel vcarel committed Sep 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 jquery.mjs.nestedSortable.js
@@ -403,7 +403,7 @@
// Is the root protected?
// Are we trying to nest under a no-nest?
// Are we nesting too deep?
- if (!o.isAllowed(this.placeholder, parentItem) ||
+ if (!o.isAllowed(this.currentItem, parentItem) ||
parentItem && parentItem.hasClass(o.disableNesting) ||
o.protectRoot && (parentItem == null && !isRoot || isRoot && level > 1)) {
this.placeholder.addClass(o.errorClass);

0 comments on commit 28fc2a0

Please sign in to comment.