芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/ixilyucatan.gob.mx/media/system/js/draggable.min.js
let url,direction,isNested,dragElementIndex,dropElementIndex,container=document.querySelector(".js-draggable");if(container)url=container.dataset.url,direction=container.dataset.direction,isNested=container.dataset.nested;else if(Joomla.getOptions("draggable-list")){const e=Joomla.getOptions("draggable-list");container=document.querySelector(e.id),container.classList.contains("js-draggable")||container.classList.add("js-draggable"),({url:url}=e),({direction:direction}=e),isNested=e.nested}if(container){document.addEventListener("touchstart",(()=>{}),!1);const e=(e,t,a,r)=>{let n;const l=[];if(a
{if(!e.dataset.itemId)return;const t=e.dataset.itemId,a=container.querySelectorAll(`tr[data-parents~="${t}"]`);a.length&&e.after(...a)},a=a=>{let r,n,l;const o=a.dataset.draggableGroup;o?(l=`tr[data-draggable-group="${o}"]`,r=`[data-draggable-group="${o}"] [name="order[]"]`,n=`[data-draggable-group="${o}"] [name="cid[]"]`):(l="tr",r='[name="order[]"]',n='[name="cid[]"]');const d=[].slice.call(container.querySelectorAll(l)),i=[].slice.call(container.querySelectorAll(r)),s=[].slice.call(container.querySelectorAll(n));if(dropElementIndex=d.indexOf(a),url){const t=document.querySelector('[name="task"]');t&&t.setAttribute("name","some__Temporary__Name__");const a={url:url,method:"POST",data:e(i,s,dragElementIndex,dropElementIndex).join("&"),perform:!0};Joomla.request(a),t&&t.setAttribute("name","task")}t(a)};dragula([container],{direction:"vertical",copy:!1,revertOnSpill:!0,accepts:(e,t,a,r)=>isNested&&null!==r?r.dataset.draggableGroup&&r.dataset.draggableGroup===e.dataset.draggableGroup:null===r||r&&"tr"===r.tagName.toLowerCase(),mirrorContainer:container}).on("drag",(e=>{let t;const a=e.dataset.draggableGroup;t=a?`tr[data-draggable-group="${a}"]`:"tr";const r=[].slice.call(container.querySelectorAll(t));dragElementIndex=r.indexOf(e)})).on("drop",(e=>{a(e)}))}