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

git-svn-id: http://core.svn.wordpress.org/trunk@23064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Mark Jaquith 2012-12-05 04:11:49 +00:00
parent 4676fb1eda
commit b6982a0804

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.