http://www.mediawiki.org/wiki/Special:Code/MediaWiki/56303
Revision: 56303
Author: werdna
Date: 2009-09-14 13:54:46 +0000 (Mon, 14 Sep 2009)
Log Message:
-----------
Add tooltips to major (icon-only) thread commands
Modified Paths:
--------------
trunk/extensions/LiquidThreads/classes/View.php
Modified: trunk/extensions/LiquidThreads/classes/View.php
===================================================================
--- trunk/extensions/LiquidThreads/classes/View.php 2009-09-14 13:46:39 UTC
(rev 56302)
+++ trunk/extensions/LiquidThreads/classes/View.php 2009-09-14 13:54:46 UTC
(rev 56303)
@@ -541,21 +541,24 @@
$label = wfMsgExt( 'lqt-thread-merge-to', 'parseinline'
);
$commands['merge-to'] = array( 'label' => $label,
'href' => $mergeUrl,
-
'enabled' => true );
+
'enabled' => true, 'tooltip' => $label );
}
$commands['reply'] = array( 'label' => wfMsgExt( 'lqt_reply',
'parseinline' ),
'href' =>
$this->talkpageUrl( $this->title, 'reply', $thread ),
- 'enabled' => true,
'icon' => 'reply.png', 'showlabel' => 1);
+ 'enabled' => true,
'icon' => 'reply.png', 'showlabel' => 1,
+ 'tooltip' => wfMsg(
'lqt_reply' ) );
$commands['link'] = array( 'label' => wfMsgExt(
'lqt_permalink', 'parseinline' ),
'href' =>
$thread->title()->getFullURL(),
- 'enabled' => true,
'icon' => 'link.png' );
+ 'enabled' => true,
'icon' => 'link.png',
+ 'tooltip' => wfMsgExt(
'lqt_permalink', 'parseinline' ) );
if ( $thread->root()->getTitle()->quickUserCan( 'edit' ) ) {
$commands['edit'] = array( 'label' => wfMsgExt( 'edit',
'parseinline' ),
'href' =>
$this->talkpageUrl( $this->title, 'edit', $thread ),
- 'enabled' =>
true, 'icon' => 'edit.png' );
+ 'enabled' =>
true, 'icon' => 'edit.png',
+ 'tooltip' =>
wfMsgExt( 'edit', 'parseinline' ) );
}
return $commands;
@@ -724,6 +727,7 @@
$label = $command['label'];
$href = $command['href'];
$enabled = $command['enabled'];
+ $tooltip = isset($command['tooltip']) ? $command['tooltip'] :
'';
if ( isset( $command['icon'] ) ) {
global $wgScriptPath;
@@ -745,10 +749,11 @@
$thisCommand = '';
if ( $enabled ) {
- $thisCommand = Xml::tags( 'a', array( 'href' => $href
), $label );
+ $thisCommand = Xml::tags( 'a', array( 'href' => $href,
'title' => $tooltip ),
+ $label );
} else {
- $thisCommand = Xml::tags( 'span', array( 'class' =>
'lqt_command_disabled' ),
-
$label );
+ $thisCommand = Xml::tags( 'span', array( 'class' =>
'lqt_command_disabled',
+ 'title' => $tooltip), $label );
}
return $thisCommand;
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs