-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathInputfieldFontIconPicker.min.js
1 lines (1 loc) · 1.49 KB
/
InputfieldFontIconPicker.min.js
1
function AvbFontIconPickerInit(){var e=$(".AvbIconPicker"),t="AvbIconPickerLoaded";e.each(function(){var e=$(this);if(!e.hasClass(t)){var n=e.attr("use-attribute"),i=e.attr("attribute-name"),r={theme:e.attr("theme"),emptyIcon:e.attr("empty-icon"),emptyIconValue:e.attr("empty-icon-value"),iconsPerPage:e.attr("icons-per-page"),hasSearch:e.attr("has-search"),convertToHex:e.attr("convert-to-hex"),allCategoryText:e.attr("all-category-text"),unCategorizedText:e.attr("un-categorized-text")};n&&"false"!==n&&i&&(r.iconGenerator=function(e){return"<span "+i+'="'+e+'"></span>'}),e.fontIconPicker(r),e.parent().children(".icons-selector").css("position",""),e.parents(".InputfieldContent").length&&e.parents(".InputfieldContent").css("z-index",2),e.addClass(t)}})}var Altivebir=Altivebir||{};Altivebir.ScriptLoader=Altivebir.ScriptLoader||{},Altivebir.ScriptLoader={Items:{},Add:function(e,t){"undefined"!==e&&void 0!==e&&"undefined"!==t&&void 0!==t&&(this.Items[e]=t)},Remove:function(e){"undefined"!==e&&void 0!==e&&"undefined"!==this.Items[e]&&void 0!==this.Items[e]&&delete this.Items[e]},Render:function(){if(this.Items.length)for(var e in this.Items){var t=document.createElement("script");t.type="text/javascript",t.src=this.Items[e],$("head").append(t)}}},$(document).ready(function(){var e=$("#content");AvbFontIconPickerInit(),$(document).on("reloaded",".InputfieldRepeater",AvbFontIconPickerInit).on("opened",".InputfieldRepeaterItem",AvbFontIconPickerInit),e.length&&e.css("z-index",2),Altivebir.ScriptLoader.Render()});