[freeside-commits] branch FREESIDE_2_3_BRANCH updated. f2db9bfd9d1a20a494899e8eb8b0d7795a3189ed

Ivan ivan at 420.am
Fri Nov 15 15:14:50 PST 2013


The branch, FREESIDE_2_3_BRANCH has been updated
       via  f2db9bfd9d1a20a494899e8eb8b0d7795a3189ed (commit)
      from  1cbe920bb2c3682b8f06d14711ae6a9cd4df3ec4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f2db9bfd9d1a20a494899e8eb8b0d7795a3189ed
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Fri Nov 15 15:14:49 2013 -0800

    fix sorting by a column advancing a page, RT#25740

diff --git a/httemplate/elements/pager.html b/httemplate/elements/pager.html
index a53300f..d360e64 100644
--- a/httemplate/elements/pager.html
+++ b/httemplate/elements/pager.html
@@ -1,13 +1,8 @@
-% my %opt = @_;
-% my $pager = '';
-%
 % if ( $opt{'total'} != $opt{'num_rows'} && $opt{'maxrecords'} ) {
 %
 %   unless ( $opt{'offset'} == 0 ) {
 %     $cgi->param('offset', $opt{'offset'} - $opt{'maxrecords'});
-
       <A HREF="<% $cgi->self_url %>"><B><FONT SIZE="+1">Previous</FONT></B></A>
-
 %   }
 %
 %   my $page = 0;
@@ -47,9 +42,17 @@
 %
 %   unless ( $opt{'offset'} + $opt{'maxrecords'} > $opt{'total'} ) {
 %     $cgi->param('offset', $opt{'offset'} + $opt{'maxrecords'});
-
       <A HREF="<% $cgi->self_url %>"><B><FONT SIZE="+1">Next</FONT></B></A>
-%
 %   }
 %
+%   $cgi->param('offset', $orig_offset); #so future $self_url invocations don't advance a page
+%
 % }
+<%init>
+
+my %opt = @_;
+
+my $orig_offset = $opt{'offset'};
+
+</%init>
+

-----------------------------------------------------------------------

Summary of changes:
 httemplate/elements/pager.html |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)




More information about the freeside-commits mailing list