http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94989
Revision: 94989
Author: devayon
Date: 2011-08-19 07:35:11 +0000 (Fri, 19 Aug 2011)
Log Message:
-----------
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:
trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php
===================================================================
---
trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php
2011-08-19 07:04:01 UTC (rev 94988)
+++
trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php
2011-08-19 07:35:11 UTC (rev 94989)
@@ -371,27 +371,11 @@
global $wgOut, $smwgScriptPath;
$this->setUrlArgs( array( 'q' =>
$this->uiCore->getQueryString() ) );
$result = '<div>' .
- Html::element( 'textarea', array( 'name' => 'q', 'id'
=> 'querybox' ),
- $this->uiCore->getQueryString() ) .
+ Html::element( 'textarea',
+ array( 'name' => 'q', 'id' => 'querybox',
'rows'=>'6' ),
+ $this->uiCore->getQueryString()
+ ) .
'</div>';
- $this->enableJQuery();
- $wgOut->addScriptFile(
"$smwgScriptPath/skins/elastic/jquery.elastic.source.js" );
-
- /*
- * Compatibity function for disabling elastic textboxes for IE.
This may
- * be removed when jQuery 1.4 or above is supported.
- */
- $javascript = <<<EOT
- jQuery( document ).ready( function(){
- if( jQuery.browser.msie ){
- jQuery( '#querybox' ).attr( 'rows',5 );
- } else {
- jQuery( '#querybox' ).elastic();
- jQuery( '#querybox' ).trigger( 'update' );
- }
- } );
-EOT;
- $wgOut->addInlineScript( $javascript );
return $result;
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs