CoreFiles by mySites.guru
joomla-chosen.min.js1 lines, 2,098 bytes, from Joomla_4.0.0-beta7-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta6
md5
a73778a17523bb0ac6306528478af89b
sha1
18b8cc494fa6e48740ab6e4e7f06cad36117e43d
sha256
6fdb299b1c4a2e5f4f0de32868e96bf8dd15fb8f31750033d81543a4d1d35ac0
!function(t,o,e){t.fn.jchosen=function(o){return e.browser_is_supported()?this.each(function(e){var s,i;i=(s=t(this)).data("chosen"),"destroy"!==o?i instanceof JoomlaChosen||s.data("chosen",new JoomlaChosen(this,o)):i instanceof JoomlaChosen&&i.destroy()}):this},JoomlaChosen=function(e){var s={}.hasOwnProperty;function i(){return _ref=i.__super__.constructor.apply(this,arguments),_ref}return function(t,o){for(var e in o)s.call(o,e)&&(t[e]=o[e]);function i(){this.constructor=t}i.prototype=o.prototype,t.prototype=new i,t.__super__=o.prototype}(i,o),i.prototype.setup=function(){var t;return t=i.__super__.setup.apply(this,arguments),this.allow_custom_value=this.form_field_jq.hasClass("chosen-custom-value")||this.options.allow_custom_value,this.custom_value_prefix=this.form_field_jq.attr("data-custom_value_prefix")||this.custom_value_prefix,t},i.prototype.set_default_text=function(){return this.custom_group_text=this.form_field.getAttribute("data-custom_group_text")||this.options.custom_group_text||"Custom Value",i.__super__.set_default_text.apply(this,arguments)},i.prototype.result_select=function(o){var e,s,r;return this.result_highlight||this.is_multiple||!this.allow_custom_value?i.__super__.result_select.apply(this,arguments):(r=this.search_field.val(),e=this.add_unique_custom_group(),s=t('<option value="'+this.custom_value_prefix+r+'">'+r+"</option>"),e.append(s),this.form_field_jq.append(e),this.form_field.options[this.form_field.options.length-1].selected=!0,o.metaKey||this.results_hide(),this.results_build())},i.prototype.find_custom_group=function(){var o,e,s,i,r;for(s=0,i=(r=t("optgroup",this.form_field)).length;s<i;s++)(e=r[s]).getAttribute("label")===this.custom_group_text&&(o=e);return o},i.prototype.add_unique_custom_group=function(){var o;return(o=this.find_custom_group())||(o=t('<optgroup label="'+this.custom_group_text+'"></optgroup>')),t(o)},i.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field_jq.css("width")||this.form_field.offsetWidth+"px"},i}()}(jQuery,document.Chosen,document.AbstractChosen);

The same content is in 8 releases, Joomla 4.0.0-alpha12 to 4.0.0-beta7. See them all, or every version of this file.