Index: trunk/extensions/LuceneSearch.php |
— | — | @@ -43,7 +43,8 @@ |
44 | 44 | } |
45 | 45 | |
46 | 46 | function execute($par) { |
47 | | - global $wgRequest, $wgOut, $wgTitle, $wgContLang, $wgUser; |
| 47 | + global $wgRequest, $wgOut, $wgTitle, $wgContLang, $wgUser, |
| 48 | + $wgLuceneCSSPath; |
48 | 49 | |
49 | 50 | $this->setHeaders(); |
50 | 51 | |
— | — | @@ -77,6 +78,15 @@ |
78 | 79 | wfAbruptExit(); |
79 | 80 | } |
80 | 81 | |
| 82 | + $wgOut->addHTML($this->makeSuggestJS()); |
| 83 | + $wgOut->addLink(array( |
| 84 | + "rel" => "stylesheet", |
| 85 | + "type" => "text/css", |
| 86 | + "media" => "screen,projection", |
| 87 | + "href" => $wgLuceneCSSPath |
| 88 | + ) |
| 89 | + ); |
| 90 | + |
81 | 91 | $wgOut->addWikiText(wfMsg('searchresulttext')); |
82 | 92 | $wgOut->addHTML($this->showShortDialog($q)); |
83 | 93 | |
— | — | @@ -329,16 +339,16 @@ |
330 | 340 | $searchButton = '<input type="submit" name="searchx" value="' . |
331 | 341 | htmlspecialchars(wfMsg('powersearch')) . "\" />\n"; |
332 | 342 | $searchField = "<div><input type='text' id='lsearchbox' onkeyup=\"resultType()\" " |
333 | | - . "name=\"search\" value=\"" |
334 | | - . htmlspecialchars($term) ."\" style='width: 50%;margin-left: 25%' " |
| 343 | + . "style='margin-left: 25%; width: 50%' value=\"" |
| 344 | + . htmlspecialchars($term) ."\"" |
335 | 345 | . " autocomplete=\"off\" />\n" |
336 | 346 | . "<span id='loadStatus'></span>" |
337 | 347 | . $searchButton |
338 | 348 | . "<div id='results'></div></div>"; |
339 | 349 | |
340 | 350 | $ret = $searchField /*. $searchButton*/; |
341 | | - return $this->makeSuggestJS() |
342 | | - . "<form id=\"search\" method=\"get\" " |
| 351 | + return |
| 352 | + "<form id=\"search\" method=\"get\" " |
343 | 353 | . "action=\"$action\">\n<div>{$ret}</div>\n</form>\n"; |
344 | 354 | } |
345 | 355 | |
Index: trunk/extensions/lucenesearch.css |
— | — | @@ -0,0 +1,27 @@ |
| 2 | +#results { |
| 3 | + width: 49%; |
| 4 | + margin-left: 25%; |
| 5 | + border: 1px solid black; |
| 6 | + display: none; |
| 7 | + overflow: hidden; |
| 8 | + font: menu; |
| 9 | + color: WindowText; |
| 10 | +} |
| 11 | + |
| 12 | +#results a { |
| 13 | + display: block; |
| 14 | + text-decoration: none; |
| 15 | + color: WindowText; |
| 16 | + padding: 1px 3px; |
| 17 | +} |
| 18 | + |
| 19 | +#results a:hover { |
| 20 | + background-color: Highlight; |
| 21 | + color: HighlightText; |
| 22 | +} |
| 23 | + |
| 24 | +#lsearchbox input { |
| 25 | + width: 50%; |
| 26 | + margin-left: 25%; |
| 27 | +} |
| 28 | + |
Property changes on: trunk/extensions/lucenesearch.css |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 29 | + native |
Added: svn:keywords |
2 | 30 | + Author Date Id Revision |