TeachTechTaskForce / edumap

9 stars 12 forks source link

fix Reset Filter button to hide default results #121

Closed jonnorstrom closed 8 years ago

jonnorstrom commented 8 years ago

Added gem 'jquery-turbolinks' so that jQuery event handlers work with Turbolinks - for stability. Simply made event handler that adds the 'hidden-table' class back to the table when the 'Reset Button' is clicked.

jonnorstrom commented 8 years ago

Don't even need the event handler. Just adding the gem did the trick.

andyras commented 8 years ago

I checked it out and the old behavior is still there (table displays after filtering and pressing 'reset'). Is it different for you?

jonnorstrom commented 8 years ago

Correct, it is different for me. The old behavior isn't there, and every time I click that 'reset' button it does what it should. This is odd. What web client, version, etc. are you using? @andyras

andyras commented 8 years ago

This is under Chrome 52.0.2743.82, and using a fresh install of rails, etc.

I also tested under Safari--in that browser the table always displays.

jonnorstrom commented 8 years ago

@andyras try this patch. Make sure to bundle install before you give it a run. I forgot to mention that last time, my mistake. This should work for Chrome, but I can't figure out why it won't work for Safari.

andyras commented 8 years ago

Still the same behavior for me on both browsers. I pulled, bundle installed, and restarted the app. Anything else I neglected to try?

jonnorstrom commented 8 years ago

Super interesting. You've done all you should. I'll try on my roommates comp, and if I can't get anywhere I'm meeting tomorrow with some more experienced devs and I'll see if they have any ideas.

andyras commented 8 years ago

I just tried again and it works! I'm not sure what I was doing incorrectly before, but at some point I detached HEAD and might not have reattached it in the way I thought I had.