File "redux-button-set.min.js"

Full Path: /home/siazco/grocery.siazco.se/wp-content/plugins/kapee-extensions/inc/admin/redux-core/inc/fields/button_set/redux-button-set.min.js
File size: 1.05 KB
MIME-type: text/plain
Charset: utf-8

!function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.button_set=redux.field_objects.button_set||{},redux.field_objects.button_set.init=function(t){t=a.redux.getSelector(t,"button_set"),a(t).each(function(){var t=a(this),e=t;(e=t.hasClass("redux-field-container")?e:t.parents(".redux-field-container:first")).is(":hidden")||e.hasClass("redux-field-init")&&(e.removeClass("redux-field-init"),t.find(".buttonset").each(function(){a(this).is(":checkbox")&&a(this).find(".buttonset-item").button(),a(this).controlgroup()}),t.find(".buttonset-item.multi").on("click",function(){var t="",e="",i=a(this).attr("id"),n=a(this).parent().find(".buttonset-empty"),s=n.attr("data-name"),d=!1;a(this).parent().find(".buttonset-item").each(function(){a(this).is(":checked")&&(d=!0)}),d?n.attr("name",""):n.attr("name",s),a(this).is(":checked")&&(t=a(this).attr("data-val"),e=s+"[]"),a(this).parent().find("#"+i+"-hidden.buttonset-check").val(t),a(this).parent().find("#"+i+"-hidden.buttonset-check").attr("name",e),redux_change(a(this))}))})}}(jQuery);