Skip to content

Commit

Permalink
Merge pull request cve-search#73 from PidgeyL/development
Browse files Browse the repository at this point in the history
fix javascript pager bug
  • Loading branch information
adulau committed Mar 27, 2015
2 parents 2c51913 + 3d06901 commit b2cf3cb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions web/templates/index-minimal.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@
form.action = url;
form.submit();
}
function next(){
function next(n){
setSettings();
var url = "/r/{{ r + pageLength }}";
var multiplier = {{ r }} + ( n * {{ pageLength }});
var url = "/r/"+multiplier;
postURL(url);
}
function previous(){
function previous(n){
setSettings();
var page = {{ r - pageLength }};
var page = {{ r }} - ( n * {{ pageLength }});
if(page < 0){
page = 0;}
var url = "/r/" + page;
Expand Down

0 comments on commit b2cf3cb

Please sign in to comment.