Index: branches/wmf/1.17wmf1/extensions/CodeReview/CodeReview.php |
— | — | @@ -141,10 +141,13 @@ |
142 | 142 | |
143 | 143 | // Styles and any code common to all Special:Code subviews: |
144 | 144 | $wgResourceModules['ext.codereview'] = array( |
145 | | - 'styles' => 'ext.codereview.css', |
146 | 145 | 'scripts' => 'ext.codereview.js', |
147 | 146 | ) + $commonModuleInfo; |
148 | 147 | |
| 148 | +$wgResourceModules['ext.codereview.styles'] = array( |
| 149 | + 'styles' => 'ext.codereview.styles.css', |
| 150 | +) + $commonModuleInfo; |
| 151 | + |
149 | 152 | // On-demand diff loader for CodeRevisionView: |
150 | 153 | $wgResourceModules['ext.codereview.loaddiff'] = array( |
151 | 154 | 'scripts' => 'ext.codereview.loaddiff.js' |
Index: branches/wmf/1.17wmf1/extensions/CodeReview/backend/Subversion.php |
— | — | @@ -188,7 +188,7 @@ |
189 | 189 | $formats = array( |
190 | 190 | 'rev' => '/^r(\d+)$/', |
191 | 191 | 'author' => '/^(.*)$/', |
192 | | - 'date' => '/^(.*?) \(.*\)$/', |
| 192 | + 'date' => '/^(?:(.*?) )?\(.*\)$/', // account for '(no date)' |
193 | 193 | 'lines' => '/^(\d+) lines?$/', |
194 | 194 | ); |
195 | 195 | $state = "start"; |
Property changes on: branches/wmf/1.17wmf1/extensions/CodeReview/backend/Subversion.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
196 | 196 | Merged /branches/new-installer/phase3/extensions/CodeReview/backend/Subversion.php:r43664-66004 |
197 | 197 | Merged /branches/wmf-deployment/extensions/CodeReview/backend/Subversion.php:r60970 |
198 | 198 | Merged /branches/REL1_15/phase3/extensions/CodeReview/backend/Subversion.php:r51646 |
199 | 199 | Merged /branches/wmf/1.16wmf4/extensions/CodeReview/backend/Subversion.php:r67177,69199,76243,77266 |
200 | 200 | Merged /trunk/extensions/CodeReview/backend/Subversion.php:r77974-85970,86049,86477,87012 |
201 | 201 | Merged /branches/sqlite/extensions/CodeReview/backend/Subversion.php:r58211-58321 |
202 | 202 | Merged /trunk/phase3/extensions/CodeReview/backend/Subversion.php:r79828,79830,79848,79853,79950-79951,79954,79989,80006-80007,80013,80016,80080,80083,80124,80128,80238,81833,83212,83590 |
Index: branches/wmf/1.17wmf1/extensions/CodeReview/modules/ext.codereview.css |
— | — | @@ -1,192 +0,0 @@ |
2 | | -table.mw-codereview-meta td { |
3 | | - vertical-align: top; |
4 | | -} |
5 | | - |
6 | | -.mw-codereview-paths { |
7 | | - max-height:600px; |
8 | | - overflow:auto; |
9 | | -} |
10 | | - |
11 | | -.TablePager_col_comments { |
12 | | - text-align: center; |
13 | | -} |
14 | | -.TablePager_col_cr_message { |
15 | | - max-width: 20em; |
16 | | - overflow: hidden; |
17 | | -} |
18 | | - |
19 | | -.TablePager_col_cr_timestamp { |
20 | | - white-space: nowrap; |
21 | | -} |
22 | | - |
23 | | -.mw-codereview-comment { |
24 | | - border: solid 1px #aaaab3; |
25 | | - padding: 0; |
26 | | - background: #eee; |
27 | | - margin-bottom: 8px; |
28 | | -} |
29 | | - |
30 | | -.mw-codereview-imgdiff { |
31 | | - border: solid 1px #aaaab3; |
32 | | - padding: 1em; |
33 | | - background: #eee; |
34 | | -} |
35 | | - |
36 | | -.mw-codereview-comment-meta { |
37 | | - padding: 4px 8px; |
38 | | -} |
39 | | - |
40 | | -.mw-codereview-comment-text { |
41 | | - background: white; |
42 | | - padding: 16px; |
43 | | -} |
44 | | - |
45 | | -.mw-codereview-comment .mw-codereview-post-comment { |
46 | | - padding: 16px 16px 16px 48px; |
47 | | -} |
48 | | - |
49 | | -.mw-codereview-status-new, |
50 | | -.mw-codereview-status-new td { |
51 | | - background: #ffffc0 !important; |
52 | | -} |
53 | | - |
54 | | -.mw-codereview-status-new:hover, |
55 | | -.mw-codereview-status-new:hover td { |
56 | | - background: #dfdfa0 !important; |
57 | | -} |
58 | | - |
59 | | -.mw-codereview-status-fixme, |
60 | | -.mw-codereview-status-fixme td { |
61 | | - background: #ff9999 !important; |
62 | | -} |
63 | | -.mw-codereview-status-fixme:hover, |
64 | | -.mw-codereview-status-fixme:hover td { |
65 | | - background: #df0000 !important; |
66 | | - color: white; |
67 | | -} |
68 | | -.mw-codereview-status-fixme:hover a, |
69 | | -.mw-codereview-status-fixme:hover td a { |
70 | | - color: #ff0 !important; |
71 | | -} |
72 | | - |
73 | | -.mw-codereview-status-resolved, |
74 | | -.mw-codereview-status-resolved td { |
75 | | - background: #c0ffc0 !important; |
76 | | -} |
77 | | -.mw-codereview-status-resolved:hover, |
78 | | -.mw-codereview-status-resolved:hover td { |
79 | | - background: #a0dfa0 !important; |
80 | | -} |
81 | | - |
82 | | -.mw-codereview-status-reverted, |
83 | | -.mw-codereview-status-reverted td { |
84 | | - background: #ddd !important; |
85 | | - color: #666 !important; |
86 | | - text-decoration: line-through !important; |
87 | | -} |
88 | | -.mw-codereview-status-reverted:hover, |
89 | | -.mw-codereview-status-reverted:hover td { |
90 | | - background: #aaa !important; |
91 | | - text-decoration: line-through !important; |
92 | | -} |
93 | | -.mw-codereview-status-deferred, |
94 | | -.mw-codereview-status-deferred td { |
95 | | - color: #666; |
96 | | -} |
97 | | - |
98 | | -.mw-codereview-status-old, |
99 | | -.mw-codereview-status-old td { |
100 | | - color: #666; |
101 | | -} |
102 | | - |
103 | | -.mw-codereview-associateform { |
104 | | - float: right; |
105 | | -} |
106 | | - |
107 | | -.mw-codereview-signoffchecks { |
108 | | - float: right; |
109 | | -} |
110 | | - |
111 | | -.mw-codereview-struck td { |
112 | | - text-decoration: line-through; |
113 | | - background: #aaa; |
114 | | -} |
115 | | - |
116 | | -.mw-codereview-success { |
117 | | - color: #1a2; |
118 | | -} |
119 | | -.mw-codereview-fail { |
120 | | - color: #d21; |
121 | | -} |
122 | | - |
123 | | -/* Diffs */ |
124 | | -.mw-codereview-diff ins { |
125 | | - text-decoration: none; |
126 | | - color: green; |
127 | | -} |
128 | | - |
129 | | -.mw-codereview-diff del { |
130 | | - text-decoration: none; |
131 | | - color: red; |
132 | | -} |
133 | | - |
134 | | -.mw-codereview-diff .meta { |
135 | | - color: #008b8b; |
136 | | -} |
137 | | - |
138 | | -/* WordCloud for tag list view */ |
139 | | - |
140 | | -div.mw-wordcloud { |
141 | | - width: 100%; |
142 | | -} |
143 | | - |
144 | | -.mw-wordcloud-size-1, .mw-wordcloud-size-2, |
145 | | -.mw-wordcloud-size-3, .mw-wordcloud-size-4, |
146 | | -.mw-wordcloud-size-5, .mw-wordcloud-size-6, |
147 | | -.mw-wordcloud-size-7, .mw-wordcloud-size-8, |
148 | | -.mw-wordcloud-size-9, .mw-wordcloud-size-0 { |
149 | | - padding: 4px; |
150 | | - letter-spacing: 0.1em; |
151 | | -} |
152 | | - |
153 | | -a.mw-wordcloud-size-1 { |
154 | | - color: #222; |
155 | | - font-size: 240%; |
156 | | -} |
157 | | -a.mw-wordcloud-size-2 { |
158 | | - color: #333; |
159 | | - font-size:220%; |
160 | | -} |
161 | | -a.mw-wordcloud-size-3 { |
162 | | - color: #444; |
163 | | - font-size: 200%; |
164 | | -} |
165 | | -a.mw-wordcloud-size-4 { |
166 | | - color: #555; |
167 | | - font-size: 180%; |
168 | | -} |
169 | | -a.mw-wordcloud-size-5 { |
170 | | - color: #666; |
171 | | - font-size: 160%; |
172 | | -} |
173 | | -a.mw-wordcloud-size-6 { |
174 | | - color: #777; |
175 | | - font-size: 140%; |
176 | | -} |
177 | | -a.mw-wordcloud-size-7 { |
178 | | - color: #888; |
179 | | - font-size: 120%; |
180 | | -} |
181 | | -a.mw-wordcloud-size-8 { |
182 | | - color: #999; |
183 | | - font-size: 100%; |
184 | | -} |
185 | | -a.mw-wordcloud-size-9 { |
186 | | - color: #aaa; |
187 | | - font-size: 90%; |
188 | | -} |
189 | | -a.mw-wordcloud-size-10, |
190 | | -a.mw-wordcloud-size-0 { |
191 | | - color: #bbb; |
192 | | - font-size: 80%; |
193 | | -} |
Index: branches/wmf/1.17wmf1/extensions/CodeReview/modules/ext.codereview.tooltips.js |
— | — | @@ -1,5 +1,9 @@ |
2 | 2 | var CodeTooltipsInit = function() { |
3 | 3 | $( 'a[href]' ).each( function() { |
| 4 | + if ( $( this ).parent().is( '.TablePager_col_cr_id' ) ) { |
| 5 | + // Tooltips are unnecessary and annoying in revision lists |
| 6 | + return; |
| 7 | + } |
4 | 8 | var link = this.getAttribute( 'href' ); |
5 | 9 | if ( !link ) { |
6 | 10 | return; |
— | — | @@ -8,7 +12,8 @@ |
9 | 13 | if ( !matches ) { |
10 | 14 | return; |
11 | 15 | } |
12 | | - $( this ).mouseenter( function( e ) { |
| 16 | + |
| 17 | + function showTooltip() { |
13 | 18 | var $el = $( this ); |
14 | 19 | if ( $el.data('codeTooltip') ) { |
15 | 20 | return; // already processed |
— | — | @@ -35,11 +40,13 @@ |
36 | 41 | var text = rev['*'].length > 82 ? rev['*'].substr(0,80) + '...' : rev['*']; |
37 | 42 | text = text.replace( /</g, '<' ).replace( />/g, '>' ); |
38 | 43 | text = text.replace( /\n/g, '<br/>' ); |
| 44 | + var status = mw.html.escape( rev.status ); |
| 45 | + var author = mw.html.escape( rev.author ); |
39 | 46 | |
40 | | - var tip = '<div class="mw-codereview-status-' + rev.status + '" style="padding:5px 8px 4px; margin:-5px -8px -4px;">' |
| 47 | + var tip = '<div class="mw-codereview-status-' + status + '" style="padding:5px 8px 4px; margin:-5px -8px -4px;">' |
41 | 48 | + 'r' + matches[2] |
42 | | - + ' [' + rev.status + '] by ' |
43 | | - + rev.author |
| 49 | + + ' [' + status + '] by ' |
| 50 | + + author |
44 | 51 | + ( rev['*'] ? ' - ' + text : '' ) |
45 | 52 | + '</div>'; |
46 | 53 | $el.attr( 'title', tip ); |
— | — | @@ -49,11 +56,31 @@ |
50 | 57 | } |
51 | 58 | } |
52 | 59 | ); |
53 | | - }); |
| 60 | + } |
| 61 | + |
| 62 | + // We want to avoid doing API calls just because someone accidentally moves the mouse |
| 63 | + // over a link, so we only want to do an API call after the mouse has been on a link |
| 64 | + // for 250ms. |
| 65 | + $( this ).mouseenter( function( e ) { |
| 66 | + var that = this; |
| 67 | + var timerID = $( this ).data( 'codeTooltipTimer' ); |
| 68 | + if ( typeof timerID != 'undefined' ) { |
| 69 | + // Clear the running timer |
| 70 | + clearTimeout( timerID ); |
| 71 | + } |
| 72 | + timerID = setTimeout( function() { showTooltip.apply( that ); }, 250 ); |
| 73 | + $( this ).data( 'codeTooltipTimer', timerID ); |
| 74 | + } ); |
54 | 75 | // take care of cases when louse leaves our link while we load stuff from API. |
55 | 76 | // We shouldn't display the tooltip in such case. |
56 | 77 | $( this ).mouseleave( function( e ) { |
57 | 78 | var $el = $( this ); |
| 79 | + var timerID = $el.data( 'codeTooltipTimer' ); |
| 80 | + if ( typeof timerID != 'undefined' ) { |
| 81 | + // Clear the running timer |
| 82 | + clearTimeout( timerID ); |
| 83 | + } |
| 84 | + |
58 | 85 | if ( $el.data( 'codeTooltip' ) || !$el.data( 'codeTooltipLoading' ) ) { |
59 | 86 | return; |
60 | 87 | } |
Property changes on: branches/wmf/1.17wmf1/extensions/CodeReview/modules/ext.codereview.tooltips.js |
___________________________________________________________________ |
Added: svn:mergeinfo |
61 | 88 | Merged /branches/new-installer/phase3/extensions/CodeReview/modules/ext.codereview.tooltips.js:r43664-66004 |
62 | 89 | Merged /branches/wmf-deployment/extensions/CodeReview/modules/ext.codereview.tooltips.js:r60970 |
63 | 90 | Merged /branches/REL1_15/phase3/extensions/CodeReview/modules/ext.codereview.tooltips.js:r51646 |
64 | 91 | Merged /branches/wmf/1.16wmf4/extensions/CodeReview/modules/ext.codereview.tooltips.js:r67177,69199,76243,77266 |
65 | 92 | Merged /trunk/extensions/CodeReview/modules/ext.codereview.tooltips.js:r77974-85970,86049,86478-86479,87012 |
66 | 93 | Merged /branches/sqlite/extensions/CodeReview/modules/ext.codereview.tooltips.js:r58211-58321 |
67 | 94 | Merged /trunk/phase3/extensions/CodeReview/modules/ext.codereview.tooltips.js:r79828,79830,79848,79853,79950-79951,79954,79989,80006-80007,80013,80016,80080,80083,80124,80128,80238,81833,83212,83590 |
Index: branches/wmf/1.17wmf1/extensions/CodeReview/modules/ext.codereview.styles.css |
— | — | @@ -0,0 +1,193 @@ |
| 2 | +table.mw-codereview-meta td { |
| 3 | + vertical-align: top; |
| 4 | +} |
| 5 | + |
| 6 | +.mw-codereview-paths { |
| 7 | + max-height:600px; |
| 8 | + overflow:auto; |
| 9 | +} |
| 10 | + |
| 11 | +.TablePager_col_selectforchange, |
| 12 | +.TablePager_col_comments { |
| 13 | + text-align: center; |
| 14 | +} |
| 15 | +.TablePager_col_cr_message { |
| 16 | + max-width: 20em; |
| 17 | + overflow: hidden; |
| 18 | +} |
| 19 | + |
| 20 | +.TablePager_col_cr_timestamp { |
| 21 | + white-space: nowrap; |
| 22 | +} |
| 23 | + |
| 24 | +.mw-codereview-comment { |
| 25 | + border: solid 1px #aaaab3; |
| 26 | + padding: 0; |
| 27 | + background: #eee; |
| 28 | + margin-bottom: 8px; |
| 29 | +} |
| 30 | + |
| 31 | +.mw-codereview-imgdiff { |
| 32 | + border: solid 1px #aaaab3; |
| 33 | + padding: 1em; |
| 34 | + background: #eee; |
| 35 | +} |
| 36 | + |
| 37 | +.mw-codereview-comment-meta { |
| 38 | + padding: 4px 8px; |
| 39 | +} |
| 40 | + |
| 41 | +.mw-codereview-comment-text { |
| 42 | + background: white; |
| 43 | + padding: 16px; |
| 44 | +} |
| 45 | + |
| 46 | +.mw-codereview-comment .mw-codereview-post-comment { |
| 47 | + padding: 16px 16px 16px 48px; |
| 48 | +} |
| 49 | + |
| 50 | +.mw-codereview-status-new, |
| 51 | +.mw-codereview-status-new td { |
| 52 | + background: #ffffc0 !important; |
| 53 | +} |
| 54 | + |
| 55 | +.mw-codereview-status-new:hover, |
| 56 | +.mw-codereview-status-new:hover td { |
| 57 | + background: #dfdfa0 !important; |
| 58 | +} |
| 59 | + |
| 60 | +.mw-codereview-status-fixme, |
| 61 | +.mw-codereview-status-fixme td { |
| 62 | + background: #ff9999 !important; |
| 63 | +} |
| 64 | +.mw-codereview-status-fixme:hover, |
| 65 | +.mw-codereview-status-fixme:hover td { |
| 66 | + background: #df0000 !important; |
| 67 | + color: white; |
| 68 | +} |
| 69 | +.mw-codereview-status-fixme:hover a, |
| 70 | +.mw-codereview-status-fixme:hover td a { |
| 71 | + color: #ff0 !important; |
| 72 | +} |
| 73 | + |
| 74 | +.mw-codereview-status-resolved, |
| 75 | +.mw-codereview-status-resolved td { |
| 76 | + background: #c0ffc0 !important; |
| 77 | +} |
| 78 | +.mw-codereview-status-resolved:hover, |
| 79 | +.mw-codereview-status-resolved:hover td { |
| 80 | + background: #a0dfa0 !important; |
| 81 | +} |
| 82 | + |
| 83 | +.mw-codereview-status-reverted, |
| 84 | +.mw-codereview-status-reverted td { |
| 85 | + background: #ddd !important; |
| 86 | + color: #666 !important; |
| 87 | + text-decoration: line-through !important; |
| 88 | +} |
| 89 | +.mw-codereview-status-reverted:hover, |
| 90 | +.mw-codereview-status-reverted:hover td { |
| 91 | + background: #aaa !important; |
| 92 | + text-decoration: line-through !important; |
| 93 | +} |
| 94 | +.mw-codereview-status-deferred, |
| 95 | +.mw-codereview-status-deferred td { |
| 96 | + color: #666; |
| 97 | +} |
| 98 | + |
| 99 | +.mw-codereview-status-old, |
| 100 | +.mw-codereview-status-old td { |
| 101 | + color: #666; |
| 102 | +} |
| 103 | + |
| 104 | +.mw-codereview-associateform { |
| 105 | + float: right; |
| 106 | +} |
| 107 | + |
| 108 | +.mw-codereview-signoffchecks { |
| 109 | + float: right; |
| 110 | +} |
| 111 | + |
| 112 | +.mw-codereview-struck td { |
| 113 | + text-decoration: line-through; |
| 114 | + background: #aaa; |
| 115 | +} |
| 116 | + |
| 117 | +.mw-codereview-success { |
| 118 | + color: #1a2; |
| 119 | +} |
| 120 | +.mw-codereview-fail { |
| 121 | + color: #d21; |
| 122 | +} |
| 123 | + |
| 124 | +/* Diffs */ |
| 125 | +.mw-codereview-diff ins { |
| 126 | + text-decoration: none; |
| 127 | + color: green; |
| 128 | +} |
| 129 | + |
| 130 | +.mw-codereview-diff del { |
| 131 | + text-decoration: none; |
| 132 | + color: red; |
| 133 | +} |
| 134 | + |
| 135 | +.mw-codereview-diff .meta { |
| 136 | + color: #008b8b; |
| 137 | +} |
| 138 | + |
| 139 | +/* WordCloud for tag list view */ |
| 140 | + |
| 141 | +div.mw-wordcloud { |
| 142 | + width: 100%; |
| 143 | +} |
| 144 | + |
| 145 | +.mw-wordcloud-size-1, .mw-wordcloud-size-2, |
| 146 | +.mw-wordcloud-size-3, .mw-wordcloud-size-4, |
| 147 | +.mw-wordcloud-size-5, .mw-wordcloud-size-6, |
| 148 | +.mw-wordcloud-size-7, .mw-wordcloud-size-8, |
| 149 | +.mw-wordcloud-size-9, .mw-wordcloud-size-0 { |
| 150 | + padding: 4px; |
| 151 | + letter-spacing: 0.1em; |
| 152 | +} |
| 153 | + |
| 154 | +a.mw-wordcloud-size-1 { |
| 155 | + color: #222; |
| 156 | + font-size: 240%; |
| 157 | +} |
| 158 | +a.mw-wordcloud-size-2 { |
| 159 | + color: #333; |
| 160 | + font-size:220%; |
| 161 | +} |
| 162 | +a.mw-wordcloud-size-3 { |
| 163 | + color: #444; |
| 164 | + font-size: 200%; |
| 165 | +} |
| 166 | +a.mw-wordcloud-size-4 { |
| 167 | + color: #555; |
| 168 | + font-size: 180%; |
| 169 | +} |
| 170 | +a.mw-wordcloud-size-5 { |
| 171 | + color: #666; |
| 172 | + font-size: 160%; |
| 173 | +} |
| 174 | +a.mw-wordcloud-size-6 { |
| 175 | + color: #777; |
| 176 | + font-size: 140%; |
| 177 | +} |
| 178 | +a.mw-wordcloud-size-7 { |
| 179 | + color: #888; |
| 180 | + font-size: 120%; |
| 181 | +} |
| 182 | +a.mw-wordcloud-size-8 { |
| 183 | + color: #999; |
| 184 | + font-size: 100%; |
| 185 | +} |
| 186 | +a.mw-wordcloud-size-9 { |
| 187 | + color: #aaa; |
| 188 | + font-size: 90%; |
| 189 | +} |
| 190 | +a.mw-wordcloud-size-10, |
| 191 | +a.mw-wordcloud-size-0 { |
| 192 | + color: #bbb; |
| 193 | + font-size: 80%; |
| 194 | +} |
Property changes on: branches/wmf/1.17wmf1/extensions/CodeReview/modules/ext.codereview.styles.css |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 195 | + native |
Index: branches/wmf/1.17wmf1/extensions/CodeReview/ui/SpecialCode.php |
— | — | @@ -20,6 +20,7 @@ |
21 | 21 | // Base styles used for all code review UI actions. |
22 | 22 | $wgOut->addModules( 'ext.codereview' ); |
23 | 23 | $wgOut->addModules( 'ext.codereview.tooltips' ); |
| 24 | + $wgOut->addModuleStyles( 'ext.codereview.styles' ); |
24 | 25 | |
25 | 26 | $view = $this->getViewFrom( $subpage ); |
26 | 27 | if( $view ) { |
Property changes on: branches/wmf/1.17wmf1/extensions/CodeReview |
___________________________________________________________________ |
Modified: svn:mergeinfo |
27 | 28 | Merged /trunk/extensions/CodeReview:r87012 |