pinittome / pinitto.me

Main repo for pinitto.me open source corkboard
https://pinitto.me
Apache License 2.0
64 stars 14 forks source link

Fix : Card colors were not changing #154

Closed SimonTellier closed 5 years ago

SimonTellier commented 5 years ago

Color changes of the cards didn't show from the client side without refreshing the page.

It probably is because of a JQuery update. The behavior of the JQuery method removeClass() when there is no parameters is different from before.

lloydwatkin commented 5 years ago

Thanks for the pull request.

Rather than duplicate the card colour list, we should ideally get the current CSS classes for the card and remove any which match card-* instead.

lloydwatkin commented 5 years ago

Or actually we can just remove all the CSS classes as it seems we add them all back in afterwards :)

SimonTellier commented 5 years ago

Right, here is another version of the fix.