CoreFiles by mySites.guru
edit-images.min.js1 lines, 4,518 bytes, from Joomla_4.0.0-alpha3-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha2
md5
f38467551db95baf7510ee8272199951
sha1
848ce7a141072a97467b70f8ef3ac54cd97bdf73
sha256
710a50df15ddf153ce5708a8c6f9d7f16b61959e402d8a9fdbbcb208bcd596cf
Joomla=window.Joomla||{},Joomla.MediaManager=Joomla.MediaManager||{},function(){"use strict";var a=Joomla.getOptions("com_media",{});if(a){Joomla.MediaManager.Edit.original={filename:a.uploadPath.split("/").pop(),extension:a.uploadPath.split(".").pop(),contents:"data:image/"+a.uploadPath.split(".").pop()+";base64,"+a.contents},Joomla.MediaManager.Edit.history={},Joomla.MediaManager.Edit.current={},Joomla.MediaManager.Edit.Reset=function(a){(!a||a&&!0!==a)&&(Joomla.MediaManager.Edit.current.contents=Joomla.MediaManager.Edit.original.contents),document.getElementById("media-manager-edit-container").innerHTML="";for(var t=[].slice.call(document.querySelectorAll('[data-toggle="tab"]')),o=0,i=t.length;o<i;o++)if(t[o].classList.contains("active")){Joomla.MediaManager.Edit[t[o].hash.replace("#attrib-","").toLowerCase()].Deactivate();var n=Joomla.MediaManager.Edit.current;(!a||a&&!0!==a)&&(n=Joomla.MediaManager.Edit.original),e(t[o].hash.replace("#attrib-",""),n);break}},window.addEventListener("mediaManager.history.point",function(){if(Joomla.MediaManager.Edit.original!==Joomla.MediaManager.Edit.current.contents){var a=Object.keys(Joomla.MediaManager.Edit.history).length;if(Joomla.MediaManager.Edit.history[a]&&Joomla.MediaManager.Edit.history[a-1]&&Joomla.MediaManager.Edit.history[a]===Joomla.MediaManager.Edit.history[a-1])return;Joomla.MediaManager.Edit.history[a+1]=Joomla.MediaManager.Edit.current.contents}}),Joomla.MediaManager.Edit.Undo=function(){},Joomla.MediaManager.Edit.Redo=function(){},Joomla.MediaManager.Edit.createProgressBar=function(){},Joomla.MediaManager.Edit.updateProgressBar=function(a){},Joomla.MediaManager.Edit.removeProgressBar=function(){},Joomla.submitbutton=function(e){var t="jpg"===Joomla.MediaManager.Edit.original.extension?"jpeg":Joomla.MediaManager.Edit.original.extension,o=window.location.pathname.replace(/&view=file.*/g,""),i=a.uploadPath.split("/").pop(),n={name:i,content:Joomla.MediaManager.Edit.current.contents.replace("data:image/"+t+";base64,","")},r=a.uploadPath,d=a.apiBaseUrl+"&task=api.files&path="+r,l="application/json";n[a.csrfToken]="1";var s=r.split("/");switch(s.pop(),(s=s.join("/")).endsWith(":")&&(s+="/"),e){case"apply":Joomla.UploadFile.exec(i,JSON.stringify(n),r,d,l),Joomla.MediaManager.Edit.Reset(!0);break;case"save":Joomla.UploadFile.exec(i,JSON.stringify(n),r,d,l),window.location=o+"?option=com_media&path="+s;break;case"cancel":window.location=o+"?option=com_media&path="+s;break;case"reset":Joomla.MediaManager.Edit.Reset("initial")}},Joomla.UploadFile={},Joomla.UploadFile.exec=function(a,e,t,o,i){var n=new XMLHttpRequest;n.upload.onprogress=function(a){Joomla.MediaManager.Edit.updateProgressBar(a.loaded/a.total*100)},n.onload=function(){try{var a=JSON.parse(n.responseText)}catch(e){a=null}a?200==n.status&&(1==a.success&&Joomla.MediaManager.Edit.removeProgressBar(),"1"==a.status&&(Joomla.renderMessages({success:[a.message]},"true"),Joomla.MediaManager.Edit.removeProgressBar())):Joomla.MediaManager.Edit.removeProgressBar()},n.onerror=function(){Joomla.MediaManager.Edit.removeProgressBar()},n.open("PUT",o,!0),n.setRequestHeader("Content-Type",i),Joomla.MediaManager.Edit.createProgressBar(),n.send(e)},document.addEventListener("DOMContentLoaded",function(){setTimeout(function(){var a=[].slice.call(document.querySelectorAll('[data-toggle="tab"]'));if(a.length){for(var t=0,o=a.length;t<o;t++)jQuery(a[t]).on("shown.bs.tab",function(a){a.relatedTarget&&(Joomla.MediaManager.Edit[a.relatedTarget.hash.replace("#attrib-","").toLowerCase()].Deactivate(),document.getElementById("media-manager-edit-container").innerHTML="");var t=Joomla.MediaManager.Edit.current;!0 in Joomla.MediaManager.Edit.current&&(t=Joomla.MediaManager.Edit.original),e(a.target.hash.replace("#attrib-",""),t)});e(a[0].hash.replace("#attrib-",""),Joomla.MediaManager.Edit.original)}},100)});var e=function(a,e){var t=document.getElementById("myTabContent"),o=document.getElementById("attrib-"+a);t.classList.add("row","ml-0","mr-0","p-0"),o.classList.add("col-md-3","p-4");var i=document.getElementById("media-manager-edit-container"),n=document.createElement("div"),r=document.createElement("div"),d=document.createElement("img"),l=document.createElement("img");i.innerHTML="",d.src=e.contents,d.id="image-source",d.style.maxWidth="100%",l.src=e.contents,l.id="image-preview",l.style.maxWidth="100%",n.style.display="none",n.appendChild(d),i.appendChild(n),r.appendChild(l),i.appendChild(r),Joomla.MediaManager.Edit[a.toLowerCase()].Activate(e)}}}();

No other release has this exact content. See every version of this file.