- 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:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r23
|
r26
|
|
| 49 | 49 | def list(self, id): |
| 50 | 50 | c.paginator = Page(Session.query(Paste), current_page=id or 1, |
| 51 | | items_per_page=25, |
| | 51 | items_per_page=5, |
| 52 | 52 | sqlalchemy_engine=config['pylons.g'].sa_engine) |
| 53 | 53 | log.debug(c.paginator) |
-
|
r21
|
r26
|
|
| 24 | 24 | </ul> |
| 25 | 25 | |
| 26 | | ${Markup(c.paginator.pager(link_var='id', framework='jquery', |
| 27 | | ajax_id='paste_items'))} |
| | 26 | ${Markup(c.paginator.pager(link_var='id'))} |
| 28 | 27 | </div> |
| 29 | | |
| 30 | 28 | |
| 31 | 29 | <script type="text/javascript"> |
-
|
r23
|
r26
|
|
| 26 | 26 | ${Markup(c.paginator.pager(link_var='page'))} |
| 27 | 27 | |
| | 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 | |
| 28 | 36 | </body> |
| 29 | 37 | </html> |
Download in other formats:
|
|