From 56133a04d1c5dcd4825f4c0c978b8a9336d603d0 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Sat, 16 Feb 2013 18:15:13 -0500 Subject: Fix width of indicator column. --- inc/DifferenceEngine.php | 10 +++++----- inc/html.php | 4 ++-- lib/tpl/default/design.css | 12 +++++++++++- lib/tpl/dokuwiki/css/_diff.css | 12 +++++++++++- 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index 1099f40eb..2125ad879 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -1151,7 +1151,7 @@ class InlineDiffFormatter extends DiffFormatter { $xbeg .= "," . $xlen; if ($ylen != 1) $ybeg .= "," . $ylen; - $r = '@@ '.$lang['line']." -$xbeg +$ybeg @@"; + $r = '@@ '.$lang['line']." -$xbeg +$ybeg @@"; $r .= ' '.$lang['deleted'].''; $r .= ' '.$lang['created'].''; $r .= "\n"; @@ -1170,19 +1170,19 @@ class InlineDiffFormatter extends DiffFormatter { function _added($lines) { foreach ($lines as $line) { - print('+'. $line . "\n"); + print('+'. $line . "\n"); } } function _deleted($lines) { foreach ($lines as $line) { - print('-' . $line . "\n"); + print('-' . $line . "\n"); } } function _context($lines) { foreach ($lines as $line) { - print(' '.$line."\n"); + print(' '.$line."\n"); } } @@ -1191,7 +1191,7 @@ class InlineDiffFormatter extends DiffFormatter { $add = $diff->inline(); foreach ($add as $line) - print('!'.$line."\n"); + print('!'.$line."\n"); } } diff --git a/inc/html.php b/inc/html.php index 420efd633..e657d2c78 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1209,12 +1209,12 @@ function html_diff($text='',$intro=true,$type=null){ - - diff --git a/lib/tpl/default/design.css b/lib/tpl/default/design.css index 3405ec258..4772fd2a5 100644 --- a/lib/tpl/default/design.css +++ b/lib/tpl/default/design.css @@ -632,7 +632,6 @@ div.dokuwiki td.diff-blockheader { div.dokuwiki table.diff th { border-bottom: 1px solid __border__; font-size: 110%; - width: 50%; font-weight: normal; text-align: left; } @@ -650,6 +649,17 @@ div.dokuwiki table.diff th span.sum { div.dokuwiki table.diff th.minor { font-style: italic; } +.dokuwiki table.diff_sidebyside th { + width: 50%; +} +.dokuwiki table.diff .diff-lineheader { + width: .7em; + text-align: right; +} +[dir=rtl] .dokuwiki table.diff .diff-lineheader { + text-align: left; +} +.dokuwiki table.diff .diff-lineheader, div.dokuwiki table.diff td { font-family: monospace; font-size: 100%; diff --git a/lib/tpl/dokuwiki/css/_diff.css b/lib/tpl/dokuwiki/css/_diff.css index 62f831213..58c24b5c7 100644 --- a/lib/tpl/dokuwiki/css/_diff.css +++ b/lib/tpl/dokuwiki/css/_diff.css @@ -21,7 +21,6 @@ .dokuwiki table.diff th { border-bottom: 1px solid __border__; font-size: 110%; - width: 50%; font-weight: normal; } .dokuwiki table.diff th a { @@ -37,8 +36,19 @@ .dokuwiki table.diff th.minor { color: #999; } +.dokuwiki table.diff_sidebyside th { + width: 50%; +} /* table body */ +.dokuwiki table.diff .diff-lineheader { + width: .7em; + text-align: right; +} +[dir=rtl] .dokuwiki table.diff .diff-lineheader { + text-align: left; +} +.dokuwiki table.diff .diff-lineheader, .dokuwiki table.diff td { font-family: Consolas, "Andale Mono WT", "Andale Mono", "Bitstream Vera Sans Mono", "Nimbus Mono L", Monaco, "Courier New", monospace; } -- cgit v1.2.3
---> + ->
+++> + +>