Changeset 26 for trunk

Show
Ignore:
Timestamp:
29-12-2007 21:49:45 (13 months ago)
Author:
s0undt3ch
Message:

Now paste contents show when browsing pastes tagged with a specific tag. Removed the jquery option from the pager() on the pastes listing.

Location:
trunk/pastie
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/pastie/controllers/pasties.py

    r23 r26  
    4949    def list(self, id): 
    5050        c.paginator = Page(Session.query(Paste), current_page=id or 1, 
    51                            items_per_page=25, 
     51                           items_per_page=5, 
    5252                           sqlalchemy_engine=config['pylons.g'].sa_engine) 
    5353        log.debug(c.paginator) 
  • trunk/pastie/templates/paste/index.html

    r21 r26  
    2424    </ul> 
    2525 
    26     ${Markup(c.paginator.pager(link_var='id', framework='jquery', 
    27              ajax_id='paste_items'))} 
     26    ${Markup(c.paginator.pager(link_var='id'))} 
    2827    </div> 
    29  
    3028 
    3129    <script type="text/javascript"> 
  • trunk/pastie/templates/pastetags/show.html

    r23 r26  
    2626    ${Markup(c.paginator.pager(link_var='page'))} 
    2727 
     28    <script type="text/javascript"> 
     29      $('a.viewtoggle').bind('click', function() { 
     30        $('div.code_' +  $(this).attr('id').replace('source_', '')).slideToggle( 
     31         5, $(this).html() == 'View' ? $(this).html('Hide') : $(this).html('View') 
     32        ); 
     33      }); 
     34    </script> 
     35 
    2836  </body> 
    2937</html>