r57942 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57941‎ | r57942 | r57943 >
Date:14:04, 20 October 2009
Author:werdna
Status:deferred
Tags:
Comment:
Update LiquidThreads for testing toolbar fixes
Modified paths:
  • /branches/wmf-deployment/extensions/LiquidThreads (modified) (history)
  • /branches/wmf-deployment/extensions/LiquidThreads/classes/View.php (modified) (history)
  • /branches/wmf-deployment/extensions/LiquidThreads/i18n/Lqt.i18n.php (modified) (history)
  • /branches/wmf-deployment/extensions/LiquidThreads/lqt.css (modified) (history)
  • /branches/wmf-deployment/extensions/LiquidThreads/lqt.js (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/extensions/LiquidThreads/i18n/Lqt.i18n.php
@@ -35,7 +35,7 @@
3636 'lqt_reply' => 'Reply',
3737 'lqt_delete' => 'Delete',
3838 'lqt_undelete' => 'Undelete',
39 - 'lqt_permalink' => 'Link to this',
 39+ 'lqt_permalink' => 'Link to',
4040 'lqt_fragment' => 'Fragment of a $1 from $2',
4141 'lqt_discussion_link' => 'discussion', // substituted above
4242 'lqt_from_talk' => 'From $1',
@@ -188,6 +188,7 @@
189189 'lqt-delete-parent-deleted' => 'Parent thread deleted ($1)',
190190 'lqt-delete-replies-done' => 'All replies to this thread have also been deleted.',
191191 'lqt-movethread' => 'Move',
 192+ 'lqt-menu-trigger' => 'More',
192193
193194 // Rights
194195 'right-lqt-split' => 'Split threads',
Index: branches/wmf-deployment/extensions/LiquidThreads/lqt.css
@@ -257,6 +257,7 @@
258258 margin-top: 0px;
259259
260260 }
 261+
261262 .lqt-thread-toolbar-command-list li {
262263 padding-left: 0.5em;
263264 padding-right: 0.5em;
@@ -279,12 +280,16 @@
280281
281282 .lqt-thread-actions-icon {
282283 display: block;
283 - width: 1.5em;
 284+ width: 3em;
284285 height: 2em;
285 - padding-left: 0.5em;
 286+ padding-right: 0.5em;
286287 background-image: url('icons/arrow-down-icon.png');
287 - background-position: center center;
 288+ background-position: right center;
288289 background-repeat: no-repeat;
 290+ line-height: 2em;
 291+ margin-left: 0.5em;
 292+ color: #666666;
 293+ cursor: pointer;
289294 }
290295 .lqt-talkpage-search {
291296 /*float: left;*/
@@ -362,33 +367,11 @@
363368 }
364369
365370 .lqt-thread-toolbar {
366 - position: absolute;
367371 right: 0.5em;
368 - background-image: url(images/box-c.png);
 372+ position: absolute;
 373+
369374 }
370375
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 -}
393376 .lqt-command {
394377 margin-top: 8px;
395378 padding: 0;
@@ -400,9 +383,12 @@
401384 .lqt-command-link a {
402385 margin-left: 1em;
403386 height: 2em;
404 - width: 2em;
 387+ width: 3em;
 388+ padding-left: 26px;
405389 background-image: url(icons/link.png) !important;
406390 background-repeat: no-repeat;
 391+ background-position: left center !important;
 392+ line-height: 2em;
407393 }
408394 .lqt-command-reply a {
409395 margin-left: 1em;
Index: branches/wmf-deployment/extensions/LiquidThreads/classes/View.php
@@ -665,14 +665,20 @@
666666 'label' => wfMsgExt( 'lqt_reply', 'parseinline' ),
667667 'href' => $this->talkpageUrl( $this->title, 'reply', $thread,
668668 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+ );
671674
672675 $commands['link'] = array(
673676 'label' => wfMsgExt( 'lqt_permalink', 'parseinline' ),
674677 '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+ );
677683 /*
678684 if ( $thread->root()->getTitle()->quickUserCan( 'edit' ) ) {
679685 $commands['edit'] = array(
@@ -814,7 +820,7 @@
815821 $this->listItemsForCommands( $commands ) );
816822
817823 $triggerText = Xml::tags( 'span', array( 'class' => 'lqt-thread-actions-icon' ),
818 - ' ' );
 824+ wfMsgHTML( 'lqt-menu-trigger' ) );
819825 $dropDownTrigger = Xml::tags( 'div',
820826 array( 'class' => 'lqt-thread-actions-trigger ' .
821827 'lqt-command-icon', 'style' => 'display: none;' ),
@@ -830,14 +836,6 @@
831837
832838 $html = Xml::tags( 'ul', array( 'class' => 'lqt-thread-toolbar-commands' ), $html );
833839 $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 - }
842840
843841 $html = Xml::tags( 'div', array( 'class' => 'lqt-thread-toolbar' ), $html ) .
844842 $menuHTML;
@@ -931,10 +929,10 @@
932930 $this->showPostEditingForm( $thread );
933931 $html .= Xml::closeElement( 'div' );
934932 } else {
935 - $html .= $this->showThreadToolbar( $thread );
936933 $html .= Xml::openElement( 'div', array( 'class' => $divClass ) );
937934 $html .= $this->showPostBody( $post, $oldid );
938935 $html .= Xml::closeElement( 'div' );
 936+ $html .= $this->showThreadToolbar( $thread );
939937 $html .= $this->threadSignature( $thread );
940938 }
941939
Index: branches/wmf-deployment/extensions/LiquidThreads/lqt.js
@@ -233,28 +233,37 @@
234234 var post = $j(this);
235235
236236 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 - );
252237
253238 var menu = post.find('.lqt-thread-toolbar-command-list');
254239 var menuContainer = post.find( '.lqt-thread-toolbar-menu' );
255240 menu.remove().appendTo( menuContainer );
256241 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+ } );
259268 },
260269
261270 'checkForUpdates' : function() {
@@ -386,8 +395,8 @@
387396 replyLink.click( liquidThreads.handleReplyLink );
388397
389398 // 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);
392401 }
393402
394403 // Hide edit forms
Property changes on: branches/wmf-deployment/extensions/LiquidThreads
___________________________________________________________________
Name: svn:mergeinfo
395404 - /branches/REL1_15/phase3/extensions/LiquidThreads:51646
/trunk/extensions/LiquidThreads:56151-57928,57930
/trunk/phase3/extensions/LiquidThreads:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447
396405 + /branches/REL1_15/phase3/extensions/LiquidThreads:51646
/trunk/extensions/LiquidThreads:56151-57941
/trunk/phase3/extensions/LiquidThreads:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447

Status & tagging log