DataTables / FixedHeader

Fix the header, footer, left or right columns of a table in place, to always show them when scrolling
http://www.datatables.net/
Other
75 stars 83 forks source link

Adds fnDestroy method #43

Closed jasonout closed 9 years ago

DataTables commented 9 years ago

Thanks for this! Allowing the FixedHeader to be destroyed looks like a good move.

There are a few things I would like to be changed before I can pull these changes in though:

Hope you don't mind the feedback!

The other thing is, are you happy for your changes to be released under the current MIT license?

jasonout commented 9 years ago

Don't mind the feedback at all, and agree to the MIT license for my changes.

I've removed the fixed-header-attached classes, as well as the min-width assignments. They're unrelated to the fnDestroy changes.

I'll submit those changes as separate pull requests with more information.

All event handlers are now registered with a namespace unique to each FixedHeader instance and removed in the destructor.

DataTables commented 9 years ago

Great thanks. There are own or two other little changes I would like, such as using the DataTable destroy event, and code commenting the functions for consistency, but I'll make those changes after the merge.

jasonout commented 9 years ago

Ah, sorry - I looked at the other plugins and noticed they were using the aoDestroyCallback idiom so copied that. There's a bit of variation per plugin so made a guess.

Thanks.

DataTables commented 9 years ago

Sorry - I meant to reply back about that point and clean forgot. After I made that change I think went to look at one of the other plug-ins and realised where you had got the code from! Yup, that was the old style of doing it and I've not got around to updating some of the other plug-ins yet. Hopefully will soon and they will all be singing the same tune....!