The setup code was using a MonoBook-specific div ID to insert the results container into. Swapped that for the plain ol' document.body and fixed the styles for MonoBook and Modern so it gets the scale-up fix for the font size (they both use a weird system where they shrink the font size on the body, then scale it back up inside.... very wtf territory!)
Added setup for form and input IDs used for the second search box on Cologne Blue, and copied those IDs over to Nostalgia and Classic skins.
Note that the drop-down is a bit unsatisfactory on the page-bottom search boxes in Nostalgia, Classic, and Cologne Blue, as it tries to squish in at the bottom of the page, and you only get two lines of data. The sidebar search boxes are also not very wide, which makes results pretty cramped.
* (bug 13796) Show links to parent pages even if some of them are missing
* (bug 13816) Filter by main namespace doesn't work on WhatLinksHere
* (bug 13822) Fatal error on some pages when calculating subpage subtitle
* (bug 13796) Show links to parent pages even if some of them are missing
* (bug 13816) Filter by main namespace doesn't work on WhatLinksHere
* (bug 13822) Fatal error on some pages when calculating subpage subtitle
+* (bug 13824) AJAX search suggestion now works with non-SkinTemplate skins
+
=== API changes in 1.13 ===
=== API changes in 1.13 ===
* to ensure that client-side caches don't keep obsolete copies of global
* styles.
*/
* to ensure that client-side caches don't keep obsolete copies of global
* styles.
*/
-$wgStyleVersion = '138';
+$wgStyleVersion = '139';
* @private
*/
var $mWatchLinkNum = 0; // Appended to end of watch link id's
* @private
*/
var $mWatchLinkNum = 0; // Appended to end of watch link id's
+ // How many search boxes have we made? Avoid duplicate id's.
+ protected $searchboxes = '';
/**#@-*/
protected $mRevisionId; // The revision ID we're looking at, null if not applicable.
protected $skinname = 'standard' ;
/**#@-*/
protected $mRevisionId; // The revision ID we're looking at, null if not applicable.
protected $skinname = 'standard' ;
global $wgRequest;
$search = $wgRequest->getText( 'search' );
global $wgRequest;
$search = $wgRequest->getText( 'search' );
- $s = '<form name="search" class="inline" method="post" action="'
+ $s = '<form id="searchform'.$this->searchboxes.'" name="search" class="inline" method="post" action="'
. $this->escapeSearchLink() . "\">\n"
. $this->escapeSearchLink() . "\">\n"
- . '<input type="text" name="search" size="19" value="'
+ . '<input type="text" id="searchInput'.$this->searchboxes.'" name="search" size="19" value="'
. htmlspecialchars(substr($search,0,256)) . "\" />\n"
. '<input type="submit" name="go" value="' . wfMsg ('searcharticle') . '" /> '
. '<input type="submit" name="fulltext" value="' . wfMsg ('searchbutton') . "\" />\n</form>";
. htmlspecialchars(substr($search,0,256)) . "\" />\n"
. '<input type="submit" name="go" value="' . wfMsg ('searcharticle') . '" /> '
. '<input type="submit" name="fulltext" value="' . wfMsg ('searchbutton') . "\" />\n</form>";
+ // Ensure unique id's for search boxes made after the first
+ $this->searchboxes = $this->searchboxes == '' ? 2 : $this->searchboxes + 1;
+
*/
class SkinCologneBlue extends Skin {
*/
class SkinCologneBlue extends Skin {
- private $searchboxes = '';
- // How many search boxes have we made? Avoid duplicate id's.
-
function getStylesheet() {
return 'common/cologneblue.css';
}
function getStylesheet() {
return 'common/cologneblue.css';
}
// delay between keypress and suggestion (in ms)
var os_search_timeout = 250;
// these pairs of inputs/forms will be autoloaded at startup
// delay between keypress and suggestion (in ms)
var os_search_timeout = 250;
// these pairs of inputs/forms will be autoloaded at startup
-var os_autoload_inputs = new Array('searchInput', 'powerSearchText', 'searchText');
-var os_autoload_forms = new Array('searchform', 'powersearch', 'search' );
+var os_autoload_inputs = new Array('searchInput', 'searchInput2', 'powerSearchText', 'searchText');
+var os_autoload_forms = new Array('searchform', 'searchform2', 'powersearch', 'search' );
// if we stopped the service
var os_is_stopped = false;
// max lines to show in suggest table
// if we stopped the service
var os_is_stopped = false;
// max lines to show in suggest table
var pos = os_getElementPosition(r.searchbox);
var left = pos.left;
var top = pos.top + s.offsetHeight;
var pos = os_getElementPosition(r.searchbox);
var left = pos.left;
var top = pos.top + s.offsetHeight;
- var body = document.getElementById("globalWrapper");
c.className = "os-suggest";
c.setAttribute("id", r.container);
c.className = "os-suggest";
c.setAttribute("id", r.container);
+ document.body.appendChild(c);
// dynamically generated style params
// IE workaround, cannot explicitely set "style" attribute
// dynamically generated style params
// IE workaround, cannot explicitely set "style" attribute
+#mw_header,
+.os-suggest {
+/* God-damned hack for the crappy layout */
+.os-suggest {
+ font-size: 127%;
+}