PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-content
/
wp-google-maps-pro
/
js
/
v8
/** * @namespace WPGMZA * @module MarkerIconPicker * @requires WPGMZA */ jQuery(function($) { WPGMZA.MarkerIconPicker = function(element) { var self = this; if(!element) throw new Error("Element cannot be undefined"); if(!(element instanceof HTMLElement) && !(element instanceof jQuery && element.length == 1)) throw new Error("Invalid element"); this.element = element; var input = $(this.element).find("input.wpgmza-marker-icon-url"); var name = $(input).attr("name") || $(input).attr("data-ajax-name"); if(input.length) { if(!name) throw new Error("Input must have a name for marker library to function"); $(this.element).find("button.wpgmza-marker-library").attr("data-target-name", name); var icon = WPGMZA.MarkerIcon.createInstance(input.val()); // NB: The above seems to be unfinished, or redundant } $(this.element).find("button.wpgmza-upload").on("click", function(event) { self.onUploadImage(event); }); $(this.element).find("button.wpgmza-reset").on("click", function(event) { self.onReset(event); }); } WPGMZA.MarkerIconPicker.prototype.setIcon = function(input) { var icon = WPGMZA.MarkerIcon.createInstance(input); var url = icon.url; var preview = url; if(url != WPGMZA.defaultMarkerIcon) $(this.element).find("input.wpgmza-marker-icon-url").val(url); else $(this.element).find("input.wpgmza-marker-icon-url").val(""); if(url.length == 0) preview = WPGMZA.defaultMarkerIcon; $(this.element).find(".wpgmza-marker-icon-preview").css({ "background-image": "url('" + preview + "')" }); } WPGMZA.MarkerIconPicker.prototype.onUploadImage = function() { var self = this; WPGMZA.openMediaDialog(function(attachment_id, attachment_url) { self.setIcon(attachment_url); $(this.element).find("input.wpgmza-marker-icon-url").val(""); }); } WPGMZA.MarkerIconPicker.prototype.onReset = function() { this.reset(); } WPGMZA.MarkerIconPicker.prototype.reset = function() { this.setIcon(WPGMZA.defaultMarkerIcon); } });
[-] 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]