From 4413c9514bb5bcfc91555a2f5efbc9a8da3661db Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Wed, 5 Dec 2012 04:11:49 +0000 Subject: [PATCH] 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 --- wp-includes/js/media-views.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/js/media-views.js b/wp-includes/js/media-views.js index ee6ad580f1..5760fe827d 100644 --- a/wp-includes/js/media-views.js +++ b/wp-includes/js/media-views.js @@ -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.