Skip to content

Overhaul #20

@bseddon

Description

@bseddon

Hi

Thanks for making the plugin available. It was a great way to get started using SlickGrid in WordPress. You have a note in the onload function that notes the implementation is a singleton so it doesn't support multiple tables. For this reason and because I have other additional requirements I've made a lot of modifications I'd be happy to share if you are interested. Here are some of the changes:

  1. Changed the JavaScript implementation so the DBTableEditor can be an object. This way multiple tables can exist in the same page.
  2. Added a collection of editors and formatters. Probably the most useful is the dropdown. The DBTableEditor class in PHP has been updated so the table author is able to specify the valid drop down members.
  3. The filterrow function has been augmented so a user is able to enter a value of 'true' or 'false' or 'yes' or 'no' or '1' or '0'. It's also been augmented so numeric column filters can include operators such as >, >=, <, <=
  4. The HTML generation has been changed so the HTML generated for each table can be different driven by table specific filters.
  5. I'm not a fan of the 'button' approach to deleting rows so added the ability to use the checkbox column plugin
  6. For this an other reasons I want to be able to handle delete and save operations in other JavaScript code but some of the existing implementation does not completely support extension of the editing experience so I've added a 'trigger' function so the table editor class is able to signal events such as 'onAfterLoad' or 'onPendingSavesChange'.
  7. This was also necessary because when data is loaded in to the table asynchronously the initalization of the table editor code vs the extension code was not consistent.

Right now it's not a direct replacement. Because I was making extensive changes, the names are not always the same so there is no clash with your current implementation. Also, I'm interested in using the plugin code but not as a plugin. For this reason the 'plugin' file is now a class so it can be used as a plugin or instantiated separately from, say, functions.php. Finally, I'm using the table editor with non-table based data, Though I've not explicitly set out to break reading and updating SQL tables, I've not been testing it either.

Bill Seddon

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions