Skip to content

Commit

Permalink
Revert "Add: promise based rule checking"
Browse files Browse the repository at this point in the history
This reverts commit 9931893.
  • Loading branch information
DavidPhilip committed Feb 27, 2015
1 parent 6a8b367 commit d875d2f
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions jquery.nestable.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,18 +482,16 @@
var isRejected = false;
for (i = 0; i < this.options.reject.length; i++) {
var reject = this.options.reject[i];
reject.rule.apply(el, [this]).then(function(response) {
if (response) {
var nestableDragEl = el.clone(true);
this.dragRootEl.html(this.nestableCopy.children().clone(true));
if (reject.action) {
reject.action.apply(el, [nestableDragEl, this]);
}

isRejected = true;
break;
}
}, el, this, reject)
if (reject.rule.apply(el, [this])) {
var nestableDragEl = el.clone(true);
this.dragRootEl.html(this.nestableCopy.children().clone(true));
if (reject.action) {
reject.action.apply(el, [nestableDragEl, this]);
}

isRejected = true;
break;
}
}

if (!isRejected) {
Expand Down

0 comments on commit d875d2f

Please sign in to comment.