журнал (shhh) wrote in changelog,
журнал
shhh
changelog

[ljcom] r12486: LJSUP-12917: Add RESERVED and INCOMING t...

Committer: nnikulochkina
LJSUP-12917: Add RESERVED and INCOMING tabs to user wallet page
U   trunk/cgi-bin/LJ/Widget/Shop/View/Wallet.pm
U   trunk/cgi-bin/LJ/Widget/Shop.pm
Modified: trunk/cgi-bin/LJ/Widget/Shop/View/Wallet.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/Shop/View/Wallet.pm	2012-08-17 12:20:25 UTC (rev 12485)
+++ trunk/cgi-bin/LJ/Widget/Shop/View/Wallet.pm	2012-08-17 14:00:57 UTC (rev 12486)
@@ -167,9 +167,6 @@
                 return "$LJ::SITEROOT/shop/tokens.bml?show=incoming&page=$page";
             },
         );
-        
-        LJ::need_var($paging_params{js_params});
-
     }
 
     if ($show_tab =~ /reserved/) {
@@ -192,8 +189,6 @@
                 return "$LJ::SITEROOT/shop/tokens.bml?show=reserved&page=$page";
             },
         );
-        
-        LJ::need_var($paging_params{js_params});
     }
 
 

Modified: trunk/cgi-bin/LJ/Widget/Shop.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/Shop.pm	2012-08-17 12:20:25 UTC (rev 12485)
+++ trunk/cgi-bin/LJ/Widget/Shop.pm	2012-08-17 14:00:57 UTC (rev 12486)
@@ -481,20 +481,16 @@
     my $pagecount    = $args{'pagecount'};
     my $cb_page_link = $args{'cb_page_link'};
 
-    my $js_params;
-
     return () unless $pagecount > 1;
 
     my %ret = ( "${prefix}show_paging" => 1 );
 
     if ( $pagenum > 1 ) {
         $ret{"${prefix}previous_page"} = $cb_page_link->( $pagenum - 1 );
-        $js_params->{"${prefix}previous_page"} = $pagenum - 1;
     }
 
     if ( $pagenum < $pagecount ) {
         $ret{"${prefix}next_page"} = $cb_page_link->( $pagenum + 1 );
-        $js_params->{"${prefix}next_page"} = $pagenum + 1;
     }
 
     my $start_page = $pagenum - 1;
@@ -502,7 +498,6 @@
         $start_page = 1;
     } else {
         $ret{"${prefix}first_page"} = $cb_page_link->(1);
-        $js_params->{"${prefix}first_page"} = 1;
     }
 
     my $end_page = $pagenum + 1;
@@ -511,7 +506,6 @@
     } else {
         $ret{"${prefix}last_page"} = $cb_page_link->($pagecount);
         $ret{"${prefix}last_page_num"} = $pagecount;
-        $js_params->{"${prefix}last_page"} = $pagecount;
     }
 
     if ( $end_page - $start_page <= 1 ) {
@@ -524,9 +518,9 @@
         }
     }
 
-    $js_params->{"${prefix}page_current"} = $pagenum;
-    $js_params->{"${prefix}start_page"} = $start_page;
-    $js_params->{"${prefix}end_page"} = $end_page;
+    $ret{"${prefix}pagenum"}    = $pagenum;
+    $ret{"${prefix}start_page_num"} = $start_page;
+    $ret{"${prefix}end_page_num"}   = $end_page;
 
     my @pages_display;
     foreach my $page ( $start_page .. $end_page ) {
@@ -537,9 +531,7 @@
         };
     }
     $ret{"${prefix}pages"} = \@pages_display;
-    
-    $ret{"js_params"} = $js_params;
-    
+
     return %ret;
 }
 

Tags: ljcom, nikulochkina, nnikulochkina, pm
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments