New style allmessages table, remove some explicit background-colors
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Tue, 2 Aug 2005 22:15:48 +0000 (22:15 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Tue, 2 Aug 2005 22:15:48 +0000 (22:15 +0000)
includes/SpecialAllmessages.php
skins/common/common.css
skins/monobook/main.css

index 56e128f..91975a8 100644 (file)
@@ -96,12 +96,13 @@ function makeHTMLText( $messages ) {
        $mwnspace = $wgLang->getNsText( NS_MEDIAWIKI );
        $mwtalk = $wgLang->getNsText( NS_MEDIAWIKI_TALK );
        $txt = "
-
-       <table border='1' cellspacing='0' width='100%'>
-       <tr bgcolor='#b2b2ff'>
-               <th>" . wfMsg('allmessagesname') . "</th>
-               <th>" . wfMsg('allmessagesdefault') . "</th>
-               <th>" . wfMsg('allmessagescurrent')  . "</th>
+<table border='1' cellspacing='0' width='100%' id='allmessagestable'>
+       <tr >
+               <th rowspan='2'>" . wfMsgHtml('allmessagesname') . "</th>
+               <th>" . wfMsgHtml('allmessagesdefault') . "</th>
+       </tr>
+       <tr>
+               <th>" . wfMsgHtml('allmessagescurrent') . "</th>
        </tr>";
        
        wfProfileIn( "$fname-check" );
@@ -132,7 +133,7 @@ function makeHTMLText( $messages ) {
                $titleObj =& Title::makeTitle( NS_MEDIAWIKI, $title );
                $talkPage =& Title::makeTitle( NS_MEDIAWIKI_TALK, $title );
 
-               $colorIt = ($m['statmsg'] == $m['msg']) ? " bgcolor=\"#f0f0ff\"" : " bgcolor=\"#ffe2e2\"";
+               $changed = ($m['statmsg'] != $m['msg']);
                $message = htmlspecialchars( $m['statmsg'] );
                $mw = htmlspecialchars( $m['msg'] );
                
@@ -149,15 +150,32 @@ function makeHTMLText( $messages ) {
                        $talkLink = $sk->makeBrokenLinkObj( $talkPage, htmlspecialchars( $talk ) );
                }
 
-               $txt .= 
-               "<tr$colorIt><td>
-               $pageLink<br />
-               $talkLink
+               if($changed) {
+
+                       $txt .=
+       "<tr class='orig'>
+               <td rowspan='2'>
+                       $pageLink<br />$talkLink
                </td><td>
-               $message
+$message
+               </td>
+       </tr><tr class='new'>
+               <td>
+$mw
+               </td>
+       </tr>";
+               } else {
+
+                       $txt .=
+       "<tr class='def'>
+               <td>
+                       $pageLink<br />$talkLink
                </td><td>
-               $mw
-               </td></tr>";
+$mw
+               </td>
+       </tr>";
+
+               }
        }
        $txt .= "</table>";
        wfProfileOut( "$fname-output" );
index d73d139..3e9c305 100644 (file)
@@ -354,3 +354,22 @@ table.exif td.spacer {
        background-color: #eeeeff;
        padding: 0.2em;
 }
+
+/* Allmessages table */
+
+#allmessagestable th {
+       background-color: #b2b2ff;
+}
+
+#allmessagestable tr.orig {
+       background-color: #ffe2e2;
+}
+
+#allmessagestable tr.new {
+       background-color: #e2ffe2;
+}
+
+#allmessagestable tr.def {
+       background-color: #f0f0ff;
+}
+
index ff04c7d..ea2378d 100644 (file)
@@ -60,7 +60,6 @@ body {
 
 table {
     font-size: 100%;
-    background: white;
     color: black;
 }
 a {
@@ -164,7 +163,6 @@ fieldset {
     line-height: 1.5em;
 }
 legend {
-    background: white;
     padding: .5em;
     font-size: 95%;
 }
@@ -1187,3 +1185,23 @@ p.revision_saved {
        background-color: #eeeeff;
        padding: 0.2em;
 }
+
+
+/* Allmessages table */
+
+#allmessagestable th {
+       background-color: #b2b2ff;
+}
+
+#allmessagestable tr.orig {
+       background-color: #ffe2e2;
+}
+
+#allmessagestable tr.new {
+       background-color: #e2ffe2;
+}
+
+#allmessagestable tr.def {
+       background-color: #f0f0ff;
+}
+