CoreFiles by mySites.guru
plugin.es6.min.js1 lines, 2,197 bytes, from Joomla_4.0.0-alpha9-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha8
md5
ebde2bc9eb85e58b2ee759c4348cd09d
sha1
cbc80db5d1e672c6a8f3d66a392f6932ed7ba46f
sha256
e57713e562967bf5103975855ed3a0ec5fdcc4a32a0ec2911e146d35194a5b8b
tinymce.PluginManager.add("jdragdrop",a=>{tinyMCE.DOM.bind(document,"dragleave",a=>(a.stopPropagation(),a.preventDefault(),tinyMCE.activeEditor.contentAreaContainer.style.borderWidth="1px 0 0",!1));const b=b=>{const c=new FormData;c.append("Filedata",b),c.append("folder",tinyMCE.activeEditor.settings.mediaUploadPath);const d=new XMLHttpRequest;d.upload.onprogress=a=>{const b=100*(a.loaded/a.total);document.querySelector(".bar").style.width="".concat(b,"%")};const e=()=>{setTimeout(()=>{const b=document.querySelector("#jloader");b.parentNode.removeChild(b),a.contentAreaContainer.style.borderWidth="1px 0 0 0"},200)};d.onload=()=>{const b=JSON.parse(d.responseText);if(200!==d.status)e();else if("0"===b.status&&(e(),a.windowManager.alert("".concat(b.message,": ").concat(tinyMCE.activeEditor.settings.setCustomDir).concat(b.location))),"1"===b.status){e();const a=tinyMCE.activeEditor.getDoc().createElement("img");a.src=tinyMCE.activeEditor.settings.setCustomDir+b.location,tinyMCE.activeEditor.execCommand("mceInsertContent",!1,a.outerHTML)}},d.onerror=()=>{e()},d.open("POST",tinyMCE.activeEditor.settings.uploadUri,!0),d.send(c)};"undefined"==typeof FormData?(Joomla.renderMessages({error:[Joomla.JText._("PLG_TINY_ERR_UNSUPPORTEDBROWSER")]}),a.on("drop",a=>(a.preventDefault(),!1))):(a.on("dragenter",a=>(a.stopPropagation(),!1)),a.on("dragover",b=>(b.preventDefault(),a.contentAreaContainer.style.borderStyle="dashed",a.contentAreaContainer.style.borderWidth="5px",!1)),a.on("drop",c=>{if(c.dataTransfer&&c.dataTransfer.files&&0<c.dataTransfer.files.length){const a=[].slice.call(c.dataTransfer.files);a.forEach(a=>{if(a.name.toLowerCase().match(/\.(jpg|jpeg|png|gif)$/)){const c=document.createElement("div");c.id="jloader";const d=document.createElement("div");d.classList.add("progress"),d.classList.add("progress-success"),d.classList.add("progress-striped"),d.classList.add("active"),d.style.width="100%",d.style.height="30px";const e=document.createElement("div");e.classList.add("bar"),e.style.width="0",d.appendChild(e),c.appendChild(d),document.querySelector(".mce-toolbar-grp").appendChild(c),b(a)}c.preventDefault()})}a.contentAreaContainer.style.borderWidth="1px 0 0"}))});

The same content is in 5 releases, Joomla 4.0.0-alpha8 to 4.0.0-alpha12. See them all, or every version of this file.