Index: trunk/extensions/LiquidThreads/i18n/Lqt.i18n.php |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | 'lqt_reply' => 'Reply', |
37 | 37 | 'lqt_delete' => 'Delete', |
38 | 38 | 'lqt_undelete' => 'Undelete', |
39 | | - 'lqt_permalink' => 'Link to this', |
| 39 | + 'lqt_permalink' => 'Link to', |
40 | 40 | 'lqt_fragment' => 'Fragment of a $1 from $2', |
41 | 41 | 'lqt_discussion_link' => 'discussion', // substituted above |
42 | 42 | 'lqt_from_talk' => 'From $1', |
— | — | @@ -188,6 +188,7 @@ |
189 | 189 | 'lqt-delete-parent-deleted' => 'Parent thread deleted ($1)', |
190 | 190 | 'lqt-delete-replies-done' => 'All replies to this thread have also been deleted.', |
191 | 191 | 'lqt-movethread' => 'Move', |
| 192 | + 'lqt-menu-trigger' => 'More', |
192 | 193 | |
193 | 194 | // Rights |
194 | 195 | 'right-lqt-split' => 'Split threads', |
Index: trunk/extensions/LiquidThreads/lqt.css |
— | — | @@ -257,6 +257,7 @@ |
258 | 258 | margin-top: 0px; |
259 | 259 | |
260 | 260 | } |
| 261 | + |
261 | 262 | .lqt-thread-toolbar-command-list li { |
262 | 263 | padding-left: 0.5em; |
263 | 264 | padding-right: 0.5em; |
— | — | @@ -279,12 +280,16 @@ |
280 | 281 | |
281 | 282 | .lqt-thread-actions-icon { |
282 | 283 | display: block; |
283 | | - width: 1.5em; |
| 284 | + width: 3em; |
284 | 285 | height: 2em; |
285 | | - padding-left: 0.5em; |
| 286 | + padding-right: 0.5em; |
286 | 287 | background-image: url('icons/arrow-down-icon.png'); |
287 | | - background-position: center center; |
| 288 | + background-position: right center; |
288 | 289 | background-repeat: no-repeat; |
| 290 | + line-height: 2em; |
| 291 | + margin-left: 0.5em; |
| 292 | + color: #666666; |
| 293 | + cursor: pointer; |
289 | 294 | } |
290 | 295 | .lqt-talkpage-search { |
291 | 296 | /*float: left;*/ |
— | — | @@ -362,33 +367,11 @@ |
363 | 368 | } |
364 | 369 | |
365 | 370 | .lqt-thread-toolbar { |
366 | | - position: absolute; |
367 | 371 | right: 0.5em; |
368 | | - background-image: url(images/box-c.png); |
| 372 | + position: absolute; |
| 373 | + |
369 | 374 | } |
370 | 375 | |
371 | | -div.lqt-thread-toolbar-box-bl { |
372 | | - background-image: url(images/box-bl.png); |
373 | | - background-position: bottom left; |
374 | | - background-repeat: no-repeat; |
375 | | -} |
376 | | -div.lqt-thread-toolbar-box-br { |
377 | | - background-image: url(images/box-br.png); |
378 | | - background-position: bottom right; |
379 | | - background-repeat: no-repeat; |
380 | | -} |
381 | | -div.lqt-thread-toolbar-box-tr { |
382 | | - background-image: url(images/box-tr.png); |
383 | | - background-position: top right; |
384 | | - background-repeat: no-repeat; |
385 | | - padding-bottom: 8px; |
386 | | -} |
387 | | -div.lqt-thread-toolbar-box-tl { |
388 | | - background-image: url(images/box-tl.png); |
389 | | - background-position: top left; |
390 | | - background-repeat: no-repeat; |
391 | | - padding-right: 8px; |
392 | | -} |
393 | 376 | .lqt-command { |
394 | 377 | margin-top: 8px; |
395 | 378 | padding: 0; |
— | — | @@ -400,9 +383,12 @@ |
401 | 384 | .lqt-command-link a { |
402 | 385 | margin-left: 1em; |
403 | 386 | height: 2em; |
404 | | - width: 2em; |
| 387 | + width: 3em; |
| 388 | + padding-left: 26px; |
405 | 389 | background-image: url(icons/link.png) !important; |
406 | 390 | background-repeat: no-repeat; |
| 391 | + background-position: left center !important; |
| 392 | + line-height: 2em; |
407 | 393 | } |
408 | 394 | .lqt-command-reply a { |
409 | 395 | margin-left: 1em; |
Index: trunk/extensions/LiquidThreads/classes/View.php |
— | — | @@ -665,14 +665,20 @@ |
666 | 666 | 'label' => wfMsgExt( 'lqt_reply', 'parseinline' ), |
667 | 667 | 'href' => $this->talkpageUrl( $this->title, 'reply', $thread, |
668 | 668 | true /* include fragment */, $this->request ), |
669 | | - 'enabled' => true, 'icon' => 'reply.png', 'showlabel' => 1, |
670 | | - 'tooltip' => wfMsg( 'lqt_reply' ) ); |
| 669 | + 'enabled' => true, |
| 670 | + 'icon' => 'reply.png', |
| 671 | + 'showlabel' => 1, |
| 672 | + 'tooltip' => wfMsg( 'lqt_reply' ) |
| 673 | + ); |
671 | 674 | |
672 | 675 | $commands['link'] = array( |
673 | 676 | 'label' => wfMsgExt( 'lqt_permalink', 'parseinline' ), |
674 | 677 | 'href' => $thread->title()->getFullURL(), |
675 | | - 'enabled' => true, 'icon' => 'link.png', |
676 | | - 'tooltip' => wfMsgExt( 'lqt_permalink', 'parseinline' ) ); |
| 678 | + 'enabled' => true, |
| 679 | + 'icon' => 'link.png', |
| 680 | + 'showlabel' => true, |
| 681 | + 'tooltip' => wfMsgExt( 'lqt_permalink', 'parseinline' ) |
| 682 | + ); |
677 | 683 | /* |
678 | 684 | if ( $thread->root()->getTitle()->quickUserCan( 'edit' ) ) { |
679 | 685 | $commands['edit'] = array( |
— | — | @@ -814,7 +820,7 @@ |
815 | 821 | $this->listItemsForCommands( $commands ) ); |
816 | 822 | |
817 | 823 | $triggerText = Xml::tags( 'span', array( 'class' => 'lqt-thread-actions-icon' ), |
818 | | - ' ' ); |
| 824 | + wfMsgHTML( 'lqt-menu-trigger' ) ); |
819 | 825 | $dropDownTrigger = Xml::tags( 'div', |
820 | 826 | array( 'class' => 'lqt-thread-actions-trigger ' . |
821 | 827 | 'lqt-command-icon', 'style' => 'display: none;' ), |
— | — | @@ -830,14 +836,6 @@ |
831 | 837 | |
832 | 838 | $html = Xml::tags( 'ul', array( 'class' => 'lqt-thread-toolbar-commands' ), $html ); |
833 | 839 | $html .= Xml::tags( 'div', array( 'style' => 'clear: both; height: 0;' ), ' ' ); |
834 | | - |
835 | | - // Box stuff |
836 | | - $boxElements = array( 'lqt-thread-toolbar-box-tl', 'lqt-thread-toolbar-box-tr', |
837 | | - 'lqt-thread-toolbar-box-br', 'lqt-thread-toolbar-box-bl' ); |
838 | | - foreach ( $boxElements as $class ) { |
839 | | - $html = Xml::openElement( 'div', array( 'class' => $class ) ) . $html . |
840 | | - Xml::closeElement( 'div' ); |
841 | | - } |
842 | 840 | |
843 | 841 | $html = Xml::tags( 'div', array( 'class' => 'lqt-thread-toolbar' ), $html ) . |
844 | 842 | $menuHTML; |
— | — | @@ -931,10 +929,10 @@ |
932 | 930 | $this->showPostEditingForm( $thread ); |
933 | 931 | $html .= Xml::closeElement( 'div' ); |
934 | 932 | } else { |
935 | | - $html .= $this->showThreadToolbar( $thread ); |
936 | 933 | $html .= Xml::openElement( 'div', array( 'class' => $divClass ) ); |
937 | 934 | $html .= $this->showPostBody( $post, $oldid ); |
938 | 935 | $html .= Xml::closeElement( 'div' ); |
| 936 | + $html .= $this->showThreadToolbar( $thread ); |
939 | 937 | $html .= $this->threadSignature( $thread ); |
940 | 938 | } |
941 | 939 | |
Index: trunk/extensions/LiquidThreads/lqt.js |
— | — | @@ -233,28 +233,37 @@ |
234 | 234 | var post = $j(this); |
235 | 235 | |
236 | 236 | var toolbar = post.find('.lqt-thread-toolbar'); |
237 | | - toolbar.hide(); |
238 | | - |
239 | | - post.hover( |
240 | | - function() { |
241 | | - toolbar.fadeIn(100); |
242 | | - liquidThreads.currentToolbar = toolbar; |
243 | | - }, |
244 | | - function() { |
245 | | - if ( liquidThreads.currentToolbar && |
246 | | - liquidThreads.currentToolbar.is(toolbar) ) { |
247 | | - liquidThreads.currentToolbar = null; |
248 | | - } |
249 | | - toolbar.fadeOut(20); |
250 | | - } |
251 | | - ); |
252 | 237 | |
253 | 238 | var menu = post.find('.lqt-thread-toolbar-command-list'); |
254 | 239 | var menuContainer = post.find( '.lqt-thread-toolbar-menu' ); |
255 | 240 | menu.remove().appendTo( menuContainer ); |
256 | 241 | menuContainer.find('.lqt-thread-toolbar-command-list').hide(); |
257 | | - menuContainer.hover( function() { menu.fadeIn(); }, function() { menu.fadeOut(); } ); |
258 | | - menuContainer.find( '.lqt-thread-actions-trigger' ).show(); |
| 242 | + |
| 243 | + var trigger = menuContainer.find( '.lqt-thread-actions-trigger' ) |
| 244 | + |
| 245 | + trigger.show(); |
| 246 | + menu.hide(); |
| 247 | + |
| 248 | + trigger.click( |
| 249 | + function() { |
| 250 | + // Hide the other menus |
| 251 | + $j('.lqt-thread-toolbar-command-list').not(menu).hide('fast'); |
| 252 | + |
| 253 | + menu.toggle( 'fast' ); |
| 254 | + |
| 255 | + var windowHeight = $j(window).height(); |
| 256 | + var toolbarOffset = toolbar.offset().top; |
| 257 | + var scrollPos = $j(window).scrollTop(); |
| 258 | + |
| 259 | + var menuBottom = ( toolbarOffset + 150 - scrollPos ); |
| 260 | + |
| 261 | + if ( menuBottom > windowHeight ) { |
| 262 | + // Switch to an upwards menu. |
| 263 | + menu.css( 'bottom', toolbar.height() ); |
| 264 | + } else { |
| 265 | + menu.css( 'bottom', 'auto' ); |
| 266 | + } |
| 267 | + } ); |
259 | 268 | }, |
260 | 269 | |
261 | 270 | 'checkForUpdates' : function() { |
— | — | @@ -386,8 +395,8 @@ |
387 | 396 | replyLink.click( liquidThreads.handleReplyLink ); |
388 | 397 | |
389 | 398 | // Add quote button to menus |
390 | | - var toolbar = $j(threadContainer).find('.lqt-thread-toolbar-commands'); |
391 | | - liquidThreads.addQuoteButton(toolbar); |
| 399 | +// var toolbar = $j(threadContainer).find('.lqt-thread-toolbar-commands'); |
| 400 | +// liquidThreads.addQuoteButton(toolbar); |
392 | 401 | } |
393 | 402 | |
394 | 403 | // Hide edit forms |