FinalsClub / karmaworld

KarmaNotes.org v3.0
GNU Affero General Public License v3.0
7 stars 6 forks source link

refresh on front page ignores filters #391

Closed btbonval closed 9 years ago

btbonval commented 9 years ago

After filtering for school on the front page, I hit the refresh button. The school is still selected as a filter, but the list of courses on the front page is not filtered.

btbonval commented 9 years ago

Where the filtering takes place for school: https://github.com/FinalsClub/karmaworld/blob/master/karmaworld/assets/js/course-list.js#L70-L77

btbonval commented 9 years ago

If reload calls all the $() functions the way a normal load would, this might be easy. I see two ways:

  1. extract the code from .change() into a named function; call the function in .change() and also in $() so that it runs at load
  2. leave .change() and in a $() call trigger, like $('#school-filter').trigger('change');
btbonval commented 9 years ago

option #2 worked just fine. pushing to master and closing ticket.