fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-01-13 05:49 am

[dw-free] refactor paging_bar logic in talkread.bml

[commit: http://hg.dwscoalition.org/dw-free/rev/42861785f55c]

http://bugs.dwscoalition.org/show_bug.cgi?id=3363

Use a span, rather than a div for inline blocks. Use LJ::page_change_getargs
rather than BML::self_link as the default handler.

Patch by [personal profile] kareila.

Files modified:
  • cgi-bin/DW/Controller/Search/Interests.pm
  • cgi-bin/weblib.pl
--------------------------------------------------------------------------------
diff -r 7158b7960bfe -r 42861785f55c cgi-bin/DW/Controller/Search/Interests.pm
--- a/cgi-bin/DW/Controller/Search/Interests.pm	Thu Jan 13 13:45:17 2011 +0800
+++ b/cgi-bin/DW/Controller/Search/Interests.pm	Thu Jan 13 13:49:11 2011 +0800
@@ -318,14 +318,12 @@ sub interest_handler {
                         && $should_show->( $_ )          # and should show to the remote user
                       } values %$us;
         my $navbar;
-        my $self_link = sub { LJ::page_change_getargs( page => $_[0] ) };
         my $results =
             LJ::user_search_display( users      => \@ul,
                                      timesort   => 1,
                                      perpage    => 50,
                                      curpage    => exists $args->{page} ?
                                                    $args->{page} : 1,
-                                     self_link  => $self_link,
                                      navbar     => \$navbar );
 
         $rv->{int_users} = { count => scalar( @ul ), navbar => $navbar,
diff -r 7158b7960bfe -r 42861785f55c cgi-bin/weblib.pl
--- a/cgi-bin/weblib.pl	Thu Jan 13 13:45:17 2011 +0800
+++ b/cgi-bin/weblib.pl	Thu Jan 13 13:49:11 2011 +0800
@@ -399,7 +399,7 @@ sub paging_bar {
     my ( $page, $pages, $opts ) = @_;
 
     my $self_link = $opts->{self_link} ||
-                    sub { BML::self_link( { page => $_[0] } ) };
+                    sub { LJ::page_change_getargs( page => $_[0] ) };
 
     my $href_opts = $opts->{href_opts} || sub { '' };
 
@@ -428,9 +428,9 @@ sub paging_bar {
     }
 
     $nav .= "$left   ";
-    $nav .= "<div style='display: inline; text-align: center'>";
+    $nav .= "<span style='text-align: center'>";
     $nav .= join ' ', @pagelinks;
-    $nav .= "</div>";
+    $nav .= "</span>";
     $nav .= " &nbsp; $right";
 
     return "<div class='action-box'><div class='inner'>$nav</div></div><div class='clear-floats'></div>\n";
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
No Subject Icon Selected
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org