Self-explanatory. Just like the search bar.
Version: 1.17.x
Severity: enhancement
MaxSem | |
Jul 2 2010, 2:52 PM |
F2361341: bugdingen.png | |
Aug 25 2015, 5:07 PM |
Self-explanatory. Just like the search bar.
Version: 1.17.x
Severity: enhancement
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Enable autocompletion for Special:ComparePages | mediawiki/core | master | +4 -0 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T50240 Implement autocompletion / search suggestion / auto-complete / autocomplete / auto-suggest throughout MediaWiki (tracking) | |||
Resolved | Southparkfan | T26235 Special:ComparePages should use AJAX suggestions |
The following patch worked for me:
diff --git a/includes/specials/SpecialComparePages.php b/includes/specials/SpecialComparePages.php index da1a54c..276a68d 100644 --- a/includes/specials/SpecialComparePages.php +++ b/includes/specials/SpecialComparePages.php @@ -49,11 +49,13 @@ class SpecialComparePages extends SpecialPage { public function execute( $par ) { $this->setHeaders(); $this->outputHeader(); + $this->getOutput()->addModules( 'mediawiki.searchSuggest' ); $form = new HTMLForm( array( 'Page1' => array( 'type' => 'text', 'name' => 'page1', + 'id' => 'searchInput', 'label-message' => 'compare-page1', 'size' => '40', 'section' => 'page1', @@ -70,6 +72,7 @@ class SpecialComparePages extends SpecialPage { 'Page2' => array( 'type' => 'text', 'name' => 'page2', + 'id' => 'searchInput', 'label-message' => 'compare-page2', 'size' => '40', 'section' => 'page2',
It, however shows up like this:
Do we want the "containing..." box to show up, and shouldn't the rest of the box be styled like mediawiki.userSuggest? mediawiki.userSuggest's box has a bigger font-size, for example. And - when I click on a name (e.g. "Meta:Administrators"), the browser refreshes the page completely (it puts the name in the correct box too, though).
Is there some alternative for mediawiki.searchSuggest that suits this?
You should use 'class' => 'mw-searchInput' instead of 'id' => 'searchInput' and it should be fine (see the code of Special:WhatLinksHere for an example). 'id' => 'searchInput' is reserved for the primary search box of the skin (top-right in Vector, sidebar in MonoBook, elsewhere in other skins) and, as you noticed, it provides some additional behaviors.
Change 234306 had a related patch set uploaded (by Southparkfan):
Enable autocompletion for Special:ComparePages