New home › Forums › Pro Add-on › Troubleshooting › Custom button for marker listing advanced datatable
Tagged: advancedtable, customize, javsacript, markerlisting, php
- This topic has 0 replies, 1 voice, and was last updated 9 months, 1 week ago by Beege.
-
AuthorPosts
-
December 18, 2022 at 5:06 am #75749BeegeParticipant
Hello! Many thanks for your awesome add-on, I appreciate the work put it into it for making the add-on so flexible!
I’ve been able to create my own PHP-class that extends the default
AdvancedTable
to append some custom columns and one of the custom columns is to the defaultMark
seen from the admin-view. I want to the user to be able in on the normal page view be able to select a row in the advanced table and export the selected ones. So I am wondering how can I extend theAdvancedTableMarkerListing
class in javascript to be able to add two new buttons similar to howAdminMarkerDataTable
does it?This is my code so far which obviously does not work:
[code]jQuery(function ($) {
// disable the default
WPGMZA.MarkerListing.prototype.onItemClick = function (event) {};// how can I extend AdvancedTableMarkerListing to get the datatable prototype to attach event??
$(element).on(“click”, “.wpgmza.select_all_markers”, function (event) {
// function to select all markers goes her
self.onSelectAll(event);
});
// how can I extend AdvancedTableMarkerListing to get the datatable prototype to attach event??
$(element).on(“click”, “.wpgmza.export_markers”, function (event) {
// function to export all selected markers goes here
self.onExportMarkers(event);
});});[/code]
- This topic was modified 9 months, 1 week ago by Beege.
- This topic was modified 9 months, 1 week ago by Beege.
- This topic was modified 9 months, 1 week ago by Beege.
- This topic was modified 9 months ago by Matthew.
-
AuthorPosts
- You must be logged in to reply to this topic.