djk2 / django-tables2-column-shifter

Simple extension for django-tables2 can dynamically show or hide columns. Using JQuery, Bootstrap 3, Bootstrap 4, Bootstrap 5 and Django >=1.9
BSD 3-Clause "New" or "Revised" License
21 stars 8 forks source link

Add js init api (fixes #27) #30

Closed spapas closed 1 year ago

spapas commented 1 year ago

This adds an API function called $.django_tables2_column_shifter_init that can be used to initialize the column shifter tables any time and specifically when a framework like unpoly or htmx is used. This function is also called on the page ready event to keep the existing behavior.

Notice that I've compressed the js source using uglify-js with the following command: uglifyjs --compress --mangle -- django_tables2_column_shifter.js > django_tables2_column_shifter.min.js; if you are using a different util then I recommend re-compressing it. I've also bubped the verwsion and added the changelog so this should beis ready for releasing to pypi.

The above should resolve #27

spapas commented 1 year ago

Hey @djk2 it seems that github actions no longer support python 3.6! Also tox.ini has tests for some very old and unsupported stuff. I'll try to remove non-needed things and provide a new PR that fixes this.

djk2 commented 1 year ago

Hi. Today I released new version 2.1.0 where I added support for django 4.0 and 4.2 + python 3.10 New version was already merged to master Can you merge (rebase) master to your PR?

I prefer to keep support for old (or very old) versions of python / django as long it is possible. Some companies are using my lib in very legacy code.

spapas commented 1 year ago

Excellent, I'll rebase with master thank you!

spapas commented 1 year ago

Everything seems ok !