Sindbad~EG File Manager
!function(l){"use strict";var i="";redux.field_objects=redux.field_objects||{},redux.field_objects.sorter=redux.field_objects.sorter||{},redux.field_objects.sorter.init=function(t){t=l.redux.getSelector(t,"sorter"),l(t).each(function(){const e=l(this);let t=e;(t=e.hasClass("redux-field-container")?t:e.parents(".redux-field-container:first")).is(":hidden")||t.hasClass("redux-field-init")&&(t.removeClass("redux-field-init"),e.find(".redux-sorter").each(function(){var t=l(this).attr("id");const d=l(this).hasClass("in-repeater");e.find("#"+t).find("ul").sortable({items:"li",placeholder:"placeholder",connectWith:".sortlist_"+t,opacity:.8,scroll:!1,out:function(t,e){e.helper&&(i=0<e.offset.top?"down":"up",redux.field_objects.sorter.scrolling(l(this).parents(".redux-field-container:first")))},over:function(){i=""},deactivate:function(){i=""},stop:function(t,e){var i,r;let s;s=d?l(this).attr("data-repeater-id"):l(this).attr("data-id"),i=redux.optName.sorter[s],r=l(this).find("h3").text(),void 0!==i.limits&&i.limits&&r&&i.limits[r]&&(l(this).children("li").length>=i.limits[r]?(l(this).addClass("filled"),l(this).children("li").length>i.limits[r]&&l(e.sender).sortable("cancel")):l(this).removeClass("filled"))},update:function(t,e){var i,r;let s;s=d?l(this).attr("data-repeater-id"):l(this).attr("data-id"),i=redux.optName.sorter[s],r=l(this).find("h3").text(),void 0!==i.limits&&i.limits&&r&&i.limits[r]&&(l(this).children("li").length>=i.limits[r]?(l(this).addClass("filled"),l(this).children("li").length>i.limits[r]&&l(e.sender).sortable("cancel")):l(this).removeClass("filled")),l(this).find(".position").each(function(){let t;var e,i=l(this).parent().attr("data-id"),r=l(this).parent().parent().attr("data-group-id");redux_change(l(this)),e=l(this).parent().parent().attr("data-suffix"),t=d?l(this).parent().parent().attr("data-repeater-id"):l(this).parent().parent().attr("data-id"),void 0===redux.customizer?l(this).prop("name",redux.optName.args.opt_name+"["+t+"]"+e+"["+r+"]["+i+"]"):l(this).prop("name",t+e+"["+r+"]["+i+"]")})}}),e.find(".redux-sorter").disableSelection()}))})},redux.field_objects.sorter.scrolling=function(t){void 0!==t&&(t=t.find(".redux-sorter"),"up"===i?(t.scrollTop(t.scrollTop()-20),setTimeout(redux.field_objects.sorter.scrolling,50)):"down"===i&&(t.scrollTop(t.scrollTop()+20),setTimeout(redux.field_objects.sorter.scrolling,50)))}}(jQuery);
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists