芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/ixilyucatan.gob.mx/media/com_languages/js/overrider-es5.min.js
!function(){"use strict";!function(e,s){var t=function(){function t(){this.states={refreshing:!1,refreshed:!1,counter:0,searchString:"",searchType:"value"},this.spinner=s.getElementById("overrider-spinner"),this.spinnerBtn=s.getElementById("overrider-spinner-btn"),this.moreResults=s.getElementById("more-results"),this.moreResultsButton=s.getElementById("more-results-button"),this.resultsContainer=s.getElementById("results-container"),this.refreshStatus=s.getElementById("refresh-status")}var r=t.prototype;return r.refreshCache=function(){var s=this;this.states.refreshing=!0,this.refreshStatus.classList.add("show"),e.request({url:"index.php?option=com_languages&task=strings.refresh&format=json",method:"POST",headers:{"Content-Type":"application/json"},onSuccess:function(t){t.error&&t.message&&alert(t.message),t.messages&&e.renderMessages(t.messages),s.refreshStatus.classList.remove("show"),s.states.refreshing=!1},onError:function(){alert(e.Text._("COM_LANGUAGES_VIEW_OVERRIDE_REQUEST_ERROR")),s.refreshStatus.classList.remove("show")}})},r.searchStrings=function(t){var r=this;if(!this.states.refreshing){var a=s.getElementById("jform_searchstring"),i=s.getElementById("jform_searchtype");if(!t)this.states.searchString=a.value,this.states.searchType=i.value||"value",[].slice.call(s.querySelectorAll(".language-results")).forEach((function(e){e.parentNode.removeChild(e)}));if(this.states.searchString){if(t)this.spinnerBtn.classList.add("show");else this.moreResults.classList.remove("show"),[].slice.call(s.querySelectorAll("#results-container div.language-results")).forEach((function(e){e.parentNode.removeChild(e)})),this.resultsContainer.classList.add("show"),this.spinner.classList.add("show");e.request({url:"index.php?option=com_languages&task=strings.search&format=json&searchstring="+this.states.searchString+"&searchtype="+this.states.searchType+"&more="+t,method:"POST",headers:{"Content-Type":"application/json"},onSuccess:function(s){var t=JSON.parse(s);t.error&&t.message&&alert(t.message),t.messages&&e.renderMessages(t.messages),t.data&&(t.data.results&&e.overrider.insertResults(t.data.results),t.data.more?(r.states.more=t.data.more,r.moreResultsButton.disabled=!1,r.moreResults.classList.add("show")):(r.moreResultsButton.disabled=!0,r.moreResults.classList.remove("show"))),r.spinnerBtn.classList.remove("show"),r.spinner.classList.remove("show")},onError:function(){alert(e.Text._("COM_LANGUAGES_VIEW_OVERRIDE_REQUEST_ERROR")),r.moreResultsButton.disabled=!0,r.moreResults.classList.remove("show"),r.resultsContainer.classList.remove("show")}})}else a.classList.add("invalid")}},r.insertResults=function(t){var r=this;this.states.counter+=1;var a=s.createElement("div");if(a.setAttribute("id","language-results"+this.states.counter),a.classList.add("language-results"),a.classList.add("list-group"),a.classList.add("mb-2"),a.classList.add("show"),t.forEach((function(t,i){var n=s.createElement("a");n.setAttribute("onclick","Joomla.overrider.selectString("+r.states.counter+i+");"),n.setAttribute("href","#"),n.classList.add("list-group-item"),n.classList.add("list-group-item-action"),n.classList.add("flex-column"),n.classList.add("align-items-start");var o=s.createElement("div");o.setAttribute("id","override_key"+r.states.counter+i),o.setAttribute("title",t.file),o.classList.add("result-key"),o.innerHTML=e.sanitizeHtml(t.constant);var l=s.createElement("div");l.setAttribute("id","override_string"+r.states.counter+i),l.classList.add("result-string"),l.innerHTML=e.sanitizeHtml(t.string),n.appendChild(o),n.appendChild(l),a.appendChild(n)})),!t.length){var i=s.createElement("div");i.innerText=e.Text._("COM_LANGUAGES_VIEW_OVERRIDE_NO_RESULTS"),a.appendChild(i)}this.moreResults&&this.moreResults.parentNode.insertBefore(a,this.moreResults)},r.selectString=function(e){s.getElementById("jform_key").value=s.getElementById("override_key"+e).innerHTML,s.getElementById("jform_override").value=s.getElementById("override_string"+e).innerHTML},t}();s.addEventListener("DOMContentLoaded",(function(){e.overrider=new t}))}(Joomla,document)}();