Index: trunk/extensions/CodeReview/CodeReview.php |
— | — | @@ -175,7 +175,8 @@ |
176 | 176 | $wgResourceModules['ext.codereview.overview'] = array( |
177 | 177 | 'scripts' => 'ext.codereview.overview.js', |
178 | 178 | 'styles' => 'ext.codereview.overview.css', |
179 | | - 'dependencies' => 'jquery.tipsy' |
| 179 | + 'dependencies' => 'jquery.tipsy', |
| 180 | + 'messages' => array( 'codereview-overview-title', 'codereview-overview-desc' ), |
180 | 181 | ) + $commonModuleInfo; |
181 | 182 | |
182 | 183 | // If you are running a closed svn, fill the following two lines with the username and password |
Index: trunk/extensions/CodeReview/CodeReview.i18n.php |
— | — | @@ -142,6 +142,9 @@ |
143 | 143 | |
144 | 144 | 'codereview-reply-link' => 'reply', |
145 | 145 | |
| 146 | + 'codereview-overview-title' => 'Overview', |
| 147 | + 'codereview-overview-desc' => 'Show a graphical overview of this list', |
| 148 | + |
146 | 149 | 'codereview-email-subj' => '[$1 $2]: New comment added', |
147 | 150 | 'codereview-email-body' => 'User "$1" posted a comment on $3. |
148 | 151 | |
Index: trunk/extensions/CodeReview/modules/ext.codereview.overview.css |
— | — | @@ -3,7 +3,7 @@ |
4 | 4 | padding: 2px; |
5 | 5 | min-width: 300px; |
6 | 6 | } |
7 | | -#overviewmap #overviewpop { |
| 7 | +#overviewpop { |
8 | 8 | padding: 3px; |
9 | 9 | border: 1px solid black; |
10 | 10 | position: absolute; |
— | — | @@ -32,38 +32,6 @@ |
33 | 33 | clear: both; |
34 | 34 | } |
35 | 35 | |
36 | | -/** Revision statuses **/ |
37 | | -.box-status-new { |
38 | | - background: #ffffc0 !important; |
39 | | -} |
40 | | -.box-status-new:hover { |
41 | | - background: #dfdfa0 !important; |
42 | | -} |
43 | | -.box-status-fixme { |
44 | | - background: #ff9999 !important; |
45 | | -} |
46 | | -.box-status-fixme:hover { |
47 | | - background: #df0000 !important; |
48 | | -} |
49 | | -.box-status-resolved { |
50 | | - background: #b0eeb0 !important; |
51 | | -} |
52 | | -.box-status-resolved:hover { |
53 | | - background: #80ff80 !important; |
54 | | -} |
55 | | -.box-status-reverted { |
56 | | - background: #bbddee !important; |
57 | | -} |
58 | | -.box-status-reverted:hover { |
59 | | - background: #66bbff !important; |
60 | | -} |
61 | | -.box-status-deferred { |
62 | | - background: #dddddd !important; |
63 | | -} |
64 | | -.box-status-deferred:hover { |
65 | | - background: #aaaaaa !important; |
66 | | -} |
67 | | - |
68 | 36 | table.TablePager tr:target { |
69 | 37 | font-weight: bold; |
70 | 38 | } |
— | — | @@ -75,4 +43,4 @@ |
76 | 44 | |
77 | 45 | tr:target .overview-backlink { |
78 | 46 | display: inline; |
79 | | -} |
| 47 | +} |
\ No newline at end of file |
Index: trunk/extensions/CodeReview/modules/ext.codereview.overview.js |
— | — | @@ -15,11 +15,9 @@ |
16 | 16 | mw.util.addPortletLink( |
17 | 17 | portlet, |
18 | 18 | '#', |
19 | | - 'Overview', |
| 19 | + mw.msg( 'codereview-overview-title' ), |
20 | 20 | 'ca-scapmap', |
21 | | - 'Show a graphical overview of this list.', |
22 | | - '1', |
23 | | - '' // Nextnode, needs to be defined but we actually don't care |
| 21 | + mw.msg( 'codereview-overview-desc' ) |
24 | 22 | ); |
25 | 23 | } |
26 | 24 | |
— | — | @@ -43,9 +41,11 @@ |
44 | 42 | $tr.each( function( i ){ |
45 | 43 | var status = false; |
46 | 44 | |
47 | | - var trc = $(this).attr( 'class' ).split(' '); |
48 | | - if( !trc.length ) { |
| 45 | + var trc = $(this).attr( 'class' ); |
| 46 | + if( !trc || !trc.length ) { |
49 | 47 | return; |
| 48 | + } else { |
| 49 | + trc = trc.split( ' ' ); |
50 | 50 | } |
51 | 51 | for( var j = 0; j < trc.length; j++ ) { |
52 | 52 | if( trc[j].substring( 0, 21 ) == 'mw-codereview-status-' ) { |
— | — | @@ -78,7 +78,6 @@ |
79 | 79 | if( !totals[statusname] ) { |
80 | 80 | totals[statusname] = 0; |
81 | 81 | } |
82 | | - |
83 | 82 | totals[statusname]++; |
84 | 83 | |
85 | 84 | $(this).attr( 'id', 'TablePager-row-' + rev ); |
— | — | @@ -86,7 +85,7 @@ |
87 | 86 | $td.filter( '.TablePager_col_selectforchange' ) |
88 | 87 | .append( $( '<a href="#box-' + i + '" class="overview-backlink">^</a>' ) ); |
89 | 88 | |
90 | | - var $box = $( '<a href="#TablePager-row-' + rev + '" class="box-status-' + status + '" id="box-' + i + '"> </a>' ); |
| 89 | + var $box = $( '<a href="#TablePager-row-' + rev + '" class="mw-codereview-status-' + status + '" id="box-' + i + '"> </a>' ); |
91 | 90 | $( '#overviewmap' ).append( $box ); |
92 | 91 | }); |
93 | 92 | |