Index: trunk/phase3/skins/common/diff.css |
— | — | @@ -1,75 +0,0 @@ |
2 | | -/* |
3 | | -** Diff rendering |
4 | | -*/ |
5 | | -table.diff, td.diff-otitle, td.diff-ntitle { |
6 | | - background-color: white; |
7 | | -} |
8 | | -td.diff-otitle, |
9 | | -td.diff-ntitle { |
10 | | - text-align: center; |
11 | | -} |
12 | | -td.diff-marker { |
13 | | - text-align: right; |
14 | | -} |
15 | | -td.diff-lineno { |
16 | | - font-weight: bold; |
17 | | -} |
18 | | -td.diff-addedline { |
19 | | - background: #cfc; |
20 | | - font-size: smaller; |
21 | | -} |
22 | | -td.diff-deletedline { |
23 | | - background: #ffa; |
24 | | - font-size: smaller; |
25 | | -} |
26 | | -td.diff-context { |
27 | | - background: #eee; |
28 | | - font-size: smaller; |
29 | | -} |
30 | | -.diffchange { |
31 | | - color: red; |
32 | | - font-weight: bold; |
33 | | - text-decoration: none; |
34 | | - white-space: pre-wrap; |
35 | | - white-space: -moz-pre-wrap; |
36 | | -} |
37 | | - |
38 | | -table.diff { |
39 | | - border: none; |
40 | | - width: 98%; |
41 | | - border-spacing: 4px; |
42 | | - |
43 | | - /* Fixed layout is required to ensure that cells containing long URLs |
44 | | - don't widen in Safari, Internet Explorer, or iCab */ |
45 | | - table-layout: fixed; |
46 | | -} |
47 | | -table.diff td { |
48 | | - padding: 0; |
49 | | -} |
50 | | -table.diff col.diff-marker { |
51 | | - width: 2%; |
52 | | -} |
53 | | -table.diff col.diff-content { |
54 | | - width: 48%; |
55 | | -} |
56 | | -table.diff td div { |
57 | | - /* Force-wrap very long lines such as URLs or page-widening char strings. |
58 | | - CSS 3 only (In Gecko 1.9.1 / Firefox 3.5): |
59 | | - https://bugzilla.mozilla.org/show_bug.cgi?id=99457 |
60 | | - https://developer.mozilla.org/web-tech/2008/08/20/word-wrap-break-word/ |
61 | | - https://developer.mozilla.org/En/CSS/Word-wrap */ |
62 | | - word-wrap: break-word; |
63 | | - |
64 | | - /* As fallback, scrollbars will be added for very wide cells |
65 | | - instead of text overflowing or widening */ |
66 | | - overflow: auto; |
67 | | - |
68 | | - /* The above rule breaks on very old versions of Mozilla due |
69 | | - to a bug which collapses the table cells to a single line. |
70 | | - |
71 | | - In Mozilla 1.1 and below with JavaScript enabled, the rule |
72 | | - will be overridden with this by diff.js; wide cell contents |
73 | | - then spill horizontally without widening the rest of the |
74 | | - table: */ |
75 | | - /* overflow: visible; */ |
76 | | -} |
Index: trunk/phase3/includes/diff/DifferenceEngine.php |
— | — | @@ -660,7 +660,7 @@ |
661 | 661 | */ |
662 | 662 | function showDiffStyle() { |
663 | 663 | global $wgOut; |
664 | | - $wgOut->addModuleStyles( 'mediawiki.legacy.diff' ); |
| 664 | + $wgOut->addModuleStyles( 'mediawiki.action.history.diff' ); |
665 | 665 | } |
666 | 666 | |
667 | 667 | /** |
Index: trunk/phase3/resources/mediawiki.action/mediawiki.action.history.diff.css |
— | — | @@ -0,0 +1,60 @@ |
| 2 | +/* |
| 3 | +** Diff rendering |
| 4 | +*/ |
| 5 | +table.diff, td.diff-otitle, td.diff-ntitle { |
| 6 | + background-color: white; |
| 7 | +} |
| 8 | +td.diff-otitle, |
| 9 | +td.diff-ntitle { |
| 10 | + text-align: center; |
| 11 | +} |
| 12 | +td.diff-marker { |
| 13 | + text-align: right; |
| 14 | +} |
| 15 | +td.diff-lineno { |
| 16 | + font-weight: bold; |
| 17 | +} |
| 18 | +td.diff-addedline { |
| 19 | + background: #cfc; |
| 20 | + font-size: smaller; |
| 21 | +} |
| 22 | +td.diff-deletedline { |
| 23 | + background: #ffa; |
| 24 | + font-size: smaller; |
| 25 | +} |
| 26 | +td.diff-context { |
| 27 | + background: #eee; |
| 28 | + font-size: smaller; |
| 29 | +} |
| 30 | +.diffchange { |
| 31 | + color: red; |
| 32 | + font-weight: bold; |
| 33 | + white-space: -moz-pre-wrap; |
| 34 | + white-space: pre-wrap; |
| 35 | +} |
| 36 | + |
| 37 | +table.diff { |
| 38 | + border: none; |
| 39 | + width: 98%; |
| 40 | + border-spacing: 4px; |
| 41 | + |
| 42 | + /* Ensure that colums are of equal width */ |
| 43 | + table-layout: fixed; |
| 44 | +} |
| 45 | +table.diff td { |
| 46 | + padding: 0; |
| 47 | +} |
| 48 | +table.diff col.diff-marker { |
| 49 | + width: 2%; |
| 50 | +} |
| 51 | +table.diff col.diff-content { |
| 52 | + width: 48%; |
| 53 | +} |
| 54 | +table.diff td div { |
| 55 | + /* Force-wrap very long lines such as URLs or page-widening char strings.*/ |
| 56 | + word-wrap: break-word; |
| 57 | + |
| 58 | + /* As fallback (FF<3.5, Opera <10.5), scrollbars will be added for very wide cells |
| 59 | + instead of text overflowing or widening */ |
| 60 | + overflow: auto; |
| 61 | +} |
Property changes on: trunk/phase3/resources/mediawiki.action/mediawiki.action.history.diff.css |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 62 | + native |
Index: trunk/phase3/resources/Resources.php |
— | — | @@ -491,6 +491,10 @@ |
492 | 492 | 'dependencies' => 'jquery.ui.button', |
493 | 493 | 'group' => 'mediawiki.action.history', |
494 | 494 | ), |
| 495 | + 'mediawiki.action.history.diff' => array( |
| 496 | + 'styles' => 'resources/mediawiki.action/mediawiki.action.history.diff.css', |
| 497 | + 'group' => 'mediawiki.action.history', |
| 498 | + ), |
495 | 499 | 'mediawiki.action.edit' => array( |
496 | 500 | 'scripts' => 'resources/mediawiki.action/mediawiki.action.edit.js', |
497 | 501 | 'dependencies' => array( |
— | — | @@ -637,12 +641,6 @@ |
638 | 642 | 'localBasePath' => $GLOBALS['wgStyleDirectory'], |
639 | 643 | 'dependencies' => 'mediawiki.legacy.wikibits', |
640 | 644 | ), |
641 | | - 'mediawiki.legacy.diff' => array( |
642 | | - 'styles' => 'common/diff.css', |
643 | | - 'group' => 'mediawiki.action.history', |
644 | | - 'remoteBasePath' => $GLOBALS['wgStylePath'], |
645 | | - 'localBasePath' => $GLOBALS['wgStyleDirectory'], |
646 | | - ), |
647 | 645 | 'mediawiki.legacy.edit' => array( |
648 | 646 | 'scripts' => 'common/edit.js', |
649 | 647 | 'remoteBasePath' => $GLOBALS['wgStylePath'], |