PageSourceSearch

https://daintl.org/wp-content/plugins/divi-upload-icons-awb/assets/js/diui-awb-public.js?ver=1.2.10

js daintl.org collected 2026-10-01 12:22:03 UTC 6,999 bytes, 228 lines download raw bytes

1(function( $ ) {
2
3  var moduleList = [
4    '.et_overlay',
5    '.et_pb_button.et_pb_custom_button_icon',
6    '.single_add_to_cart_button',
7    '.et_pb_more_button',
8    '.et_pb_extra_overlay',
9    '.et-pb-icon',
10    '.dsm_icon_list_icon',
11    '.et_pb_shop',
12    '.dipl_breadcrumb li[data-icon]',
13    '.et_pb_dmb_breadcrumbs li[data-icon]',
14    '.et_pb_dmb_breadcrumbs a[data-icon]',
15    '.dwd-slider-fullscreen button.slick-arrow',
16    '.swiper-arrow-button',
17  ],
18
19  iconListToggles = [
20		'.et-core-control-toggle',
21		'.et-fb-form__toggle[data-name="button"]',
22		'.et-fb-form__toggle[data-name="button_one"]',
23		'.et-fb-form__toggle[data-name="button_two"]',
24		'.et-fb-form__toggle[data-name="image"]',
25    '.et-fb-form__toggle[data-name="overlay"]',
26    '.et-fb-form__toggle[data-name="image_settings"]', // Divi Carousel by DiviGear
27    '.et-fb-form__toggle[data-name="separator_settings"]' // DP Breadcrumbs
28  ],
29  
30  clickTriggers = [
31	  '.dsm-popup-trigger' // Divi Supreme Pro Popups
32  ],
33  
34  iconFilters =
35  '<div class="icon_filter_diui_awb icon_filter_diui_awb--closed">' +
36  '<span class="icon_filter_diui_awb__btn icon_filter_diui_awb--visible">Filter Icons</span>' +
37  '<div class="icon_filter_diui_awb__controls icon_filter_diui_awb--hidden">' +
38  '<span class="icon_filter_diui_awb__control_option icon_filter_diui_awb__control_option--inactive icon_filter_diui_awb__control_action icon_filter_diui_awb__all">All</span>' +
39  '<span class="icon_filter_diui_awb__control_option icon_filter_diui_awb__control_option--inactive icon_filter_diui_awb__control_action icon_filter_diui_awb__close">Close</span>' +
40  '</div>' +
41  '</div>',
42  
43  targetClasses        = moduleList.join(),
44  iconFontList         = '.et-fb-font-icon-list',
45  builderFrameSelector = '#et-fb-app-frame',
46  iconListToggles      = iconListToggles.join();
47  clickTriggers        = clickTriggers.join();
48
49  if( et_fb_check() ) {
50
51    $( window ).on('et_fb_init_app_after', function(e){
52      $( targetClasses ).addClass('hide_icon');
53    });
54
55    $( window ).on('et_fb_root_did_mount', function(e){
56      process_icons_diui_awb();
57    });
58
59    $( window ).on('pageshow et_fb_section_content_change et_fb_root_did_mount et_fb_init_app_after', function(e){
60      $( targetClasses ).addClass('hide_icon');
61      setTimeout(function(){
62        process_icons_diui_awb();
63      }, 50);
64    });
65
66  } else {
67    setTimeout(function(){
68      $( targetClasses ).addClass('hide_icon');
69      process_icons_diui_awb();
70    }, 100);
71  }
72
73  // Other click triggers.
74  $(document).on('click', clickTriggers,function(){
75    $( targetClasses ).addClass('hide_icon');
76     setTimeout(function(){
77       process_icons_diui_awb();
78     }, 50);
79 });
80
81  $(function(){
82    $( targetClasses ).addClass('hide_icon');
83    process_icons_diui_awb();  
84  });
85
86  $(document).on('click', iconListToggles, function(e) {	
87		setTimeout(function(){
88      process_fb_icon_list_diui_awb();
89      add_filters_diui_awb();
90		}, 100);
91	});
92  
93  function et_fb_check() {
94    if( 
95      $( '#et-fb-app' ) || $( '#et-theme-builder' )
96    ) {
97        return true;
98    }
99    return false;
100  }
101  
102  function process_icons_diui_awb() {
103
104    var module,
105    targetElement,
106    iconData,
107    moduleIcon;
108
109    moduleIcon = $( targetClasses );
110
111    for( i = 0; i < moduleIcon.length; i++ ) {
112      
113      module = moduleIcon[i];
114      
115      targetElement = $( module );
116      
117      // If the module isn't found, skip this iteration.
118      if( ! targetElement.length ) {
119        continue;
120      }
121      
122      if ( undefined !== targetElement.data('icon') ) {
123        iconData = targetElement.attr( 'data-icon');
124        iconData = iconData.split("~|");
125
126        if( iconData.length >= 3 ) {
127          targetElement.attr('data-icon', iconData[3]);
128        }
129      } else {
130
131        // Shop module icon is empty if default icon is left.
132				if( targetElement.hasClass('et_pb_shop') ) {continue;}
133  
134        iconData = targetElement.html();
135        iconData = iconData.split("~|");
136        
137        if( iconData.length >= 3 ) {
138          targetElement.html( iconData[3] );
139        }
140      }
141  
142      if( iconData[1] ) {
143  
144        targetElement.removeClass(function(index,classes){
145          var matches = classes.match(/(\bdiui_awb_icon--\S+)/g);
146          return (matches) ? matches.join(' ') : '';
147        });
148  
149        targetElement.attr('data-family', iconData[1]);
150
151        targetElement.addClass('diui_awb_icon--' + iconData[1]);
152      }
153  
154      if( targetElement.is('[data-family]') ) {
155        var this_fam = targetElement.attr('data-family');
156        if( ! targetElement.hasClass('diui_awb_icon--' + this_fam ) ) {
157          targetElement.addClass('diui_awb_icon--' + this_fam);
158        }
159      }
160    }
161
162    $( targetClasses ).removeClass('hide_icon');
163  }
164  
165  function process_fb_icon_list_diui_awb() {
166
167    var iconListUL = $( iconFontList ),
168    iconListChildren = iconListUL.children(),
169    iconData,
170    iconSetName,
171    iconSetList = [];
172
173    for( var i = 0; i < iconListChildren.length; i++ ) {
174      var iconItem = iconListChildren[i];
175  
176      if( $(iconItem).not('.diui_awb_icon') || $(iconItem).hasClass('active') ) {
177  
178        iconData = $(iconItem).data('icon') + '';
179        iconData = iconData.split("~|");
180  
181        if( iconData.length > 1 ) {
182  
183          iconSetName = iconData[1];
184  
185          $(iconItem).attr({
186            "data-icon"   : iconData[3],
187            "data-family" : iconData[1],
188            "data-name"   : iconData[2],
189            "title"       : iconData[2]
190          });
191  
192          $(iconItem).addClass( 'diui_awb_icon diui_awb_icon--' + iconData[1] );
193        } else {
194          iconSetName = 'elegant-themes';
195          $(iconItem).attr( "data-family", iconSetName );
196        }
197      }
198      
199      var iconSetFound = $.inArray( iconSetName, iconSetList );
200      if (iconSetFound < 0) {
201        iconSetList.push( iconSetName );
202      }
203    }
204  
205    // Add available icons to ul element for the filter to use.
206    var iconSetListString = iconSetList.join(',');
207    $( iconListUL ).attr( "data-icon-sets", iconSetListString );
208  }
209  
210  function add_filters_diui_awb(){
211    if( ! $('.et-fb-option--select-icon') ) {return;}
212  
213    var etFBIconContainer = '.et-fb-form__toggle-opened .et-fb-option--select-icon .et-fb-option-container';
214  
215    if ( ! $('.icon_filter_diui_awb').parents( etFBIconContainer ).length == 1 ) {
216      $( etFBIconContainer ).append( iconFilters );
217  
218      var availableIconSets = $(iconFontList).attr('data-icon-sets');
219
220      if( typeof availableIconSets !== "undefined" && availableIconSets.length ) {
221        availableIconSets = availableIconSets.split(',');
222        $.each( availableIconSets, function(){
223          $('.icon_filter_diui_awb__controls').prepend('<span class="icon_filter_diui_awb__control_option icon_filter_diui_awb__control_option--inactive icon_filter_diui_awb__control_family" data-value="' + this + '">' + this + '</span>');
224        });
225      }
226    }
227  }
228}
228)( jQuery );

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.