r6785 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r6784‎ | r6785 | r6786 >
Date:08:30, 23 December 2004
Author:kateturner
Status:old
Tags:
Comment:
use css file instead of style=
Modified paths:
  • /trunk/extensions/LuceneSearch.php (modified) (history)
  • /trunk/extensions/lucenesearch.css (added) (history)

Diff [purge]

Index: trunk/extensions/LuceneSearch.php
@@ -43,7 +43,8 @@
4444 }
4545
4646 function execute($par) {
47 - global $wgRequest, $wgOut, $wgTitle, $wgContLang, $wgUser;
 47+ global $wgRequest, $wgOut, $wgTitle, $wgContLang, $wgUser,
 48+ $wgLuceneCSSPath;
4849
4950 $this->setHeaders();
5051
@@ -77,6 +78,15 @@
7879 wfAbruptExit();
7980 }
8081
 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+
8191 $wgOut->addWikiText(wfMsg('searchresulttext'));
8292 $wgOut->addHTML($this->showShortDialog($q));
8393
@@ -329,16 +339,16 @@
330340 $searchButton = '<input type="submit" name="searchx" value="' .
331341 htmlspecialchars(wfMsg('powersearch')) . "\" />\n";
332342 $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) ."\""
335345 . " autocomplete=\"off\" />\n"
336346 . "<span id='loadStatus'></span>"
337347 . $searchButton
338348 . "<div id='results'></div></div>";
339349
340350 $ret = $searchField /*. $searchButton*/;
341 - return $this->makeSuggestJS()
342 - . "<form id=\"search\" method=\"get\" "
 351+ return
 352+ "<form id=\"search\" method=\"get\" "
343353 . "action=\"$action\">\n<div>{$ret}</div>\n</form>\n";
344354 }
345355
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
129 + native
Added: svn:keywords
230 + Author Date Id Revision

Status & tagging log