Current File : /home/pacjaorg/www/km/media/com_associations/js/sidebyside.min.js
/**
 * @copyright   (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */jQuery(document).ready(function(t){t("#toolbar-target").hide(),t("#toolbar-copy").hide(),Joomla.submitbutton=function(e){if(e==="association.cancel")Joomla.submitform(e);else if(e==="copy"){document.body.appendChild(document.createElement("joomla-core-loader"));var a=document.getElementById("target-association").getAttribute("data-language"),i=window.frames["reference-association"].document.getElementById("jform_language");i.removeAttribute("disabled"),i.value=a,window.frames["reference-association"].Joomla.submitbutton(document.getElementById("adminForm").getAttribute("data-associatedview")+".save2copy")}else if(e==="undo-association"){var s=document.getElementById("reference-association"),o=document.getElementById("target-association"),m=s.getAttribute("data-id"),d=s.getAttribute("data-language").replace(/-/,"_"),f=o.getAttribute("data-id"),a=o.getAttribute("data-language").replace(/-/,"_");s=t(s).contents(),o=t(o).contents(),s.find("#jform_associations_"+a+"_id").val(""),s.find("#jform_associations_"+a+"_name").val(""),s.find("#jform_associations_"+a).val("");var n="";t("#jform_itemlanguage option").each(function(){n=t(this).val().split("|")[0],typeof n<"u"&&(n=n.replace(/-/,"_"),o.find("#jform_associations_"+n+"_id").val(""),o.find("#jform_associations_"+n).val(""))}),o.find("#jform_associations_"+d+"_id").val(""),o.find("#jform_associations_"+d+"_name").val(""),o.find("#jform_associations_"+d).val("");var v=t("#jform_itemlanguage"),l=v.val(),r=a.replace(/_/,"-");t('#jform_itemlanguage option[value="'+l+'"]').val(r+":0:add"),v.val(""),v[0].dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!0})),Joomla.submitbutton("reference")}else t("#"+e+"-association").contents().find("#jform_language").attr("disabled",!1),window.frames[e+"-association"].Joomla.submitbutton(document.getElementById("adminForm").getAttribute("data-associatedview")+".apply");return!1},t(document).on("click","#toggle-left-panel",function(){var e=this.getAttribute("data-hide-reference"),a=this.getAttribute("data-show-reference");t(this).text()===e?t(this).text(a):t(this).text(e),t("#left-panel").toggle(),t("#right-panel").toggleClass("full-width")}),t(document).on("change","#jform_itemlanguage",function(){var e=document.getElementById("target-association"),a=t(this).val();a!==""&&typeof a<"u"?(e.setAttribute("data-action",a.split(":")[2]),e.setAttribute("data-id",a.split(":")[1]),e.setAttribute("data-language",a.split(":")[0]),document.body.appendChild(document.createElement("joomla-core-loader")),e.src=e.getAttribute("data-editurl")+"&task="+e.getAttribute("data-item")+"."+e.getAttribute("data-action")+"&id="+e.getAttribute("data-id")):(t("#toolbar-target").hide(),t("#toolbar-copy").hide(),t("#select-change").addClass("hidden"),t("#remove-assoc").addClass("hidden"),e.setAttribute("data-action",""),e.setAttribute("data-id","0"),e.setAttribute("data-language",""),e.src="")}),t("#reference-association").on("load",function(){var e=Joomla.getOptions("targetSrc",!1);if(e){e=e.split("&amp;").join("&"),document.getElementById("target-association").setAttribute("src",e),Joomla.loadOptions({targetSrc:!1});return}if(document.getElementById("target-association").setAttribute("src",document.getElementById("target-association").getAttribute("src")),t(this).contents().find("#jform_id").val()!==this.getAttribute("data-id")){var a=document.getElementById("target-association");a.src=a.getAttribute("data-editurl")+"&task="+a.getAttribute("data-item")+".edit&id="+t(this).contents().find("#jform_id").val(),this.src=this.getAttribute("data-editurl")+"&task="+this.getAttribute("data-item")+".edit&id="+this.getAttribute("data-id")}var i=t(this).contents();i.find("#jform_language").attr("disabled",""),i.find("#associations").find(".btn").remove();var s="";t("#jform_itemlanguage option").each(function(){if(s=t(this).val().split(":"),typeof s[0]<"u"){var m=s[0].replace(/-/,"_");i.find("#jform_associations_"+m+"_id").val()==""&&i.find("#jform_associations_"+m+"_name").val(document.getElementById("reference-association").getAttribute("data-no-assoc"))}});var o=document.querySelector("joomla-core-loader");o&&o.parentNode.removeChild(o)}),t("#target-association").on("load",function(){if(this.getAttribute("src")!=""){t("#toolbar-target").show(),t("#toolbar-copy").show(),t("#select-change").removeClass("hidden");var e=this.getAttribute("data-language"),a=this.getAttribute("data-id"),i=t(this).contents().find("#jform_id").val()||"0";if(t(this).contents().find('a[href="#associations"]').parent().find(".btn").remove(),t(this).contents().find("#associations").find(".btn").remove(),t(this).contents().find("#associations").hasClass("active")&&(t(this).contents().find('a[href="#associations"]').parent().removeClass("active"),t(this).contents().find("#associations").removeClass("active"),t(this).contents().find(".nav-tabs").find("li").first().addClass("active"),t(this).contents().find(".tab-content").find(".tab-pane").first().addClass("active")),t(this).contents().find("#jform_language").val(e).attr("disabled",""),i=="0")document.getElementById("select-change-text").innerHTML=Joomla.sanitizeHtml(document.getElementById("select-change").getAttribute("data-select"));else{document.getElementById("select-change-text").innerHTML=Joomla.sanitizeHtml(document.getElementById("select-change").getAttribute("data-change")),t("#remove-assoc").removeClass("hidden"),t("#toolbar-copy").hide();var s=document.getElementById("target-id").value,o=s==""?i:s+","+i;document.getElementById("target-id").value=o,i!=a&&(t('#jform_itemlanguage option[value^="'+e+":"+a+':add"]').val(e+":"+i+":edit"),this.setAttribute("data-id",i),this.setAttribute("data-action","edit"));var d=document.getElementById("reference-association"),n=e.replace(/-/,"_"),m=d.getAttribute("data-title"),l=t(this).contents().find("#jform_"+m).val();t(d).contents().find("#jform_associations_"+n+"_id").val(i),t(d).contents().find("#jform_associations_"+n+"_name").val(l),t(d).contents().find("#jform_associations_"+n).append('<option value="'+i+'">'+l+"</option>"),t(d).contents().find("#jform_associations_"+n).val(i)}var d=document.getElementById("reference-association"),f=d.getAttribute("data-id"),n=d.getAttribute("data-language").replace(/-/,"_"),r=document.getElementById("target-association"),v=r.getAttribute("data-title"),l=d.getAttribute("data-title-value"),r=t(this).contents();r.find("#jform_associations_"+n+"_id").val(f),r.find("#jform_associations_"+n+"_name").val(l);var u=r.find("#jform_associations_"+n);u.append('<option value="'+f+'">'+l+"</option>"),u.val(f);var c,g;t("#jform_itemlanguage option").each(function(){c=t(this).val().split(":"),typeof c[1]<"u"&&c[1]!=="0"&&(g=c[0].replace(/-/,"_"),r.find("#jform_associations_"+g+"_id").val(c[1]),u=r.find("#jform_associations_"+g),u.append('<option value="'+c[1]+'"></option>'),u.val(c[1]))});var b=document.querySelector("joomla-core-loader");b&&b.parentNode.removeChild(b)}})});
Site is undergoing maintenance

PACJA Events

Maintenance mode is on

Site will be available soon. Thank you for your patience!