Custom button for marker listing advanced datatable

New home Forums Pro Add-on Troubleshooting Custom button for marker listing advanced datatable

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #75749
    Beege
    Participant

    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 default Mark 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 the AdvancedTableMarkerListing class in javascript to be able to add two new buttons similar to how AdminMarkerDataTable 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 1 year, 7 months ago by Beege.
    • This topic was modified 1 year, 7 months ago by Beege.
    • This topic was modified 1 year, 7 months ago by Beege.
    • This topic was modified 1 year, 7 months ago by Matthew.
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.