r91088 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91087‎ | r91088 | r91089 >
Date:18:05, 29 June 2011
Author:brion
Status:deferred
Tags:
Comment:
Code review tweaks for MobileFrontend: fix relative paths on stylesheets, use $wgExtensionAssetsPath explicitly for a hardcoded image
Modified paths:
  • /trunk/extensions/MobileFrontend/stylesheets/android.css (modified) (history)
  • /trunk/extensions/MobileFrontend/stylesheets/blackberry.css (modified) (history)
  • /trunk/extensions/MobileFrontend/stylesheets/default.css (modified) (history)
  • /trunk/extensions/MobileFrontend/stylesheets/firefox.css (modified) (history)
  • /trunk/extensions/MobileFrontend/stylesheets/iphone.css (modified) (history)
  • /trunk/extensions/MobileFrontend/stylesheets/iphone2.css (modified) (history)
  • /trunk/extensions/MobileFrontend/stylesheets/nokia.css (modified) (history)
  • /trunk/extensions/MobileFrontend/stylesheets/operamini.css (modified) (history)
  • /trunk/extensions/MobileFrontend/stylesheets/palm_pre.css (modified) (history)
  • /trunk/extensions/MobileFrontend/stylesheets/psp.css (modified) (history)
  • /trunk/extensions/MobileFrontend/stylesheets/simple.css (modified) (history)
  • /trunk/extensions/MobileFrontend/stylesheets/webkit.css (modified) (history)
  • /trunk/extensions/MobileFrontend/stylesheets/webkit_old.css (modified) (history)
  • /trunk/extensions/MobileFrontend/views/layout/_search_webkit.html.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/stylesheets/simple.css
@@ -200,7 +200,7 @@
201201 vertical-align: middle; }
202202 #searchbox #goButton {
203203 border: 0;
204 - background: url(/extensions/MobileFrontend/images/s.gif) no-repeat top left;
 204+ background: url(images/s.gif) no-repeat top left;
205205 height: 25px;
206206 width: 27px; }
207207 #searchbox #searchField {
@@ -214,7 +214,7 @@
215215 #nav form, #nav button {
216216 display: inline-block; }
217217 #nav button {
218 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 218+ background: url(images/buttonbg.gif) no-repeat center;
219219 border: 0;
220220 height: 23px;
221221 width: 83px; }
@@ -222,7 +222,7 @@
223223 #disableButtons {
224224 text-align: center; }
225225 #disableButtons button {
226 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 226+ background: url(images/buttonbg.gif) no-repeat center;
227227 border: 0;
228228 height: 23px;
229229 width: 83px; }
Index: trunk/extensions/MobileFrontend/stylesheets/palm_pre.css
@@ -200,7 +200,7 @@
201201 vertical-align: middle; }
202202 #searchbox #goButton {
203203 border: 0;
204 - background: url(/extensions/MobileFrontend/images/s.gif) no-repeat top left;
 204+ background: url(images/s.gif) no-repeat top left;
205205 height: 25px;
206206 width: 27px; }
207207 #searchbox #searchField {
@@ -214,7 +214,7 @@
215215 #nav form, #nav button {
216216 display: inline-block; }
217217 #nav button {
218 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 218+ background: url(images/buttonbg.gif) no-repeat center;
219219 border: 0;
220220 height: 23px;
221221 width: 83px; }
@@ -222,7 +222,7 @@
223223 #disableButtons {
224224 text-align: center; }
225225 #disableButtons button {
226 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 226+ background: url(images/buttonbg.gif) no-repeat center;
227227 border: 0;
228228 height: 23px;
229229 width: 83px; }
Index: trunk/extensions/MobileFrontend/stylesheets/nokia.css
@@ -200,7 +200,7 @@
201201 vertical-align: middle; }
202202 #searchbox #goButton {
203203 border: 0;
204 - background: url(/extensions/MobileFrontend/images/s.gif) no-repeat top left;
 204+ background: url(images/s.gif) no-repeat top left;
205205 height: 25px;
206206 width: 27px; }
207207 #searchbox #searchField {
@@ -214,7 +214,7 @@
215215 #nav form, #nav button {
216216 display: inline-block; }
217217 #nav button {
218 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 218+ background: url(images/buttonbg.gif) no-repeat center;
219219 border: 0;
220220 height: 23px;
221221 width: 83px; }
@@ -222,7 +222,7 @@
223223 #disableButtons {
224224 text-align: center; }
225225 #disableButtons button {
226 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 226+ background: url(images/buttonbg.gif) no-repeat center;
227227 border: 0;
228228 height: 23px;
229229 width: 83px; }
Index: trunk/extensions/MobileFrontend/stylesheets/firefox.css
@@ -200,7 +200,7 @@
201201 vertical-align: middle; }
202202 #searchbox #goButton {
203203 border: 0;
204 - background: url(/extensions/MobileFrontend/images/s.gif) no-repeat top left;
 204+ background: url(images/s.gif) no-repeat top left;
205205 height: 25px;
206206 width: 27px; }
207207 #searchbox #searchField {
@@ -214,7 +214,7 @@
215215 #nav form, #nav button {
216216 display: inline-block; }
217217 #nav button {
218 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 218+ background: url(images/buttonbg.gif) no-repeat center;
219219 border: 0;
220220 height: 23px;
221221 width: 83px; }
@@ -222,7 +222,7 @@
223223 #disableButtons {
224224 text-align: center; }
225225 #disableButtons button {
226 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 226+ background: url(images/buttonbg.gif) no-repeat center;
227227 border: 0;
228228 height: 23px;
229229 width: 83px; }
Index: trunk/extensions/MobileFrontend/stylesheets/psp.css
@@ -200,7 +200,7 @@
201201 vertical-align: middle; }
202202 #searchbox #goButton {
203203 border: 0;
204 - background: url(/extensions/MobileFrontend/images/s.gif) no-repeat top left;
 204+ background: url(images/s.gif) no-repeat top left;
205205 height: 25px;
206206 width: 27px; }
207207 #searchbox #searchField {
@@ -214,7 +214,7 @@
215215 #nav form, #nav button {
216216 display: inline-block; }
217217 #nav button {
218 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 218+ background: url(images/buttonbg.gif) no-repeat center;
219219 border: 0;
220220 height: 23px;
221221 width: 83px; }
@@ -222,7 +222,7 @@
223223 #disableButtons {
224224 text-align: center; }
225225 #disableButtons button {
226 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 226+ background: url(images/buttonbg.gif) no-repeat center;
227227 border: 0;
228228 height: 23px;
229229 width: 83px; }
Index: trunk/extensions/MobileFrontend/stylesheets/iphone2.css
@@ -200,7 +200,7 @@
201201 vertical-align: middle; }
202202 #searchbox #goButton {
203203 border: 0;
204 - background: url(/extensions/MobileFrontend/images/s.gif) no-repeat top left;
 204+ background: url(images/s.gif) no-repeat top left;
205205 height: 25px;
206206 width: 27px; }
207207 #searchbox #searchField {
@@ -214,7 +214,7 @@
215215 #nav form, #nav button {
216216 display: inline-block; }
217217 #nav button {
218 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 218+ background: url(images/buttonbg.gif) no-repeat center;
219219 border: 0;
220220 height: 23px;
221221 width: 83px; }
@@ -222,7 +222,7 @@
223223 #disableButtons {
224224 text-align: center; }
225225 #disableButtons button {
226 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 226+ background: url(images/buttonbg.gif) no-repeat center;
227227 border: 0;
228228 height: 23px;
229229 width: 83px; }
Index: trunk/extensions/MobileFrontend/stylesheets/android.css
@@ -200,7 +200,7 @@
201201 vertical-align: middle; }
202202 #searchbox #goButton {
203203 border: 0;
204 - background: url(/extensions/MobileFrontend/images/s.gif) no-repeat top left;
 204+ background: url(images/s.gif) no-repeat top left;
205205 height: 25px;
206206 width: 27px; }
207207 #searchbox #searchField {
@@ -214,7 +214,7 @@
215215 #nav form, #nav button {
216216 display: inline-block; }
217217 #nav button {
218 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 218+ background: url(images/buttonbg.gif) no-repeat center;
219219 border: 0;
220220 height: 23px;
221221 width: 83px; }
@@ -222,7 +222,7 @@
223223 #disableButtons {
224224 text-align: center; }
225225 #disableButtons button {
226 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 226+ background: url(images/buttonbg.gif) no-repeat center;
227227 border: 0;
228228 height: 23px;
229229 width: 83px; }
Index: trunk/extensions/MobileFrontend/stylesheets/blackberry.css
@@ -203,7 +203,7 @@
204204 vertical-align: middle; }
205205 #searchbox #goButton {
206206 border: 0;
207 - background: url(/extensions/MobileFrontend/images/s.gif) no-repeat top left;
 207+ background: url(images/s.gif) no-repeat top left;
208208 height: 25px;
209209 width: 27px; }
210210 #searchbox #searchField {
@@ -217,7 +217,7 @@
218218 #nav form, #nav button {
219219 display: inline-block; }
220220 #nav button {
221 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 221+ background: url(images/buttonbg.gif) no-repeat center;
222222 border: 0;
223223 height: 23px;
224224 width: 83px; }
@@ -225,7 +225,7 @@
226226 #disableButtons {
227227 text-align: center; }
228228 #disableButtons button {
229 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 229+ background: url(images/buttonbg.gif) no-repeat center;
230230 border: 0;
231231 height: 23px;
232232 width: 83px; }
Index: trunk/extensions/MobileFrontend/stylesheets/iphone.css
@@ -200,7 +200,7 @@
201201 vertical-align: middle; }
202202 #searchbox #goButton {
203203 border: 0;
204 - background: url(/extensions/MobileFrontend/images/s.gif) no-repeat top left;
 204+ background: url(images/s.gif) no-repeat top left;
205205 height: 25px;
206206 width: 27px; }
207207 #searchbox #searchField {
@@ -214,7 +214,7 @@
215215 #nav form, #nav button {
216216 display: inline-block; }
217217 #nav button {
218 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 218+ background: url(images/buttonbg.gif) no-repeat center;
219219 border: 0;
220220 height: 23px;
221221 width: 83px; }
@@ -222,7 +222,7 @@
223223 #disableButtons {
224224 text-align: center; }
225225 #disableButtons button {
226 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 226+ background: url(images/buttonbg.gif) no-repeat center;
227227 border: 0;
228228 height: 23px;
229229 width: 83px; }
@@ -288,7 +288,7 @@
289289 vertical-align: middle; }
290290 #searchbox #goButton {
291291 border: 0;
292 - background: url(/extensions/MobileFrontend/images/s.gif) no-repeat top left;
 292+ background: url(images/s.gif) no-repeat top left;
293293 height: 25px;
294294 width: 27px; }
295295 #searchbox #searchField {
Index: trunk/extensions/MobileFrontend/stylesheets/operamini.css
@@ -200,7 +200,7 @@
201201 vertical-align: middle; }
202202 #searchbox #goButton {
203203 border: 0;
204 - background: url(/extensions/MobileFrontend/images/s.gif) no-repeat top left;
 204+ background: url(images/s.gif) no-repeat top left;
205205 height: 25px;
206206 width: 27px; }
207207 #searchbox #searchField {
@@ -214,7 +214,7 @@
215215 #nav form, #nav button {
216216 display: inline-block; }
217217 #nav button {
218 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 218+ background: url(images/buttonbg.gif) no-repeat center;
219219 border: 0;
220220 height: 23px;
221221 width: 83px; }
@@ -222,7 +222,7 @@
223223 #disableButtons {
224224 text-align: center; }
225225 #disableButtons button {
226 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 226+ background: url(images/buttonbg.gif) no-repeat center;
227227 border: 0;
228228 height: 23px;
229229 width: 83px; }
Index: trunk/extensions/MobileFrontend/stylesheets/webkit_old.css
@@ -200,7 +200,7 @@
201201 vertical-align: middle; }
202202 #searchbox #goButton {
203203 border: 0;
204 - background: url(/extensions/MobileFrontend/images/s.gif) no-repeat top left;
 204+ background: url(images/s.gif) no-repeat top left;
205205 height: 25px;
206206 width: 27px; }
207207 #searchbox #searchField {
@@ -214,7 +214,7 @@
215215 #nav form, #nav button {
216216 display: inline-block; }
217217 #nav button {
218 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 218+ background: url(images/buttonbg.gif) no-repeat center;
219219 border: 0;
220220 height: 23px;
221221 width: 83px; }
@@ -222,7 +222,7 @@
223223 #disableButtons {
224224 text-align: center; }
225225 #disableButtons button {
226 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 226+ background: url(images/buttonbg.gif) no-repeat center;
227227 border: 0;
228228 height: 23px;
229229 width: 83px; }
Index: trunk/extensions/MobileFrontend/stylesheets/default.css
@@ -200,7 +200,7 @@
201201 vertical-align: middle; }
202202 #searchbox #goButton {
203203 border: 0;
204 - background: url(/extensions/MobileFrontend/images/s.gif) no-repeat top left;
 204+ background: url(images/s.gif) no-repeat top left;
205205 height: 25px;
206206 width: 27px; }
207207 #searchbox #searchField {
@@ -214,7 +214,7 @@
215215 #nav form, #nav button {
216216 display: inline-block; }
217217 #nav button {
218 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 218+ background: url(images/buttonbg.gif) no-repeat center;
219219 border: 0;
220220 height: 23px;
221221 width: 83px; }
@@ -222,7 +222,7 @@
223223 #disableButtons {
224224 text-align: center; }
225225 #disableButtons button {
226 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 226+ background: url(images/buttonbg.gif) no-repeat center;
227227 border: 0;
228228 height: 23px;
229229 width: 83px; }
Index: trunk/extensions/MobileFrontend/stylesheets/webkit.css
@@ -200,7 +200,7 @@
201201 vertical-align: middle; }
202202 #searchbox #goButton {
203203 border: 0;
204 - background: url(/extensions/MobileFrontend/images/s.gif) no-repeat top left;
 204+ background: url(images/s.gif) no-repeat top left;
205205 height: 25px;
206206 width: 27px; }
207207 #searchbox #searchField {
@@ -214,7 +214,7 @@
215215 #nav form, #nav button {
216216 display: inline-block; }
217217 #nav button {
218 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 218+ background: url(images/buttonbg.gif) no-repeat center;
219219 border: 0;
220220 height: 23px;
221221 width: 83px; }
@@ -222,7 +222,7 @@
223223 #disableButtons {
224224 text-align: center; }
225225 #disableButtons button {
226 - background: url(/extensions/MobileFrontend/images/buttonbg.gif) no-repeat center;
 226+ background: url(images/buttonbg.gif) no-repeat center;
227227 border: 0;
228228 height: 23px;
229229 width: 83px; }
Index: trunk/extensions/MobileFrontend/views/layout/_search_webkit.html.php
@@ -1,4 +1,6 @@
22 <?php
 3+global $wgExtensionAssetsPath;
 4+
35 $searchField = (!empty($_GET['search'])) ? $_GET['search'] : '';
46
57 $mainPageUrl = self::$mainPageUrl;
@@ -7,7 +9,7 @@
810 $searchWebkitHtml = <<<EOD
911 <div id='header'>
1012 <div id='searchbox'>
11 - <img alt='W logo' id='logo' src='/extensions/MobileFrontend/images/w.gif' />
 13+ <img alt='W logo' id='logo' src='{$wgExtensionAssetsPath}/MobileFrontend/stylesheets/images/w.gif' />
1214 <form action='/index.php' class='search_bar' method='get'>
1315 <input type="hidden" value="Special:Search" name="title" />
1416 <input type="hidden" value="Search" name="fulltext" />

Status & tagging log