Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
wp-content
/
plugins
/
kapee-extensions
/
inc
/
admin
/
redux-core
/
assets
/
js
/
vendor
/
select2-sortable
:
redux.select2.sortable.min.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
!function(e){"use strict";e.fn.extend({select2SortableOrder:function(){var t=this.filter("[multiple]");return t.each(function(){var t,r,s,o=[],i=e(this);if("object"!=typeof i.data("select2"))return!1;r=i.siblings(".select2-container"),i.find("optgroup").each(function(e,t){o.push(t)}),i.find("option").each(function(t,r){void 0===e(this).parent("optgroup").prop("label")&&(""===this.value||this.selected||o.push(this))}),t=r.find('.select2-selection__rendered li[class!="select2-search__field"]'),(s=e(t.map(function(t,r){var s,o,l,n,c;if(this)return s=e(this).attr("title"),o=i.select2("data"),e.each(o,function(e,t){if(l=t.text,s===l)return n=t.id,!1}),void 0!==o[t]?(c=n,i.find('option[value="'+c+'"]')[0]):void 0}))).push.apply(s,o),i.children().remove(),i.append(s)}),t},select2Sortable:function(){var t=Array.prototype.slice.call(arguments,0),r=this.filter("[multiple]");if(0===t.length||"object"==typeof t[0]){var s=e.extend({bindOrder:"formSubmit",sortableOptions:{placeholder:"ui-state-highlight",items:"li:not(.select2-search__field)",tolerance:"pointer"}},t[0]);"object"!=typeof r.data("select2")&&r.select2(),r.each(function(){var t=e(this),r=t.siblings(".select2-container").find(".select2-selection__rendered");switch(r.sortable(s.sortableOptions),s.bindOrder){case"sortableStop":r.on("sortstop.select2sortable",function(e,r){t.select2SortableOrder()}),t.on("select2:select",function(t){e(this).select2SortableOrder()});break;default:t.closest("form").off("submit.select2sortable").on("submit.select2sortable",function(){t.select2SortableOrder()})}})}else{if(t[0],-1===e.inArray(t[0],["destroy"]))throw"Unknown method: "+t[0];"destroy"===t[0]&&r.select2SortableDestroy()}return r},select2SortableDestroy:function(){var t=this.filter("[multiple]");return t.each(function(){var t=e(this),r=t.parent().find(".select2-selection__rendered");t.closest("form").off("submit.select2sortable"),r.off("sortstop.select2sortable"),r.sortable("destroy")}),t}})}(jQuery);