Skip to content

Commit

Permalink
Reset to page one on spatial search
Browse files Browse the repository at this point in the history
Fixes #91.
  • Loading branch information
Mike Graves committed Nov 7, 2014
1 parent 23f6b18 commit 71048b7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/javascripts/geoblacklight/modules/geosearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
},

_search: function() {
var params = this.filterParams(['bbox']),
var params = this.filterParams(['bbox', 'page']),
bounds = L.boundsToBbox(this._map.getBounds());

params.push('bbox=' + encodeURIComponent(bounds.join(' ')));
Expand Down
6 changes: 6 additions & 0 deletions spec/features/split_view.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,10 @@
end
end

scenario 'spatial search should reset to page one' do
visit '/?f%5Bdc_format_s%5D%5B%5D=Shapefile&page=2'
find("#map").double_click
expect(find('.page_entries')).to have_content('1 - 10')
end

end

0 comments on commit 71048b7

Please sign in to comment.