Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php |
— | — | @@ -158,7 +158,7 @@ |
159 | 159 | * @global string $smwgScriptPath |
160 | 160 | * @global boolean $smwgJQueryUIIncluded |
161 | 161 | */ |
162 | | - private function enableJQueryUI(){ |
| 162 | + private function enableJQueryUI() { |
163 | 163 | global $wgOut, $smwgScriptPath, $smwgJQueryUIIncluded; |
164 | 164 | |
165 | 165 | $wgOut->addExtensionStyle( "$smwgScriptPath/skins/jquery-ui/base/jquery.ui.all.css" ); |
— | — | @@ -341,20 +341,20 @@ |
342 | 342 | * @return string |
343 | 343 | */ |
344 | 344 | protected function getQueryFormBox() { |
345 | | - global $wgOut,$smwgScriptPath; |
| 345 | + global $wgOut, $smwgScriptPath; |
346 | 346 | $result = '<div>'; |
347 | | - $result .= Html::element( 'textarea', array( 'name' => 'q', 'id' => 'querybox'), |
| 347 | + $result .= Html::element( 'textarea', array( 'name' => 'q', 'id' => 'querybox' ), |
348 | 348 | $this->uiCore->getQueryString() ); |
349 | 349 | $result .= '</div>'; |
350 | 350 | $this->enableJQuery(); |
351 | | - $wgOut->addScriptFile("$smwgScriptPath/skins/elastic/jquery.elastic.source.js"); |
| 351 | + $wgOut->addScriptFile( "$smwgScriptPath/skins/elastic/jquery.elastic.source.js" ); |
352 | 352 | $javascript = <<<EOT |
353 | 353 | jQuery(document).ready(function(){ |
354 | 354 | jQuery('#querybox').elastic(); |
355 | 355 | jQuery('#querybox').trigger('update'); |
356 | 356 | }); |
357 | 357 | EOT; |
358 | | - $wgOut->addInlineScript($javascript); |
| 358 | + $wgOut->addInlineScript( $javascript ); |
359 | 359 | |
360 | 360 | // TODO:enable/disable on checking for errors; perhaps show error messages right below the box |
361 | 361 | return $result; |
— | — | @@ -501,7 +501,6 @@ |
502 | 502 | |
503 | 503 | jQuery(function(){ |
504 | 504 | jQuery('$hidden').appendTo(document.body); |
505 | | - }); |
506 | 505 | }); |
507 | 506 | var num_elements = {$num_sort_values}; |
508 | 507 | |
— | — | @@ -525,7 +524,7 @@ |
526 | 525 | |
527 | 526 | //Create 'delete' link |
528 | 527 | 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>]'; |
530 | 529 | new_div.appendChild(remove_button); |
531 | 530 | |
532 | 531 | //Add the new instance |
— | — | @@ -643,7 +642,7 @@ |
644 | 643 | if ( $order == 'DESC' ) $result .= 'selected="selected" '; |
645 | 644 | |
646 | 645 | $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"; |
648 | 647 | $result .= "</div>\n"; |
649 | 648 | } |
650 | 649 | |