Index: trunk/extensions/LiquidThreads/classes/View.php |
— | — | @@ -319,6 +319,8 @@ |
320 | 320 | $this->showReplyForm( $thread ); |
321 | 321 | } elseif ( $method == 'talkpage_new_thread' ) { |
322 | 322 | $this->showNewThreadForm(); |
| 323 | + } elseif ( $method == 'edit' ) { |
| 324 | + $this->showPostEditingForm( $thread ); |
323 | 325 | } |
324 | 326 | |
325 | 327 | $this->output->setArticleBodyOnly( true ); |
Index: trunk/extensions/LiquidThreads/lqt.js |
— | — | @@ -40,6 +40,16 @@ |
41 | 41 | liquidThreads.currentReplyThread = 0; |
42 | 42 | }, |
43 | 43 | |
| 44 | + 'handleEditLink' : function(e) { |
| 45 | + e.preventDefault(); |
| 46 | + |
| 47 | + // Grab the container. |
| 48 | + var container = $j(this).closest('.lqt-post-wrapper'); |
| 49 | + var query='&lqt_method=edit&lqt_operand='+container.data('thread-id'); |
| 50 | + |
| 51 | + liquidThreads.injectEditForm( query, container ); |
| 52 | + }, |
| 53 | + |
44 | 54 | 'injectEditForm' : function(query, container, preload) { |
45 | 55 | var url = wgServer+wgScript+'?lqt_inline=1&title='+encodeURIComponent(wgPageName)+ |
46 | 56 | query |
— | — | @@ -238,6 +248,10 @@ |
239 | 249 | var menuContainer = post.find( '.lqt-thread-toolbar-menu' ); |
240 | 250 | menu.remove().appendTo( menuContainer ); |
241 | 251 | menuContainer.find('.lqt-thread-toolbar-command-list').hide(); |
| 252 | + |
| 253 | + // Add handler for edit link |
| 254 | + var editLink = menu.find('.lqt-command-edit > a'); |
| 255 | + editLink.click( liquidThreads.handleEditLink ); |
242 | 256 | |
243 | 257 | var trigger = menuContainer.find( '.lqt-thread-actions-trigger' ) |
244 | 258 | |