Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php |
— | — | @@ -141,7 +141,7 @@ |
142 | 142 | * @global boolean $smwgJQueryIncluded |
143 | 143 | */ |
144 | 144 | protected function enableJQuery() { |
145 | | - global $wgOut, $smwgJQueryIncluded; |
| 145 | + global $wgOut, $smwgJQueryIncluded, $smwgScriptPath; |
146 | 146 | if ( !$smwgJQueryIncluded ) { |
147 | 147 | $realFunction = array( 'OutputPage', 'includeJQuery' ); |
148 | 148 | if ( is_callable( $realFunction ) ) { |
— | — | @@ -351,11 +351,20 @@ |
352 | 352 | $result .= '</div>'; |
353 | 353 | $this->enableJQuery(); |
354 | 354 | $wgOut->addScriptFile( "$smwgScriptPath/skins/elastic/jquery.elastic.source.js" ); |
| 355 | + |
| 356 | + /* |
| 357 | + * Compatibity function for disabling elastic textboxes for IE. This may |
| 358 | + * be removed when jQuery 1.4 or above is supported. |
| 359 | + */ |
355 | 360 | $javascript = <<<EOT |
356 | | - jQuery(document).ready(function(){ |
357 | | -// jQuery('#querybox').elastic(); |
358 | | - jQuery('#querybox').trigger('update'); |
359 | | - }); |
| 361 | +jQuery(document).ready(function(){ |
| 362 | + if(jQuery.browser.msie){ |
| 363 | + jQuery('#querybox').attr('rows',5); |
| 364 | + } else { |
| 365 | + jQuery('#querybox').elastic(); |
| 366 | + jQuery('#querybox').trigger('update'); |
| 367 | + } |
| 368 | +}); |
360 | 369 | EOT; |
361 | 370 | $wgOut->addInlineScript( $javascript ); |
362 | 371 | |