File "redux-image-select.min.js"

Full Path: /home/elegucvf/public_html/video/wp-content/plugins/atlas-core/framework/redux-core/inc/fields/image_select/redux-image-select.min.js
File size: 2.05 KB
MIME-type: text/plain
Charset: utf-8

!function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.image_select=redux.field_objects.image_select||{},redux.field_objects.image_select.init=function(e){e=a.redux.getSelector(e,"image_select"),a(e).each(function(){var l=a(this),e=l;(e=l.hasClass("redux-field-container")?e:l.parents(".redux-field-container:first")).is(":hidden")||e.hasClass("redux-field-init")&&(e.removeClass("redux-field-init"),l.find(".redux-image-select label img, .redux-image-select label .tiles").on("click",function(e){var t,i,s=a(this).closest("label").attr("for");if(a(this).parents("fieldset:first").find(".redux-image-select-selected").removeClass("redux-image-select-selected").find('input[type="radio"]').prop("checked",!1),a(this).closest("label").find('input[type="radio"]').prop("checked"),a(this).closest("label").hasClass("redux-image-select-preset-"+s))return e.preventDefault(),e=a(this).closest("label").find("input"),t=e.data("presets"),null!=(i=e.data("merge"))&&("string"==typeof i&&(i=i.split("|")),a.each(t,function(e){"object"!=typeof redux.optName.options[e]||!0!==i&&-1===a.inArray(e,i)||(t[e]=a.extend(redux.optName.options[e],t[e]))})),null!=e&&(l.find('label[for="'+s+'"]').addClass("redux-image-select-selected").find('input[type="radio"]').attr("checked",!0),window.onbeforeunload=null,0===(e=a('textarea[name="'+redux.optName.args.opt_name+'[import_code]"')).length?a(this).append('<textarea id="import-code-value" style="display:none;" name="'+redux.optName.args.opt_name+'[import_code]">'+JSON.stringify(t)+"</textarea>"):e.val(JSON.stringify(t)),(0!==a("#publishing-action #publish").length?a("#publish"):a("#redux-import")).trigger("click")),!1;l.find('label[for="'+s+'"]').addClass("redux-image-select-selected").find('input[type="radio"]').prop("checked",!0).trigger("change"),redux_change(a(this).closest("label").find('input[type="radio"]'))}),l.find(".tiles").qtip({content:{text:function(){return'<img src="'+a(this).attr("rel")+'" style="max-width:150px;" alt=" />'}},style:"qtip-tipsy",position:{my:"top center",at:"bottom center"}}))})}}(jQuery);