r112002 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112001‎ | r112002 | r112003 >
Date:11:17, 21 February 2012
Author:nikerabbit
Status:ok
Tags:i18nreview 
Comment:
Just ids to find the elements, faster and less error prone
Modified paths:
  • /trunk/extensions/Translate/utils/MessageTable.php (modified) (history)
  • /trunk/extensions/Translate/utils/TranslationEditPage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/utils/MessageTable.php
@@ -148,6 +148,7 @@
149149 $tqeData = array(
150150 'data-title' => $title->getPrefixedText(),
151151 'data-group' => $this->group->getId(),
 152+ 'id' => 'tqe-anchor-' . substr( sha1( $title->getPrefixedText() ), 0, 12 ),
152153 );
153154
154155 $leftColumn = $this->getReviewButton( $m ) . $anchor . $tools['edit'] . $extra . $this->getReviewStatus( $m );
Index: trunk/extensions/Translate/utils/TranslationEditPage.php
@@ -194,7 +194,8 @@
195195 }
196196
197197 if ( $wgRequest->getVal( 'translate-beta' ) ) {
198 - $onclick = 'jQuery( this ).closest( ".inlineeditable" ).dblclick(); return false;';
 198+ $text = 'tqe-anchor-' . substr( sha1( $title->getPrefixedText() ), 0, 12 );
 199+ $onclick = "jQuery( '#$text' ).dblclick(); return false;";
199200 } else {
200201 $onclick = Xml::encodeJsCall(
201202 'return mw.translate.openDialog', array( $title->getPrefixedDbKey(), $group )

Status & tagging log