$filePrefix = $wgContLang->getFormattedNsText(NS_FILE).':';
if( trim( $term ) === '' || $filePrefix === trim( $term ) ) {
- $wgOut->addHTML( $this->searchFocus() );
$wgOut->addHTML( $this->formHeader($term, 0, 0));
if( $this->searchAdvanced ) {
$wgOut->addHTML( $this->powerSearchBox( $term ) );
$this->showCreateLink( $t );
}
$wgOut->addHtml( "</div>" );
- if( $num === 0 ) {
- $wgOut->addHTML( $this->searchFocus() );
- }
if( $num || $this->offset ) {
$wgOut->addHTML( "<p class='mw-search-pager-bottom'>{$prevnext}</p>\n" );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
// add javascript specific to special:search
$wgOut->addModules( 'mediawiki.legacy.search' );
-
- // Bug #16886: Sister projects box moves down the first extract on IE7
- $wgOut->addStyle( 'common/IE70Fixes.css', 'screen', 'IE 7' );
+ $wgOut->addModules( 'mediawiki.specials.search' );
}
/**
Xml::hidden( 'fulltext', 'Advanced search' ) .
Xml::closeElement( 'fieldset' );
}
-
- protected function searchFocus() {
- $id = $this->searchAdvanced ? 'powerSearchText' : 'searchText';
- return Html::inlineScript(
- "hookEvent(\"load\", function() {" .
- "document.getElementById('$id').focus();" .
- "});" );
- }
protected function getSearchProfiles() {
// Builds list of Search Types (profiles)
'mediawiki.specials.preferences' => new ResourceLoaderFileModule( array(
'scripts' => 'resources/mediawiki/mediawiki.specials.preferences.js',
) ),
+ 'mediawiki.specials.search' => new ResourceLoaderFileModule( array(
+ 'scripts' => 'resources/mediawiki/mediawiki.specials.search.js',
+ ) ),
/* MediaWiki Legacy */
) ),
'mediawiki.legacy.search' => new ResourceLoaderFileModule( array(
'scripts' => 'skins/common/search.js',
+ 'styles' => 'skins/common/search.css',
'dependencies' => 'mediawiki.legacy.wikibits',
) ),
'mediawiki.legacy.shared' => new ResourceLoaderFileModule( array(
+++ /dev/null
-/**
- * Fixes sister projects box moving down the extract
- * of the first result (bug #16886).
- * It only happens when the window is small and
- * This changes slightly the layout for big screens
- * where there was space for the extracts and the
- * sister projects and thus it showed like in any
- * other browser.
- */
-.searchresult {
- display: inline;
-}
--- /dev/null
+/**
+ * Fixes sister projects box moving down the extract
+ * of the first result (bug #16886).
+ * It only happens when the window is small and
+ * This changes slightly the layout for big screens
+ * where there was space for the extracts and the
+ * sister projects and thus it showed like in any
+ * other browser.
+ *
+ * This will only affect IE 7 and lower
+ */
+html > body .searchresult {
+ display: inline;
+}