Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv4180/phpwiki/lib
Modified Files:
diff.php
Log Message:
Moved some diff colouring to css. Appearance looks identical to previous non-css method of colouring in: IE5, Mozilla (and presumably NS6), iCab, Opera, OmniWeb.
Index: diff.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/diff.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** diff.php 2001/12/07 17:39:45 1.15
--- diff.php 2001/12/11 05:51:10 1.16
***************
*** 927,931 ****
{
$html = '';
! $prefix = Element('td', array('bgcolor' => '#cccccc', 'width' => "1%"), $prefix);
reset($lines);
while (list ($junk, $line) = each($lines))
--- 927,931 ----
{
$html = '';
! $prefix = Element('td', array('class' => 'diff-notation', 'width' => "1%"), $prefix);
reset($lines);
while (list ($junk, $line) = each($lines))
***************
*** 934,938 ****
$line = empty($line) ? ' ' : htmlspecialchars($line);
$html .= Element('tr', array('valign' => 'top'),
! $prefix . Element('td', array('bgcolor' => $color),
Element('tt', $line)));
}
--- 934,938 ----
$line = empty($line) ? ' ' : htmlspecialchars($line);
$html .= Element('tr', array('valign' => 'top'),
! $prefix . Element('td', array('class' => $color),
Element('tt', $line)));
}
***************
*** 950,956 ****
'a' => $this->adds_prefix,
'd' => $this->deletes_prefix);
! $color = array('c' => '#ffffff',
! 'a' => '#ffcccc',
! 'd' => '#ccffcc');
$diff = '';
--- 950,956 ----
'a' => $this->adds_prefix,
'd' => $this->deletes_prefix);
! $color = array('c' => 'diff-unchanged',
! 'a' => 'diff-added',
! 'd' => 'diff-deleted');
$diff = '';
***************
*** 959,969 ****
if (!empty($hunk['c']))
$diff .= $this->_emit_lines($hunk['c'],
! $this->context_prefix, '#ffffff');
if (!empty($hunk['d']))
$diff .= $this->_emit_lines($hunk['d'],
! $this->deletes_prefix, '#ccffcc');
if (!empty($hunk['a']))
$diff .= $this->_emit_lines($hunk['a'],
! $this->adds_prefix, '#ffcccc');
}
--- 959,969 ----
if (!empty($hunk['c']))
$diff .= $this->_emit_lines($hunk['c'],
! $this->context_prefix, 'diff-unchanged');
if (!empty($hunk['d']))
$diff .= $this->_emit_lines($hunk['d'],
! $this->deletes_prefix, 'diff-deleted');
if (!empty($hunk['a']))
$diff .= $this->_emit_lines($hunk['a'],
! $this->adds_prefix, 'diff-added');
}
|