PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-content
/
wp-google-maps-pro
/
js
/
v8
/** * @namespace WPGMZA * @module AdminDataTable * @requires WPGMZA.DataTable */ jQuery(function($) { WPGMZA.AdminMapDataTable = function(element) { var self = this; WPGMZA.DataTable.call(this, element); $(element).on("mousedown", "button[data-action='edit']", function(event){ switch (event.which) { case 1: var map_id = $(event.target).attr("data-map-id"); window.location.href = window.location.href + "&action=edit&map_id=" + map_id; break; case 2: var map_id = $(event.target).attr("data-map-id"); window.open(window.location.href + "&action=edit&map_id=" + map_id); break; } }); $(element).find(".wpgmza.select_all_maps").on("click", function(event) { self.onSelectAll(event); }); $(element).find(".wpgmza.bulk_delete_maps").on("click", function(event) { self.onBulkDelete(event); }); $(element).on("click", "button[data-action='duplicate']", function(event) { var map_id = $(event.target).attr('data-map-id'); self.dataTable.processing(true); WPGMZA.restAPI.call("/maps/", { method: "POST", data: { id: map_id, action: "duplicate" }, success: function(response, status, xhr) { self.reload(); } }); }); $(element).on("click", "button[data-action='trash']", function(event) { var result = confirm(WPGMZA.localized_strings.map_delete_prompt_text); self.dataTable.processing(true); if (result) { var map_id = $(event.target).attr('data-map-id'); WPGMZA.restAPI.call("/maps/", { method: "DELETE", data: { id: map_id }, success: function(response, status, xhr) { self.reload(); } }) } }); } WPGMZA.extend(WPGMZA.AdminMapDataTable, WPGMZA.DataTable); WPGMZA.AdminMapDataTable.prototype.getDataTableSettings = function() { var self = this; var options = WPGMZA.DataTable.prototype.getDataTableSettings.call(this); options.createdRow = function(row, data, index) { var meta = self.lastResponse.meta[index]; row.wpgmzaMapData = meta; } return options; } WPGMZA.AdminMapDataTable.prototype.onSelectAll = function(event) { $(this.element).find("input[name='mark']").prop("checked", true); } WPGMZA.AdminMapDataTable.prototype.onBulkDelete = function(event) { var self = this; var ids = []; $(this.element).find("input[name='mark']:checked").each(function(index, el) { var row = $(el).closest("tr")[0]; ids.push(row.wpgmzaMapData.id); }); var result = confirm(WPGMZA.localized_strings.map_bulk_delete_prompt_text); if (result) { WPGMZA.restAPI.call("/maps/", { method: "DELETE", data: { ids: ids }, complete: function() { self.reload(); } }); } } $(document).ready(function(event){ $("[data-wpgmza-admin-map-datatable]").each(function(index, el) { WPGMZA.AdminMapDataTable = new WPGMZA.AdminMapDataTable(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]