芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/www/media/mod_quickicon/js/quickicon-es5.min.js
!function(){"use strict";if(!Joomla)throw new Error("Joomla API was not properly initialized");Array.from(document.querySelectorAll(".quickicon")).forEach((function(t){var r=t.querySelector(".quickicon-amount");r&&r.dataset.url&&Joomla.request({url:r.dataset.url,method:"GET",onSuccess:function(a){var e;try{e=JSON.parse(a)}catch(r){t.classList.add("error")}if(Object.prototype.hasOwnProperty.call(e,"data")){var o=t.querySelector(".quickicon-name"),n=document.createElement("span");t.classList.add(e.data>0?"warning":"success"),e.data.name&&o&&(n.textContent=e.data.name,o.replaceChild(n,o.firstChild)),r.textContent=""+e.data.amount;var c=t.querySelector(".quickicon-sr-desc");e.data.sronly&&c&&(c.textContent=e.data.sronly)}else t.classList.add("error")},onError:function(){t.classList.add("error")}})}))}();