1/** 2 * @namespace WPGMZA 3 * @module OLThemePanel 4 * @requires WPGMZA 5 */ 6jQuery(function($) { 7 8 WPGMZA.OLThemePanel = function() 9 { 10 var self = this; 11 12 this.element = $("#wpgmza-ol-theme-panel"); 13 this.map = WPGMZA.maps[0]; 14 15 if(!this.element.length) 16 { 17 console.warn("No element to initialise theme panel on"); 18 return; 19 } 20 21 this.element.on("click", "#wpgmza-theme-presets label, .theme-selection-panel label", function(event) { 22 self.onThemePresetClick(event); 23 }); 24 25 WPGMZA.OLThemePanel = this; 26 } 27 28 WPGMZA.OLThemePanel.prototype.onThemePresetClick = function(event){ 29 if(event.currentTarget){ 30 const element = $(event.currentTarget); 31 const filter = element.data('filter'); 32 33 if(filter && $('input[name="wpgmza_ol_tile_filter"]').length){ 34 const input = $('input[name="wpgmza_ol_tile_filter"]').get(0); 35 // $('input[name="wpgmza_ol_tile_filter"]').val(filter).trigger('change'); 36 37 if(input.wpgmzaCSSFilterInput){ 38 input.wpgmzaCSSFilterInput.parseFilters(filter); 39 WPGMZA.notification("Theme preset applied!", false, '.grouping.open[data-group="map-settings-themes-presets"]', 'top-right'); 40 } 41 } 42 } 43 } 44 45});
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.