Changeset 98 for trunk


Ignore:
Timestamp:
06/24/11 17:30:23 (13 years ago)
Author:
Kris Deugau
Message:

/trunk

Fiddle results-per-page default
Bugfix for offset on filtering a result set close enough to

the end of the original full set that the filtered set
doesn't have enough results to reach that offset.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns.cgi

    r97 r98  
    101101# default
    102102#my $perpage = 15;
    103 my $perpage = 3;
     103my $perpage = 5;
    104104my $offset = ($webvar{offset} ? $webvar{offset} : 0);
    105105
     
    13481348  my $parent = shift;
    13491349
     1350  # Fix display/UI bug where if you are not on the first page of the list, and
     1351  # you add a search term or click one of the "starts with" links, you end up
     1352  # on a page showing nothing.
     1353  # For bonus points, this reverts to the original offset on clicking the "All" link (mostly)
     1354  $offset-- while ($offset * $perpage) >= $pgcount;
     1355
    13501356  $page->param(ntot => $pgcount);
    13511357  $page->param(nfirst => (($offset eq 'all' ? 0 : $offset)*$perpage+1));
Note: See TracChangeset for help on using the changeset viewer.