Sindbad~EG File Manager

Current Path : /home/frekansk/.trash/wp-content/plugins/learnpress/assets/js/admin/share/
Upload File :
Current File : /home/frekansk/.trash/wp-content/plugins/learnpress/assets/js/admin/share/advanced-list.min.js

!function(t){const e=function(e,n){const i=this,o=t(e).hasClass("advanced-list")?t(e):t(".advanced-list",e);function s(t){o.children(":eq("+(t-1)+")").remove(),i.options.onRemove&&i.options.onRemove.call(i)}this.options=t.extend({template:'<li data-id="{{id}}"><span class="remove-item"></span><span>{{text}}</span> </li>'},n||{}),this.$el=o,o.on("click",".remove-item",(function(e){e.preventDefault(),s(o.children().index(t(this).closest("li"))+1)})),this.add=function(e,n){let s={},a=function(){const e=t(i.options.template);if(e.length)return e.html();return i.options.template}();t.isPlainObject(e)?s=t.extend({id:0,text:""},e):"string"==typeof e?s={id:"",text:e}:void 0!==e[0]&&(s={id:e[1]?e[1]:"",text:e[0]});for(const t in s){const e=new RegExp("{{"+t+"}}","g");a=a.replace(e,s[t])}if(a=t(a),void 0!==n){const t=o.children(":eq("+(n-1)+")");t.length?a.insertBefore(t):o.append(a)}else o.append(a);o.children().detach().each((function(){o.append("\n").append(this)})),i.options.onAdd&&i.options.onAdd.call(i)},this.remove=s};t.fn.LP("AdvancedList",(function(n){const i=[];for(let t=1;t<arguments.length;t++)i.push(arguments[t]);return t.each(this,(function(){let o=t(this).data("advancedList");return o||(o=new e(this,n),t(this).data("advancedList",o)),"string"==typeof n&&"function"==typeof o[n]?o[n].apply(o,i):this}))}))}(jQuery);

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists