CoreFiles by mySites.guru
associations-edit.js1 lines, 2,119 bytes, from Joomla_3.9.21-Stable-Full_Package.zip
Raw History Compare with 3.9.20
md5
d0ff24839d556b008b13b87c6a213e23
sha1
10d815c7fd5bcf577a4950a5f34af7482453dc1d
sha256
d2f002da8a4df72e2cad35f0488fe1f81d0b565b1aa055badc42ef82ff2476c3
window.hideAssociation=function(o,a){jQuery("#associations .control-group").each(function(){jQuery(this).find(".control-label label").attr("for").replace(new RegExp("_id$"),"")==o+"_associations_"+a.replace("-","_")&&jQuery(this).hide()})},window.showAssociationMessage=function(){jQuery("#associations .control-group").hide(),jQuery("#associations").prepend('<div id="associations-notice" class="alert alert-info">'+Joomla.JText._("JGLOBAL_ASSOC_NOT_POSSIBLE")+"</div>")},Joomla.injectAssociations=function(o,a){var s;if(o.success){if(0!==o.data.length)for(var e in o.data)s=a+e.replace("-","_"),window[s](o.data[e].id,o.data[e].title,o.data[e].catid,null,null,e);o.message&&Joomla.renderMessages({notice:[o.message]})}else Joomla.renderMessages({warning:[Joomla.JText._("JGLOBAL_ASSOCIATIONS_PROPAGATE_FAILED")]})},Joomla.propagateAssociation=function(o,a){var s=jQuery("#"+o+"_id").val(),e=jQuery("#jform_language").find(":selected").val(),i=Joomla.getOptions("csrf.token",""),n=jQuery("form[name='adminForm']").attr("action");return n+="&"+i+"=1",jQuery.ajax({url:n,data:{task:"ajax.fetchAssociations",format:"json",assocId:s,excludeLang:e},success:function(o,s,e){Joomla.injectAssociations(o,a)},error:function(){Joomla.renderMessages({warning:[Joomla.JText._("JGLOBAL_ASSOCIATIONS_PROPAGATE_FAILED")]})}}),!1},window,document,Joomla,jQuery(document).ready(function(o){var a=Joomla.getOptions("system.associations.edit"),s=a.formControl||"jform";1==a.hidden?window.showAssociationMessage():window.hideAssociation(s,o("#"+s+"_language").val()),o("#"+s+"_language").on("change",function(a){Joomla.removeMessages(),o("#associations-notice").remove();var e=!1;o("#associations .control-group").each(function(){var a=o(this).find(".control-label label").attr("for").replace("_id","").replace("jform_associations_","");o(this).show(),e||""===o("#"+s+"_associations_"+a+"_id").val()||(e=!0),o("#"+s+"_associations_"+a+"_clear").click()}),e&&Joomla.renderMessages({warning:[Joomla.JText._("JGLOBAL_ASSOCIATIONS_RESET_WARNING")]});var i=o(this).val();"*"==i?window.showAssociationMessage():window.hideAssociation(s,i)})});

The same content is in 75 releases, Joomla 3.9.5-rc to 3.10.12. See them all, or every version of this file.