Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul #20

Open
bseddon opened this issue Jun 11, 2016 · 1 comment
Open

Overhaul #20

bseddon opened this issue Jun 11, 2016 · 1 comment

Comments

@bseddon
Copy link

bseddon commented Jun 11, 2016

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

@bobbysmith007
Copy link
Member

Perhaps just branch this plugin on github to facilitate trading ideas and code?

Some of these are changes I would not mind incorporating, but others seem maybe outside the scope of my original plugin. My goal is to keep complexity to a minimum while still supporting 90% of whats needed here. It would be great to see the code though.

I couldn't figure out a reasonable UX for multiple data tables on a single screen that wasnt confusing. Did you come up with something pretty or do you have users with better ability than I?

Cheers and thanks for the input, glad you found this a useful starting place :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants