NexusLeads Webshell
NexusLeads


Server : LiteSpeed
System : Linux server 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64
User : alsaif ( 1057)
PHP Version : 7.4.33
Disable Function : show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Directory :  /home/alsaif/domains/alsaif.group/public_html/media/plg_system_nrframework/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/alsaif/domains/alsaif.group/public_html/media/plg_system_nrframework/js/chainedfields.js
var NRF_ChainedFields=function(){function e(){this.ajaxURL="?option=com_ajax&format=raw&plugin=nrframework&path=plugins/system/nrframework/fields/&class=JFormFieldNRChainedFields&file=nrchainedfields&task=Include",this.nextSelect=null,this.isJ4=Joomla.Modal,this.initEvents()}var t=e.prototype;return t.initEvents=function(){this.isJ4||jQuery(document).on("change",function(e){this.handleChange(e)}.bind(this)),document.addEventListener("change",function(e){this.handleChange(e)}.bind(this))},t.handleChange=function(e){var t,n,i=e.target.closest(".nr-chained-fields-select");i&&this.getNextSelect(i)&&(t=this,n=e.target.closest(".nr-chained-fields"),this.resetNextSelects(i),i.value)&&(this.setNextSelectIsLoading(i),(i=new FormData).append("select_id",e.target.id),i.append("value",JSON.stringify(this.getValue(n))),i.append("data_source",n.dataset.dataSource),i.append("csv",n.dataset.csv),i.append(Joomla.getOptions("csrf.token"),1),fetch(n.dataset.baseUrl+this.ajaxURL,{method:"post",body:i}).then(function(e){return e.json()}).then(function(e){e.error?alert(e.response):t.populateNextSelect(e.response)}))},t.populateNextSelect=function(e){this.populateDropdown(e,this.nextSelect),this.nextSelect.removeAttribute("disabled"),this.nextSelect.querySelector("option.placeholder").innerHTML=this.nextSelect.querySelector("option.placeholder").dataset.original,window.jQuery&&jQuery().chosen&&jQuery(this.nextSelect).chosen("destroy").chosen()},t.getValue=function(e){var t={};return e.querySelectorAll(".nr-chained-fields-select").forEach(function(e){t[e.name]=e.options[e.selectedIndex].classList.contains("placeholder")?"":e.value}),t},t.populateDropdown=function(e,t){for(var n=0;n<e.length;n++){var i=document.createElement("option");i.value=e[n].value,i.text=e[n].text,t.appendChild(i)}},t.resetNextSelects=function(e){e=this.getNextSelect(e);e&&(e.setAttribute("disabled","disabled"),e.querySelector("option.placeholder").innerHTML=e.querySelector("option.placeholder").dataset.original,e.querySelectorAll("option:not(.placeholder)").forEach(function(e){e.remove()}),window.jQuery&&jQuery().chosen&&jQuery(e).chosen("destroy").chosen(),this.resetNextSelects(e))},t.getNextSelect=function(e){return this.isJ4?!!e.nextElementSibling&&"select"==e.nextElementSibling.nodeName.toLowerCase()&&e.nextElementSibling:!!e.nextElementSibling.nextElementSibling&&"select"==e.nextElementSibling.nextElementSibling.nodeName.toLowerCase()&&e.nextElementSibling.nextElementSibling},t.setNextSelectIsLoading=function(e){var t=this.getNextSelect(e);t&&(this.nextSelect=t,e=e.closest(".nr-chained-fields").dataset.loading,t.querySelector("option").innerHTML=e,window.jQuery)&&jQuery().chosen&&jQuery(t).chosen("destroy").chosen()},e}();document.addEventListener("DOMContentLoaded",function(){new NRF_ChainedFields});


NexusLeads