r93799 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93798‎ | r93799 | r93800 >
Date:05:56, 3 August 2011
Author:devayon
Status:deferred
Tags:
Comment:
Follow up: r93796 (style cleanup)
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php
@@ -158,7 +158,7 @@
159159 * @global string $smwgScriptPath
160160 * @global boolean $smwgJQueryUIIncluded
161161 */
162 - private function enableJQueryUI(){
 162+ private function enableJQueryUI() {
163163 global $wgOut, $smwgScriptPath, $smwgJQueryUIIncluded;
164164
165165 $wgOut->addExtensionStyle( "$smwgScriptPath/skins/jquery-ui/base/jquery.ui.all.css" );
@@ -341,20 +341,20 @@
342342 * @return string
343343 */
344344 protected function getQueryFormBox() {
345 - global $wgOut,$smwgScriptPath;
 345+ global $wgOut, $smwgScriptPath;
346346 $result = '<div>';
347 - $result .= Html::element( 'textarea', array( 'name' => 'q', 'id' => 'querybox'),
 347+ $result .= Html::element( 'textarea', array( 'name' => 'q', 'id' => 'querybox' ),
348348 $this->uiCore->getQueryString() );
349349 $result .= '</div>';
350350 $this->enableJQuery();
351 - $wgOut->addScriptFile("$smwgScriptPath/skins/elastic/jquery.elastic.source.js");
 351+ $wgOut->addScriptFile( "$smwgScriptPath/skins/elastic/jquery.elastic.source.js" );
352352 $javascript = <<<EOT
353353 jQuery(document).ready(function(){
354354 jQuery('#querybox').elastic();
355355 jQuery('#querybox').trigger('update');
356356 });
357357 EOT;
358 - $wgOut->addInlineScript($javascript);
 358+ $wgOut->addInlineScript( $javascript );
359359
360360 // TODO:enable/disable on checking for errors; perhaps show error messages right below the box
361361 return $result;
@@ -501,7 +501,6 @@
502502
503503 jQuery(function(){
504504 jQuery('$hidden').appendTo(document.body);
505 - });
506505 });
507506 var num_elements = {$num_sort_values};
508507
@@ -525,7 +524,7 @@
526525
527526 //Create 'delete' link
528527 var remove_button = document.createElement('span');
529 - remove_button.innerHTML = '[<a href="javascript:removePOInstance(\'sort_div_' + num_elements + '\')">{$delete_msg}</a>]';
 528+ remove_button.innerHTML = '[<a class="smwq-remove" href="javascript:removePOInstance(\'sort_div_' + num_elements + '\')">{$delete_msg}</a>]';
530529 new_div.appendChild(remove_button);
531530
532531 //Add the new instance
@@ -643,7 +642,7 @@
644643 if ( $order == 'DESC' ) $result .= 'selected="selected" ';
645644
646645 $result .= 'value="DESC">' . wfMsg( 'smw_ask_descorder' ) . "</option></select>\n";
647 - $result .= '[<a href="javascript:removeInstance(\'sort_div_' . $i . '\')">' . wfMsg( 'delete' ) . '</a>]' . "\n";
 646+ $result .= '[<a class="smwq-remove" href="javascript:removeInstance(\'sort_div_' . $i . '\')">' . wfMsg( 'delete' ) . '</a>]' . "\n";
648647 $result .= "</div>\n";
649648 }
650649

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93796Added auto re-sizing query text-areadevayon05:31, 3 August 2011