PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-content
/
wp-google-maps-pro
/
js
/
v8
/** * @namespace WPGMZA * @module MarkerLibraryDialog * @requires WPGMZA */ jQuery(function($) { var searchTimeoutID, lazyLoaded, currentCallback; if(!window.WPGMZA) window.WPGMZA = {}; WPGMZA.MarkerLibraryDialog = function(element) { var self = this; this.element = element; $(element).remodal(); window.addEventListener("message", function(event) { if(event.data.action != "download_marker") return; $.ajax({ url: ajaxurl, type: "POST", data: { action: "wpgmza_upload_base64_image", security: WPGMZA.legacyajaxnonce, data: event.data.data.replace(/^data:.+?base64,/, ''), mimeType: "image/png" }, success: function(data, status, xhr) { var url = data.url; currentCallback(url); $(self.element).remodal().close(); } }); }, false); } WPGMZA.MarkerLibraryDialog.prototype.open = function(callback) { currentCallback = callback; $(this.element).remodal().open(); $("iframe#mappity").attr("src", "https://www.mappity.org?wpgmza-embed=1"); } WPGMZA.MarkerLibraryDialog.prototype.onSearch = function() { // Escape special regex characters and build regex var string = this.searchInput.val().replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&'); var regexp = new RegExp(string, "i"); $(this.element).find("img").each(function(index, img) { var li = $(img).closest("li"); var filename = $(img).attr("title").replace(/\.png$/, ""); if(string.length && !filename.match(regexp)) $(li).addClass("wpgmza-marker-library-no-result"); else $(li).removeClass("wpgmza-marker-library-no-result"); }); } WPGMZA.MarkerLibraryDialog.prototype.onIconSelected = function(event) { currentCallback(event.target.src); $(this.element).remodal().close(); } $(document).ready(function(event) { var el = $(".wpgmza-marker-library-dialog"); if(!el.length) return; $(el).css('display',''); WPGMZA.markerLibraryDialog = new WPGMZA.MarkerLibraryDialog(el); function bindButtonClickHandler(button) { // NB: This can be simplified once all areas use the new marker icon picker var target = $(button).closest(".wpgmza-marker-icon-picker").find(".wpgmza-marker-icon-url"); var preview = $(button).closest(".wpgmza-marker-icon-picker").find("img, .wpgmza-marker-icon-preview"); $(button).on("click", function() { WPGMZA.markerLibraryDialog.open(function(src) { target.val(src); target.change(); if(preview.prop("tagName").match(/img/)) preview.attr("src", src); else preview.css({"background-image": "url(" + src + ")"}); if(!$(button).hasClass('wpgmza-marker-directions-library')) $("#wpgmza_cmm>img").attr("src", src); }); }); } $("input.wpgmza-marker-library, button.wpgmza-marker-library").each(function(index, el) { bindButtonClickHandler(el); }); }); });
[-] pro-scripts.json
[edit]
[-] pro-map-edit-page.js
[edit]
[+]
3rd-party-integration
[-] directions-renderer.js
[edit]
[-] modern-marker-listing-marker-view.js
[edit]
[-] wp-google-maps-pro.min.js
[edit]
[-] pro-drawing-manager.js
[edit]
[-] use-my-location-button.js
[edit]
[-] category-tree-node.js
[edit]
[-] wp-google-maps-pro.min.js.map
[edit]
[-] queue.js
[edit]
[-] pro-polygon.js
[edit]
[-] pro-marker-filter.js
[edit]
[-] modern-directions-box.js
[edit]
[-] category-picker.js
[edit]
[-] marker-gallery.js
[edit]
[-] admin-map-datatable.js
[edit]
[-] wp-google-maps-pro.combined.js
[edit]
[-] categories-page.js
[edit]
[-] category-tree.js
[edit]
[+]
open-layers
[-] marker-gallery-input.js
[edit]
[-] custom-field-filter-widget.js
[edit]
[+]
google-maps
[-] custom-field-filter-controller.js
[edit]
[-] pro-map-list-page.js
[edit]
[-] modern-marker-listing.js
[edit]
[-] pro-store-locator.js
[edit]
[-] pro-map.js
[edit]
[-] pro-latlng.js
[edit]
[-] pro-info-window.js
[edit]
[-] modern-directions-result-box.js
[edit]
[-] theme-editor.js
[edit]
[-] pro-address-input.js
[edit]
[-] directions-box.js
[edit]
[-] marker-icon.js
[edit]
[-] heatmap.js
[edit]
[+]
marker-listings
[-] directions-service.js
[edit]
[+]
..
[+]
map-edit-page
[-] marker-icon-picker.js
[edit]
[-] content-editor-map-button.js
[edit]
[-] pro-marker.js
[edit]
[-] advanced-page.js
[edit]
[-] marker-library-dialog.js
[edit]
[-] legacy-json-converter.js
[edit]