Skip to content
Prev Previous commit
Next Next commit
Issue #516 - Call loadIssues on history navigation
  • Loading branch information
Mike Taylor committed Jan 21, 2015
commit c7e0c1923e1348a726b88585806b0088c55415c3
3 changes: 1 addition & 2 deletions webcompat/static/js/lib/issue-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ issueList.IssueView = Backbone.View.extend({
issueList.events.on('paginate:next', _.bind(this.requestNextPage, this));
issueList.events.on('paginate:previous', _.bind(this.requestPreviousPage, this));
wcEvents.on('dropdown:change', _.bind(this.updateModelParams, this));
window.addEventListener('popstate', _.bind(this.loadIssues, this));

this.loadIssues();
},
Expand All @@ -324,7 +325,6 @@ issueList.IssueView = Backbone.View.extend({
// Attemps to load model state from URL params, if present,
// otherwise grab model defaults and load issues

// popstate should load this method.
var category;
// get params excluding the leading ?
var urlParams = location.search.slice(1);
Expand Down Expand Up @@ -468,7 +468,6 @@ issueList.IssueView = Backbone.View.extend({
this.fetchAndRenderIssues();
},
updateModelParams: function(params, options) {
// TODO: profile how many times this gets called and optimize.
// convert params string to an array,
// splitting on & in case of multiple params
// params are merged into issues model
Expand Down