Allow a sortable options hash to be passed in, so you can override the defaults. props koopersmith. see #22696

git-svn-id: https://develop.svn.wordpress.org/trunk@23064 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2012-12-05 04:11:49 +00:00
parent 548e695750
commit 4413c9514b
1 changed files with 2 additions and 2 deletions

View File

@ -3186,7 +3186,7 @@
if ( ! this.options.sortable || ! $.fn.sortable )
return;
this.$el.sortable({
this.$el.sortable( _.extend({
// If the `collection` has a `comparator`, disable sorting.
disabled: !! collection.comparator,
@ -3231,7 +3231,7 @@
// update the menu order.
collection.saveMenuOrder();
}
});
}, this.options.sortable ) );
// If the `orderby` property is changed on the `collection`,
// check to see if we have a `comparator`. If so, disable sorting.