|
34 | 34 | $('.post-entry').live('click',function() { |
35 | 35 | view_post($(this).attr('post-id'), UI_update, 'click'); |
36 | 36 | }); |
| 37 | + |
| 38 | + |
| 39 | + $('#last-page-button').click(function(){ |
| 40 | + view_board(bbs_current_path.board.name, -1, -1, UI_update, 'click'); |
| 41 | + }); |
| 42 | + |
| 43 | + $('#first-page-button').click(function(){ |
| 44 | + view_board(bbs_current_path.board.name, 1, -1, UI_update, 'click'); |
| 45 | + }); |
37 | 46 |
|
38 | 47 | $('#next-page-button').click(function(){ |
39 | 48 | view_board_next_page(UI_update); |
|
42 | 51 | $('#prev-page-button').click(function(){ |
43 | 52 | view_board_prev_page(UI_update); |
44 | 53 | }); |
| 54 | + |
| 55 | + $('#jump-to-post-button').click(function(){ |
| 56 | + var post_id = $('#jump-to-post-input').val(); |
| 57 | + if (post_id != null && post_id != '') { |
| 58 | + view_board(bbs_current_path.board.name, post_id, -1, UI_update, 'next'); |
| 59 | + } |
| 60 | + }); |
| 61 | + |
| 62 | + $('#jump-to-post-input').keypress(function(event) { |
| 63 | + if ( event.which == 13 ) { |
| 64 | + var post_id = $(this).val(); |
| 65 | + if (post_id != null && post_id != '') { |
| 66 | + view_board(bbs_current_path.board.name, post_id, -1, UI_update, 'next'); |
| 67 | + } |
| 68 | + } |
| 69 | + }); |
| 70 | + |
45 | 71 |
|
46 | 72 | $('#next-post-button').click(function(){ |
47 | 73 | view_next_post(UI_update); |
@@ -228,6 +254,16 @@ function UI_maindiv_update(path, content) { |
228 | 254 | var entryStr = UI_generate_post_entry(content[i]); |
229 | 255 | $('#board-table-body').append(entryStr); |
230 | 256 | } |
| 257 | + |
| 258 | + //Easter Eggs |
| 259 | + if (path.board.name == 'e_note') { |
| 260 | + $('#jump-to-post-input').attr('value', '23'); |
| 261 | + } else if (path.board.name == 'test') { |
| 262 | + $('#jump-to-post-input').attr('value', '1481'); |
| 263 | + } else { |
| 264 | + $('#jump-to-post-input').attr('value', ''); |
| 265 | + } |
| 266 | + |
231 | 267 | $('#board-table').show(); |
232 | 268 | } else if (path.path_level == 3) { |
233 | 269 | $('#post-view-area').empty(); |
|
0 commit comments