r81916 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81915‎ | r81916 | r81917 >
Date:20:46, 10 February 2011
Author:platonides
Status:ok
Tags:
Comment:
MonoBook is now tooltip() and tooltipAndAccesskeyAttribs() free!
Modified paths:
  • /trunk/phase3/skins/MonoBook.php (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/MonoBook.php
@@ -109,9 +109,13 @@
110110 </div>
111111 </div>
112112 <div class="portlet" id="p-logo">
113 - <a style="background-image: url(<?php $this->text('logopath') ?>);" <?php
114 - ?>href="<?php echo htmlspecialchars($this->data['nav_urls']['mainpage']['href'])?>"<?php
115 - echo $skin->tooltipAndAccesskey('p-logo') ?>></a>
 113+ <?php
 114+ $logoAttribs = array() + $skin->tooltipAndAccesskeyAttribs('p-logo');
 115+ $logoAttribs['style'] = "background-image: url({$this->data['logopath']});";
 116+ $logoAttribs['href'] = $this->data['nav_urls']['mainpage']['href'];
 117+ echo Html::element( 'a', $logoAttribs );
 118+ ?>
 119+
116120 </div>
117121 <script type="<?php $this->text('jsmimetype') ?>"> if (window.isMSIE55) fixalpha(); </script>
118122 <?php
@@ -272,8 +276,14 @@
273277
274278 /*************************************************************************************************/
275279 function customBox( $bar, $cont ) {
 280+ $portletAttribs = array( 'class' => 'generated-sidebar portlet', 'id' => Sanitizer::escapeId( "p-$bar" ) );
 281+ $tooltip = $this->skin->titleAttrib( "p-$bar" );
 282+ if ( $tooltip !== false ) {
 283+ $portletAttribs['title'] = $tooltip;
 284+ }
 285+ echo ' ' . Html::openElement( 'div', $portletAttribs );
276286 ?>
277 - <div class='generated-sidebar portlet' id='<?php echo Sanitizer::escapeId( "p-$bar" ) ?>'<?php echo $this->skin->tooltip('p-'.$bar) ?>>
 287+
278288 <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo htmlspecialchars($bar); else echo htmlspecialchars($out); ?></h5>
279289 <div class='pBody'>
280290 <?php if ( is_array( $cont ) ) { ?>

Status & tagging log