%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home1/lightco1/www/media/com_associations/js/
Upload File :
Create Path :
Current File : //home1/lightco1/www/media/com_associations/js/sidebyside.js

jQuery(document).ready(function(t){t("#toolbar-target").hide(),t("#toolbar-copy").hide(),Joomla.submitbutton=function(e){if("association.cancel"===e)Joomla.submitform(e);else if("copy"===e){Joomla.loadingLayer("show");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("undo-association"===e){var n=document.getElementById("reference-association"),o=document.getElementById("target-association"),s=(n.getAttribute("data-id"),n.getAttribute("data-language").replace(/-/,"_")),a=(o.getAttribute("data-id"),o.getAttribute("data-language").replace(/-/,"_"));n=t(n).contents(),o=t(o).contents(),n.find("#jform_associations_"+a+"_id").val(""),n.find("#jform_associations_"+a+"_name").val(""),n.find("#jform_associations_"+a+"_chzn").remove(),n.find("#jform_associations_"+a).val("").change().chosen();var d="";t("#jform_itemlanguage option").each(function(){d=t(this).val().split("|")[0],"undefined"!=typeof d&&(d=d.replace(/-/,"_"),o.find("#jform_associations_"+d+"_id").val(""),o.find("#jform_associations_"+d+"_chzn").remove(),o.find("#jform_associations_"+d).val("").change().chosen())}),o.find("#jform_associations_"+s+"_id").val(""),o.find("#jform_associations_"+s+"_name").val(""),o.find("#jform_associations_"+s+"_chzn").remove(),o.find("#jform_associations_"+s).val("").change().chosen();var r=t("#jform_itemlanguage").val(),c=a.replace(/_/,"-");t('#jform_itemlanguage option[value="'+r+'"]').val(c+":0:add"),t("#jform_itemlanguage").val("").change(),t("#jform_itemlanguage").trigger("liszt:updated"),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},Joomla.loadingLayer("load"),t(document).on("click","#toogle-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&&"undefined"!=typeof a?(e.setAttribute("data-action",a.split(":")[2]),e.setAttribute("data-id",a.split(":")[1]),e.setAttribute("data-language",a.split(":")[0]),Joomla.loadingLayer("show"),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(){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 e=document.getElementById("target-association");e.src=e.getAttribute("data-editurl")+"&task="+e.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 a=t(this).contents();a.find("#jform_language_chzn").remove(),a.find("#jform_language").attr("disabled",!0).chosen(),a.find("#associations").find(".btn").remove();var i="";t("#jform_itemlanguage option").each(function(){i=t(this).val().split(":"),"undefined"!=typeof i[0]&&(langAssociation=i[0].replace(/-/,"_"),""==a.find("#jform_associations_"+langAssociation+"_id").val()&&a.find("#jform_associations_"+langAssociation+"_name").val(document.getElementById("reference-association").getAttribute("data-no-assoc")))}),Joomla.loadingLayer("hide")}),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_chzn").remove(),t(this).contents().find("#jform_language").val(e).change().attr("disabled",!0).chosen(),"0"==i)document.getElementById("select-change-text").innerHTML=document.getElementById("select-change").getAttribute("data-select");else{document.getElementById("select-change-text").innerHTML=document.getElementById("select-change").getAttribute("data-change"),t("#remove-assoc").removeClass("hidden"),t("#toolbar-copy").hide();var n=document.getElementById("target-id").value,o=""==n?i:n+","+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 s=document.getElementById("reference-association"),d=e.replace(/-/,"_"),r=t(this).contents().find("#jform_title").val();t(s).contents().find("#jform_associations_"+d+"_id").val(i),t(s).contents().find("#jform_associations_"+d+"_name").val(r),t(s).contents().find("#jform_associations_"+d+"_chzn").remove(),t(s).contents().find("#jform_associations_"+d).append('<option value="'+i+'">'+r+"</option>"),t(s).contents().find("#jform_associations_"+d).val(i).change().chosen()}var s=document.getElementById("reference-association"),c=s.getAttribute("data-id"),d=s.getAttribute("data-language").replace(/-/,"_"),r=t(s).contents().find("#jform_title").val(),l=t(this).contents();l.find("#jform_associations_"+d+"_id").val(c),l.find("#jform_associations_"+d+"_name").val(r),l.find("#jform_associations_"+d+"_chzn").remove();var m=l.find("#jform_associations_"+d);m.append('<option value="'+c+'">'+r+"</option>"),m.val(c).change().chosen();var f,g;t("#jform_itemlanguage option").each(function(){f=t(this).val().split(":"),"undefined"!=typeof f[1]&&"0"!==f[1]&&(g=f[0].replace(/-/,"_"),l.find("#jform_associations_"+g+"_id").val(f[1]),l.find("#jform_associations_"+g+"_chzn").remove(),m=l.find("#jform_associations_"+g),m.append('<option value="'+f[1]+'"></option>'),m.val(f[1]).change().chosen())}),Joomla.loadingLayer("hide")}})});

Zerion Mini Shell 1.0