r94989 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94988‎ | r94989 | r94990 >
Date:07:35, 19 August 2011
Author:devayon
Status:deferred
Tags:
Comment:
Removing elastic textareas. High CPU usage seen in Firefox 3.6.18 on Linux
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php
@@ -371,27 +371,11 @@
372372 global $wgOut, $smwgScriptPath;
373373 $this->setUrlArgs( array( 'q' => $this->uiCore->getQueryString() ) );
374374 $result = '<div>' .
375 - Html::element( 'textarea', array( 'name' => 'q', 'id' => 'querybox' ),
376 - $this->uiCore->getQueryString() ) .
 375+ Html::element( 'textarea',
 376+ array( 'name' => 'q', 'id' => 'querybox', 'rows'=>'6' ),
 377+ $this->uiCore->getQueryString()
 378+ ) .
377379 '</div>';
378 - $this->enableJQuery();
379 - $wgOut->addScriptFile( "$smwgScriptPath/skins/elastic/jquery.elastic.source.js" );
380 -
381 - /*
382 - * Compatibity function for disabling elastic textboxes for IE. This may
383 - * be removed when jQuery 1.4 or above is supported.
384 - */
385 - $javascript = <<<EOT
386 - jQuery( document ).ready( function(){
387 - if( jQuery.browser.msie ){
388 - jQuery( '#querybox' ).attr( 'rows',5 );
389 - } else {
390 - jQuery( '#querybox' ).elastic();
391 - jQuery( '#querybox' ).trigger( 'update' );
392 - }
393 - } );
394 -EOT;
395 - $wgOut->addInlineScript( $javascript );
396380 return $result;
397381 }
398382