r94500 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94499‎ | r94500 | r94501 >
Date:11:09, 15 August 2011
Author:devayon
Status:deferred
Tags:
Comment:
follow-up r94497
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php
@@ -141,7 +141,7 @@
142142 * @global boolean $smwgJQueryIncluded
143143 */
144144 protected function enableJQuery() {
145 - global $wgOut, $smwgJQueryIncluded;
 145+ global $wgOut, $smwgJQueryIncluded, $smwgScriptPath;
146146 if ( !$smwgJQueryIncluded ) {
147147 $realFunction = array( 'OutputPage', 'includeJQuery' );
148148 if ( is_callable( $realFunction ) ) {
@@ -351,11 +351,20 @@
352352 $result .= '</div>';
353353 $this->enableJQuery();
354354 $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+ */
355360 $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+});
360369 EOT;
361370 $wgOut->addInlineScript( $javascript );
362371

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r94497minor JS-fix for IEdevayon10:06, 15 August 2011