Show More
@@ -1,2202 +1,2206 b'' | |||||
1 | //Primary CSS |
|
1 | //Primary CSS | |
2 |
|
2 | |||
3 | //--- IMPORTS ------------------// |
|
3 | //--- IMPORTS ------------------// | |
4 |
|
4 | |||
5 | @import 'helpers'; |
|
5 | @import 'helpers'; | |
6 | @import 'mixins'; |
|
6 | @import 'mixins'; | |
7 | @import 'rcicons'; |
|
7 | @import 'rcicons'; | |
8 | @import 'fonts'; |
|
8 | @import 'fonts'; | |
9 | @import 'variables'; |
|
9 | @import 'variables'; | |
10 | @import 'bootstrap-variables'; |
|
10 | @import 'bootstrap-variables'; | |
11 | @import 'form-bootstrap'; |
|
11 | @import 'form-bootstrap'; | |
12 | @import 'codemirror'; |
|
12 | @import 'codemirror'; | |
13 | @import 'legacy_code_styles'; |
|
13 | @import 'legacy_code_styles'; | |
14 | @import 'progress-bar'; |
|
14 | @import 'progress-bar'; | |
15 |
|
15 | |||
16 | @import 'type'; |
|
16 | @import 'type'; | |
17 | @import 'alerts'; |
|
17 | @import 'alerts'; | |
18 | @import 'buttons'; |
|
18 | @import 'buttons'; | |
19 | @import 'tags'; |
|
19 | @import 'tags'; | |
20 | @import 'code-block'; |
|
20 | @import 'code-block'; | |
21 | @import 'examples'; |
|
21 | @import 'examples'; | |
22 | @import 'login'; |
|
22 | @import 'login'; | |
23 | @import 'main-content'; |
|
23 | @import 'main-content'; | |
24 | @import 'select2'; |
|
24 | @import 'select2'; | |
25 | @import 'comments'; |
|
25 | @import 'comments'; | |
26 | @import 'panels-bootstrap'; |
|
26 | @import 'panels-bootstrap'; | |
27 | @import 'panels'; |
|
27 | @import 'panels'; | |
28 | @import 'deform'; |
|
28 | @import 'deform'; | |
29 |
|
29 | |||
30 | //--- BASE ------------------// |
|
30 | //--- BASE ------------------// | |
31 | .noscript-error { |
|
31 | .noscript-error { | |
32 | top: 0; |
|
32 | top: 0; | |
33 | left: 0; |
|
33 | left: 0; | |
34 | width: 100%; |
|
34 | width: 100%; | |
35 | z-index: 101; |
|
35 | z-index: 101; | |
36 | text-align: center; |
|
36 | text-align: center; | |
37 | font-family: @text-semibold; |
|
37 | font-family: @text-semibold; | |
38 | font-size: 120%; |
|
38 | font-size: 120%; | |
39 | color: white; |
|
39 | color: white; | |
40 | background-color: @alert2; |
|
40 | background-color: @alert2; | |
41 | padding: 5px 0 5px 0; |
|
41 | padding: 5px 0 5px 0; | |
42 | } |
|
42 | } | |
43 |
|
43 | |||
44 | html { |
|
44 | html { | |
45 | display: table; |
|
45 | display: table; | |
46 | height: 100%; |
|
46 | height: 100%; | |
47 | width: 100%; |
|
47 | width: 100%; | |
48 | } |
|
48 | } | |
49 |
|
49 | |||
50 | body { |
|
50 | body { | |
51 | display: table-cell; |
|
51 | display: table-cell; | |
52 | width: 100%; |
|
52 | width: 100%; | |
53 | } |
|
53 | } | |
54 |
|
54 | |||
55 | //--- LAYOUT ------------------// |
|
55 | //--- LAYOUT ------------------// | |
56 |
|
56 | |||
57 | .hidden{ |
|
57 | .hidden{ | |
58 | display: none !important; |
|
58 | display: none !important; | |
59 | } |
|
59 | } | |
60 |
|
60 | |||
61 | .box{ |
|
61 | .box{ | |
62 | float: left; |
|
62 | float: left; | |
63 | width: 100%; |
|
63 | width: 100%; | |
64 | } |
|
64 | } | |
65 |
|
65 | |||
66 | .browser-header { |
|
66 | .browser-header { | |
67 | clear: both; |
|
67 | clear: both; | |
68 | } |
|
68 | } | |
69 | .main { |
|
69 | .main { | |
70 | clear: both; |
|
70 | clear: both; | |
71 | padding:0 0 @pagepadding; |
|
71 | padding:0 0 @pagepadding; | |
72 | height: auto; |
|
72 | height: auto; | |
73 |
|
73 | |||
74 | &:after { //clearfix |
|
74 | &:after { //clearfix | |
75 | content:""; |
|
75 | content:""; | |
76 | clear:both; |
|
76 | clear:both; | |
77 | width:100%; |
|
77 | width:100%; | |
78 | display:block; |
|
78 | display:block; | |
79 | } |
|
79 | } | |
80 | } |
|
80 | } | |
81 |
|
81 | |||
82 | .action-link{ |
|
82 | .action-link{ | |
83 | margin-left: @padding; |
|
83 | margin-left: @padding; | |
84 | padding-left: @padding; |
|
84 | padding-left: @padding; | |
85 | border-left: @border-thickness solid @border-default-color; |
|
85 | border-left: @border-thickness solid @border-default-color; | |
86 | } |
|
86 | } | |
87 |
|
87 | |||
88 | input + .action-link, .action-link.first{ |
|
88 | input + .action-link, .action-link.first{ | |
89 | border-left: none; |
|
89 | border-left: none; | |
90 | } |
|
90 | } | |
91 |
|
91 | |||
92 | .action-link.last{ |
|
92 | .action-link.last{ | |
93 | margin-right: @padding; |
|
93 | margin-right: @padding; | |
94 | padding-right: @padding; |
|
94 | padding-right: @padding; | |
95 | } |
|
95 | } | |
96 |
|
96 | |||
97 | .action-link.active, |
|
97 | .action-link.active, | |
98 | .action-link.active a{ |
|
98 | .action-link.active a{ | |
99 | color: @grey4; |
|
99 | color: @grey4; | |
100 | } |
|
100 | } | |
101 |
|
101 | |||
102 | ul.simple-list{ |
|
102 | ul.simple-list{ | |
103 | list-style: none; |
|
103 | list-style: none; | |
104 | margin: 0; |
|
104 | margin: 0; | |
105 | padding: 0; |
|
105 | padding: 0; | |
106 | } |
|
106 | } | |
107 |
|
107 | |||
108 | .main-content { |
|
108 | .main-content { | |
109 | padding-bottom: @pagepadding; |
|
109 | padding-bottom: @pagepadding; | |
110 | } |
|
110 | } | |
111 |
|
111 | |||
|
112 | .wide-mode-wrapper { | |||
|
113 | max-width:2400px !important; | |||
|
114 | } | |||
|
115 | ||||
112 | .wrapper { |
|
116 | .wrapper { | |
113 | position: relative; |
|
117 | position: relative; | |
114 | max-width: @wrapper-maxwidth; |
|
118 | max-width: @wrapper-maxwidth; | |
115 | margin: 0 auto; |
|
119 | margin: 0 auto; | |
116 | } |
|
120 | } | |
117 |
|
121 | |||
118 | #content { |
|
122 | #content { | |
119 | clear: both; |
|
123 | clear: both; | |
120 | padding: 0 @contentpadding; |
|
124 | padding: 0 @contentpadding; | |
121 | } |
|
125 | } | |
122 |
|
126 | |||
123 | .advanced-settings-fields{ |
|
127 | .advanced-settings-fields{ | |
124 | input{ |
|
128 | input{ | |
125 | margin-left: @textmargin; |
|
129 | margin-left: @textmargin; | |
126 | margin-right: @padding/2; |
|
130 | margin-right: @padding/2; | |
127 | } |
|
131 | } | |
128 | } |
|
132 | } | |
129 |
|
133 | |||
130 | .cs_files_title { |
|
134 | .cs_files_title { | |
131 | margin: @pagepadding 0 0; |
|
135 | margin: @pagepadding 0 0; | |
132 | } |
|
136 | } | |
133 |
|
137 | |||
134 | input.inline[type="file"] { |
|
138 | input.inline[type="file"] { | |
135 | display: inline; |
|
139 | display: inline; | |
136 | } |
|
140 | } | |
137 |
|
141 | |||
138 | .error_page { |
|
142 | .error_page { | |
139 | margin: 10% auto; |
|
143 | margin: 10% auto; | |
140 |
|
144 | |||
141 | h1 { |
|
145 | h1 { | |
142 | color: @grey2; |
|
146 | color: @grey2; | |
143 | } |
|
147 | } | |
144 |
|
148 | |||
145 | .alert { |
|
149 | .alert { | |
146 | margin: @padding 0; |
|
150 | margin: @padding 0; | |
147 | } |
|
151 | } | |
148 |
|
152 | |||
149 | .error-branding { |
|
153 | .error-branding { | |
150 | font-family: @text-semibold; |
|
154 | font-family: @text-semibold; | |
151 | color: @grey4; |
|
155 | color: @grey4; | |
152 | } |
|
156 | } | |
153 |
|
157 | |||
154 | .error_message { |
|
158 | .error_message { | |
155 | font-family: @text-regular; |
|
159 | font-family: @text-regular; | |
156 | } |
|
160 | } | |
157 |
|
161 | |||
158 | .sidebar { |
|
162 | .sidebar { | |
159 | min-height: 275px; |
|
163 | min-height: 275px; | |
160 | margin: 0; |
|
164 | margin: 0; | |
161 | padding: 0 0 @sidebarpadding @sidebarpadding; |
|
165 | padding: 0 0 @sidebarpadding @sidebarpadding; | |
162 | border: none; |
|
166 | border: none; | |
163 | } |
|
167 | } | |
164 |
|
168 | |||
165 | .main-content { |
|
169 | .main-content { | |
166 | position: relative; |
|
170 | position: relative; | |
167 | margin: 0 @sidebarpadding @sidebarpadding; |
|
171 | margin: 0 @sidebarpadding @sidebarpadding; | |
168 | padding: 0 0 0 @sidebarpadding; |
|
172 | padding: 0 0 0 @sidebarpadding; | |
169 | border-left: @border-thickness solid @grey5; |
|
173 | border-left: @border-thickness solid @grey5; | |
170 |
|
174 | |||
171 | @media (max-width:767px) { |
|
175 | @media (max-width:767px) { | |
172 | clear: both; |
|
176 | clear: both; | |
173 | width: 100%; |
|
177 | width: 100%; | |
174 | margin: 0; |
|
178 | margin: 0; | |
175 | border: none; |
|
179 | border: none; | |
176 | } |
|
180 | } | |
177 | } |
|
181 | } | |
178 |
|
182 | |||
179 | .inner-column { |
|
183 | .inner-column { | |
180 | float: left; |
|
184 | float: left; | |
181 | width: 29.75%; |
|
185 | width: 29.75%; | |
182 | min-height: 150px; |
|
186 | min-height: 150px; | |
183 | margin: @sidebarpadding 2% 0 0; |
|
187 | margin: @sidebarpadding 2% 0 0; | |
184 | padding: 0 2% 0 0; |
|
188 | padding: 0 2% 0 0; | |
185 | border-right: @border-thickness solid @grey5; |
|
189 | border-right: @border-thickness solid @grey5; | |
186 |
|
190 | |||
187 | @media (max-width:767px) { |
|
191 | @media (max-width:767px) { | |
188 | clear: both; |
|
192 | clear: both; | |
189 | width: 100%; |
|
193 | width: 100%; | |
190 | border: none; |
|
194 | border: none; | |
191 | } |
|
195 | } | |
192 |
|
196 | |||
193 | ul { |
|
197 | ul { | |
194 | padding-left: 1.25em; |
|
198 | padding-left: 1.25em; | |
195 | } |
|
199 | } | |
196 |
|
200 | |||
197 | &:last-child { |
|
201 | &:last-child { | |
198 | margin: @sidebarpadding 0 0; |
|
202 | margin: @sidebarpadding 0 0; | |
199 | border: none; |
|
203 | border: none; | |
200 | } |
|
204 | } | |
201 |
|
205 | |||
202 | h4 { |
|
206 | h4 { | |
203 | margin: 0 0 @padding; |
|
207 | margin: 0 0 @padding; | |
204 | font-family: @text-semibold; |
|
208 | font-family: @text-semibold; | |
205 | } |
|
209 | } | |
206 | } |
|
210 | } | |
207 | } |
|
211 | } | |
208 | .error-page-logo { |
|
212 | .error-page-logo { | |
209 | width: 130px; |
|
213 | width: 130px; | |
210 | height: 160px; |
|
214 | height: 160px; | |
211 | } |
|
215 | } | |
212 |
|
216 | |||
213 | // HEADER |
|
217 | // HEADER | |
214 | .header { |
|
218 | .header { | |
215 |
|
219 | |||
216 | // TODO: johbo: Fix login pages, so that they work without a min-height |
|
220 | // TODO: johbo: Fix login pages, so that they work without a min-height | |
217 | // for the header and then remove the min-height. I chose a smaller value |
|
221 | // for the header and then remove the min-height. I chose a smaller value | |
218 | // intentionally here to avoid rendering issues in the main navigation. |
|
222 | // intentionally here to avoid rendering issues in the main navigation. | |
219 | min-height: 49px; |
|
223 | min-height: 49px; | |
220 |
|
224 | |||
221 | position: relative; |
|
225 | position: relative; | |
222 | vertical-align: bottom; |
|
226 | vertical-align: bottom; | |
223 | padding: 0 @header-padding; |
|
227 | padding: 0 @header-padding; | |
224 | background-color: @grey2; |
|
228 | background-color: @grey2; | |
225 | color: @grey5; |
|
229 | color: @grey5; | |
226 |
|
230 | |||
227 | .title { |
|
231 | .title { | |
228 | overflow: visible; |
|
232 | overflow: visible; | |
229 | } |
|
233 | } | |
230 |
|
234 | |||
231 | &:before, |
|
235 | &:before, | |
232 | &:after { |
|
236 | &:after { | |
233 | content: ""; |
|
237 | content: ""; | |
234 | clear: both; |
|
238 | clear: both; | |
235 | width: 100%; |
|
239 | width: 100%; | |
236 | } |
|
240 | } | |
237 |
|
241 | |||
238 | // TODO: johbo: Avoids breaking "Repositories" chooser |
|
242 | // TODO: johbo: Avoids breaking "Repositories" chooser | |
239 | .select2-container .select2-choice .select2-arrow { |
|
243 | .select2-container .select2-choice .select2-arrow { | |
240 | display: none; |
|
244 | display: none; | |
241 | } |
|
245 | } | |
242 | } |
|
246 | } | |
243 |
|
247 | |||
244 | #header-inner { |
|
248 | #header-inner { | |
245 | &.title { |
|
249 | &.title { | |
246 | margin: 0; |
|
250 | margin: 0; | |
247 | } |
|
251 | } | |
248 | &:before, |
|
252 | &:before, | |
249 | &:after { |
|
253 | &:after { | |
250 | content: ""; |
|
254 | content: ""; | |
251 | clear: both; |
|
255 | clear: both; | |
252 | } |
|
256 | } | |
253 | } |
|
257 | } | |
254 |
|
258 | |||
255 | // Gists |
|
259 | // Gists | |
256 | #files_data { |
|
260 | #files_data { | |
257 | clear: both; //for firefox |
|
261 | clear: both; //for firefox | |
258 | } |
|
262 | } | |
259 | #gistid { |
|
263 | #gistid { | |
260 | margin-right: @padding; |
|
264 | margin-right: @padding; | |
261 | } |
|
265 | } | |
262 |
|
266 | |||
263 | // Global Settings Editor |
|
267 | // Global Settings Editor | |
264 | .textarea.editor { |
|
268 | .textarea.editor { | |
265 | float: left; |
|
269 | float: left; | |
266 | position: relative; |
|
270 | position: relative; | |
267 | max-width: @texteditor-width; |
|
271 | max-width: @texteditor-width; | |
268 |
|
272 | |||
269 | select { |
|
273 | select { | |
270 | position: absolute; |
|
274 | position: absolute; | |
271 | top:10px; |
|
275 | top:10px; | |
272 | right:0; |
|
276 | right:0; | |
273 | } |
|
277 | } | |
274 |
|
278 | |||
275 | .CodeMirror { |
|
279 | .CodeMirror { | |
276 | margin: 0; |
|
280 | margin: 0; | |
277 | } |
|
281 | } | |
278 |
|
282 | |||
279 | .help-block { |
|
283 | .help-block { | |
280 | margin: 0 0 @padding; |
|
284 | margin: 0 0 @padding; | |
281 | padding:.5em; |
|
285 | padding:.5em; | |
282 | background-color: @grey6; |
|
286 | background-color: @grey6; | |
283 | } |
|
287 | } | |
284 | } |
|
288 | } | |
285 |
|
289 | |||
286 | ul.auth_plugins { |
|
290 | ul.auth_plugins { | |
287 | margin: @padding 0 @padding @legend-width; |
|
291 | margin: @padding 0 @padding @legend-width; | |
288 | padding: 0; |
|
292 | padding: 0; | |
289 |
|
293 | |||
290 | li { |
|
294 | li { | |
291 | margin-bottom: @padding; |
|
295 | margin-bottom: @padding; | |
292 | line-height: 1em; |
|
296 | line-height: 1em; | |
293 | list-style-type: none; |
|
297 | list-style-type: none; | |
294 |
|
298 | |||
295 | .auth_buttons .btn { |
|
299 | .auth_buttons .btn { | |
296 | margin-right: @padding; |
|
300 | margin-right: @padding; | |
297 | } |
|
301 | } | |
298 |
|
302 | |||
299 | &:before { content: none; } |
|
303 | &:before { content: none; } | |
300 | } |
|
304 | } | |
301 | } |
|
305 | } | |
302 |
|
306 | |||
303 |
|
307 | |||
304 | // My Account PR list |
|
308 | // My Account PR list | |
305 |
|
309 | |||
306 | #show_closed { |
|
310 | #show_closed { | |
307 | margin: 0 1em 0 0; |
|
311 | margin: 0 1em 0 0; | |
308 | } |
|
312 | } | |
309 |
|
313 | |||
310 | .pullrequestlist { |
|
314 | .pullrequestlist { | |
311 | .closed { |
|
315 | .closed { | |
312 | background-color: @grey6; |
|
316 | background-color: @grey6; | |
313 | } |
|
317 | } | |
314 | .td-status { |
|
318 | .td-status { | |
315 | padding-left: .5em; |
|
319 | padding-left: .5em; | |
316 | } |
|
320 | } | |
317 | .log-container .truncate { |
|
321 | .log-container .truncate { | |
318 | height: 2.75em; |
|
322 | height: 2.75em; | |
319 | white-space: pre-line; |
|
323 | white-space: pre-line; | |
320 | } |
|
324 | } | |
321 | table.rctable .user { |
|
325 | table.rctable .user { | |
322 | padding-left: 0; |
|
326 | padding-left: 0; | |
323 | } |
|
327 | } | |
324 | table.rctable { |
|
328 | table.rctable { | |
325 | td.td-description, |
|
329 | td.td-description, | |
326 | .rc-user { |
|
330 | .rc-user { | |
327 | min-width: auto; |
|
331 | min-width: auto; | |
328 | } |
|
332 | } | |
329 | } |
|
333 | } | |
330 | } |
|
334 | } | |
331 |
|
335 | |||
332 | // Pull Requests |
|
336 | // Pull Requests | |
333 |
|
337 | |||
334 | .pullrequests_section_head { |
|
338 | .pullrequests_section_head { | |
335 | display: block; |
|
339 | display: block; | |
336 | clear: both; |
|
340 | clear: both; | |
337 | margin: @padding 0; |
|
341 | margin: @padding 0; | |
338 | font-family: @text-bold; |
|
342 | font-family: @text-bold; | |
339 | } |
|
343 | } | |
340 |
|
344 | |||
341 | .pr-origininfo, .pr-targetinfo { |
|
345 | .pr-origininfo, .pr-targetinfo { | |
342 | position: relative; |
|
346 | position: relative; | |
343 |
|
347 | |||
344 | .tag { |
|
348 | .tag { | |
345 | display: inline-block; |
|
349 | display: inline-block; | |
346 | margin: 0 1em .5em 0; |
|
350 | margin: 0 1em .5em 0; | |
347 | } |
|
351 | } | |
348 |
|
352 | |||
349 | .clone-url { |
|
353 | .clone-url { | |
350 | display: inline-block; |
|
354 | display: inline-block; | |
351 | margin: 0 0 .5em 0; |
|
355 | margin: 0 0 .5em 0; | |
352 | padding: 0; |
|
356 | padding: 0; | |
353 | line-height: 1.2em; |
|
357 | line-height: 1.2em; | |
354 | } |
|
358 | } | |
355 | } |
|
359 | } | |
356 |
|
360 | |||
357 | .pr-pullinfo { |
|
361 | .pr-pullinfo { | |
358 | clear: both; |
|
362 | clear: both; | |
359 | margin: .5em 0; |
|
363 | margin: .5em 0; | |
360 | } |
|
364 | } | |
361 |
|
365 | |||
362 | #pr-title-input { |
|
366 | #pr-title-input { | |
363 | width: 72%; |
|
367 | width: 72%; | |
364 | font-size: 1em; |
|
368 | font-size: 1em; | |
365 | font-family: @text-bold; |
|
369 | font-family: @text-bold; | |
366 | margin: 0; |
|
370 | margin: 0; | |
367 | padding: 0 0 0 @padding/4; |
|
371 | padding: 0 0 0 @padding/4; | |
368 | line-height: 1.7em; |
|
372 | line-height: 1.7em; | |
369 | color: @text-color; |
|
373 | color: @text-color; | |
370 | letter-spacing: .02em; |
|
374 | letter-spacing: .02em; | |
371 | } |
|
375 | } | |
372 |
|
376 | |||
373 | #pullrequest_title { |
|
377 | #pullrequest_title { | |
374 | width: 100%; |
|
378 | width: 100%; | |
375 | box-sizing: border-box; |
|
379 | box-sizing: border-box; | |
376 | } |
|
380 | } | |
377 |
|
381 | |||
378 | #pr_open_message { |
|
382 | #pr_open_message { | |
379 | border: @border-thickness solid #fff; |
|
383 | border: @border-thickness solid #fff; | |
380 | border-radius: @border-radius; |
|
384 | border-radius: @border-radius; | |
381 | padding: @padding-large-vertical @padding-large-vertical @padding-large-vertical 0; |
|
385 | padding: @padding-large-vertical @padding-large-vertical @padding-large-vertical 0; | |
382 | text-align: right; |
|
386 | text-align: right; | |
383 | overflow: hidden; |
|
387 | overflow: hidden; | |
384 | } |
|
388 | } | |
385 |
|
389 | |||
386 | .pr-submit-button { |
|
390 | .pr-submit-button { | |
387 | float: right; |
|
391 | float: right; | |
388 | margin: 0 0 0 5px; |
|
392 | margin: 0 0 0 5px; | |
389 | } |
|
393 | } | |
390 |
|
394 | |||
391 | .pr-spacing-container { |
|
395 | .pr-spacing-container { | |
392 | padding: 20px; |
|
396 | padding: 20px; | |
393 | clear: both |
|
397 | clear: both | |
394 | } |
|
398 | } | |
395 |
|
399 | |||
396 | #pr-description-input { |
|
400 | #pr-description-input { | |
397 | margin-bottom: 0; |
|
401 | margin-bottom: 0; | |
398 | } |
|
402 | } | |
399 |
|
403 | |||
400 | .pr-description-label { |
|
404 | .pr-description-label { | |
401 | vertical-align: top; |
|
405 | vertical-align: top; | |
402 | } |
|
406 | } | |
403 |
|
407 | |||
404 | .perms_section_head { |
|
408 | .perms_section_head { | |
405 | min-width: 625px; |
|
409 | min-width: 625px; | |
406 |
|
410 | |||
407 | h2 { |
|
411 | h2 { | |
408 | margin-bottom: 0; |
|
412 | margin-bottom: 0; | |
409 | } |
|
413 | } | |
410 |
|
414 | |||
411 | .label-checkbox { |
|
415 | .label-checkbox { | |
412 | float: left; |
|
416 | float: left; | |
413 | } |
|
417 | } | |
414 |
|
418 | |||
415 | &.field { |
|
419 | &.field { | |
416 | margin: @space 0 @padding; |
|
420 | margin: @space 0 @padding; | |
417 | } |
|
421 | } | |
418 |
|
422 | |||
419 | &:first-child.field { |
|
423 | &:first-child.field { | |
420 | margin-top: 0; |
|
424 | margin-top: 0; | |
421 |
|
425 | |||
422 | .label { |
|
426 | .label { | |
423 | margin-top: 0; |
|
427 | margin-top: 0; | |
424 | padding-top: 0; |
|
428 | padding-top: 0; | |
425 | } |
|
429 | } | |
426 |
|
430 | |||
427 | .radios { |
|
431 | .radios { | |
428 | padding-top: 0; |
|
432 | padding-top: 0; | |
429 | } |
|
433 | } | |
430 | } |
|
434 | } | |
431 |
|
435 | |||
432 | .radios { |
|
436 | .radios { | |
433 | float: right; |
|
437 | float: right; | |
434 | position: relative; |
|
438 | position: relative; | |
435 | width: 405px; |
|
439 | width: 405px; | |
436 | } |
|
440 | } | |
437 | } |
|
441 | } | |
438 |
|
442 | |||
439 | //--- MODULES ------------------// |
|
443 | //--- MODULES ------------------// | |
440 |
|
444 | |||
441 |
|
445 | |||
442 | // Server Announcement |
|
446 | // Server Announcement | |
443 | #server-announcement { |
|
447 | #server-announcement { | |
444 | width: 95%; |
|
448 | width: 95%; | |
445 | margin: @padding auto; |
|
449 | margin: @padding auto; | |
446 | padding: @padding; |
|
450 | padding: @padding; | |
447 | border-width: 2px; |
|
451 | border-width: 2px; | |
448 | border-style: solid; |
|
452 | border-style: solid; | |
449 | .border-radius(2px); |
|
453 | .border-radius(2px); | |
450 | font-family: @text-bold; |
|
454 | font-family: @text-bold; | |
451 |
|
455 | |||
452 | &.info { border-color: @alert4; background-color: @alert4-inner; } |
|
456 | &.info { border-color: @alert4; background-color: @alert4-inner; } | |
453 | &.warning { border-color: @alert3; background-color: @alert3-inner; } |
|
457 | &.warning { border-color: @alert3; background-color: @alert3-inner; } | |
454 | &.error { border-color: @alert2; background-color: @alert2-inner; } |
|
458 | &.error { border-color: @alert2; background-color: @alert2-inner; } | |
455 | &.success { border-color: @alert1; background-color: @alert1-inner; } |
|
459 | &.success { border-color: @alert1; background-color: @alert1-inner; } | |
456 | &.neutral { border-color: @grey3; background-color: @grey6; } |
|
460 | &.neutral { border-color: @grey3; background-color: @grey6; } | |
457 | } |
|
461 | } | |
458 |
|
462 | |||
459 | // Fixed Sidebar Column |
|
463 | // Fixed Sidebar Column | |
460 | .sidebar-col-wrapper { |
|
464 | .sidebar-col-wrapper { | |
461 | padding-left: @sidebar-all-width; |
|
465 | padding-left: @sidebar-all-width; | |
462 |
|
466 | |||
463 | .sidebar { |
|
467 | .sidebar { | |
464 | width: @sidebar-width; |
|
468 | width: @sidebar-width; | |
465 | margin-left: -@sidebar-all-width; |
|
469 | margin-left: -@sidebar-all-width; | |
466 | } |
|
470 | } | |
467 | } |
|
471 | } | |
468 |
|
472 | |||
469 | .sidebar-col-wrapper.scw-small { |
|
473 | .sidebar-col-wrapper.scw-small { | |
470 | padding-left: @sidebar-small-all-width; |
|
474 | padding-left: @sidebar-small-all-width; | |
471 |
|
475 | |||
472 | .sidebar { |
|
476 | .sidebar { | |
473 | width: @sidebar-small-width; |
|
477 | width: @sidebar-small-width; | |
474 | margin-left: -@sidebar-small-all-width; |
|
478 | margin-left: -@sidebar-small-all-width; | |
475 | } |
|
479 | } | |
476 | } |
|
480 | } | |
477 |
|
481 | |||
478 |
|
482 | |||
479 | // FOOTER |
|
483 | // FOOTER | |
480 | #footer { |
|
484 | #footer { | |
481 | padding: 0; |
|
485 | padding: 0; | |
482 | text-align: center; |
|
486 | text-align: center; | |
483 | vertical-align: middle; |
|
487 | vertical-align: middle; | |
484 | color: @grey2; |
|
488 | color: @grey2; | |
485 | background-color: @grey6; |
|
489 | background-color: @grey6; | |
486 |
|
490 | |||
487 | p { |
|
491 | p { | |
488 | margin: 0; |
|
492 | margin: 0; | |
489 | padding: 1em; |
|
493 | padding: 1em; | |
490 | line-height: 1em; |
|
494 | line-height: 1em; | |
491 | } |
|
495 | } | |
492 |
|
496 | |||
493 | .server-instance { //server instance |
|
497 | .server-instance { //server instance | |
494 | display: none; |
|
498 | display: none; | |
495 | } |
|
499 | } | |
496 |
|
500 | |||
497 | .title { |
|
501 | .title { | |
498 | float: none; |
|
502 | float: none; | |
499 | margin: 0 auto; |
|
503 | margin: 0 auto; | |
500 | } |
|
504 | } | |
501 | } |
|
505 | } | |
502 |
|
506 | |||
503 | button.close { |
|
507 | button.close { | |
504 | padding: 0; |
|
508 | padding: 0; | |
505 | cursor: pointer; |
|
509 | cursor: pointer; | |
506 | background: transparent; |
|
510 | background: transparent; | |
507 | border: 0; |
|
511 | border: 0; | |
508 | .box-shadow(none); |
|
512 | .box-shadow(none); | |
509 | -webkit-appearance: none; |
|
513 | -webkit-appearance: none; | |
510 | } |
|
514 | } | |
511 |
|
515 | |||
512 | .close { |
|
516 | .close { | |
513 | float: right; |
|
517 | float: right; | |
514 | font-size: 21px; |
|
518 | font-size: 21px; | |
515 | font-family: @text-bootstrap; |
|
519 | font-family: @text-bootstrap; | |
516 | line-height: 1em; |
|
520 | line-height: 1em; | |
517 | font-weight: bold; |
|
521 | font-weight: bold; | |
518 | color: @grey2; |
|
522 | color: @grey2; | |
519 |
|
523 | |||
520 | &:hover, |
|
524 | &:hover, | |
521 | &:focus { |
|
525 | &:focus { | |
522 | color: @grey1; |
|
526 | color: @grey1; | |
523 | text-decoration: none; |
|
527 | text-decoration: none; | |
524 | cursor: pointer; |
|
528 | cursor: pointer; | |
525 | } |
|
529 | } | |
526 | } |
|
530 | } | |
527 |
|
531 | |||
528 | // GRID |
|
532 | // GRID | |
529 | .sorting, |
|
533 | .sorting, | |
530 | .sorting_desc, |
|
534 | .sorting_desc, | |
531 | .sorting_asc { |
|
535 | .sorting_asc { | |
532 | cursor: pointer; |
|
536 | cursor: pointer; | |
533 | } |
|
537 | } | |
534 | .sorting_desc:after { |
|
538 | .sorting_desc:after { | |
535 | content: "\00A0\25B2"; |
|
539 | content: "\00A0\25B2"; | |
536 | font-size: .75em; |
|
540 | font-size: .75em; | |
537 | } |
|
541 | } | |
538 | .sorting_asc:after { |
|
542 | .sorting_asc:after { | |
539 | content: "\00A0\25BC"; |
|
543 | content: "\00A0\25BC"; | |
540 | font-size: .68em; |
|
544 | font-size: .68em; | |
541 | } |
|
545 | } | |
542 |
|
546 | |||
543 |
|
547 | |||
544 | .user_auth_tokens { |
|
548 | .user_auth_tokens { | |
545 |
|
549 | |||
546 | &.truncate { |
|
550 | &.truncate { | |
547 | white-space: nowrap; |
|
551 | white-space: nowrap; | |
548 | overflow: hidden; |
|
552 | overflow: hidden; | |
549 | text-overflow: ellipsis; |
|
553 | text-overflow: ellipsis; | |
550 | } |
|
554 | } | |
551 |
|
555 | |||
552 | .fields .field .input { |
|
556 | .fields .field .input { | |
553 | margin: 0; |
|
557 | margin: 0; | |
554 | } |
|
558 | } | |
555 |
|
559 | |||
556 | input#description { |
|
560 | input#description { | |
557 | width: 100px; |
|
561 | width: 100px; | |
558 | margin: 0; |
|
562 | margin: 0; | |
559 | } |
|
563 | } | |
560 |
|
564 | |||
561 | .drop-menu { |
|
565 | .drop-menu { | |
562 | // TODO: johbo: Remove this, should work out of the box when |
|
566 | // TODO: johbo: Remove this, should work out of the box when | |
563 | // having multiple inputs inline |
|
567 | // having multiple inputs inline | |
564 | margin: 0 0 0 5px; |
|
568 | margin: 0 0 0 5px; | |
565 | } |
|
569 | } | |
566 | } |
|
570 | } | |
567 | #user_list_table { |
|
571 | #user_list_table { | |
568 | .closed { |
|
572 | .closed { | |
569 | background-color: @grey6; |
|
573 | background-color: @grey6; | |
570 | } |
|
574 | } | |
571 | } |
|
575 | } | |
572 |
|
576 | |||
573 |
|
577 | |||
574 | input { |
|
578 | input { | |
575 | &.disabled { |
|
579 | &.disabled { | |
576 | opacity: .5; |
|
580 | opacity: .5; | |
577 | } |
|
581 | } | |
578 | } |
|
582 | } | |
579 |
|
583 | |||
580 | // remove extra padding in firefox |
|
584 | // remove extra padding in firefox | |
581 | input::-moz-focus-inner { border:0; padding:0 } |
|
585 | input::-moz-focus-inner { border:0; padding:0 } | |
582 |
|
586 | |||
583 | .adjacent input { |
|
587 | .adjacent input { | |
584 | margin-bottom: @padding; |
|
588 | margin-bottom: @padding; | |
585 | } |
|
589 | } | |
586 |
|
590 | |||
587 | .permissions_boxes { |
|
591 | .permissions_boxes { | |
588 | display: block; |
|
592 | display: block; | |
589 | } |
|
593 | } | |
590 |
|
594 | |||
591 | //TODO: lisa: this should be in tables |
|
595 | //TODO: lisa: this should be in tables | |
592 | .show_more_col { |
|
596 | .show_more_col { | |
593 | width: 20px; |
|
597 | width: 20px; | |
594 | } |
|
598 | } | |
595 |
|
599 | |||
596 | //FORMS |
|
600 | //FORMS | |
597 |
|
601 | |||
598 | .medium-inline, |
|
602 | .medium-inline, | |
599 | input#description.medium-inline { |
|
603 | input#description.medium-inline { | |
600 | display: inline; |
|
604 | display: inline; | |
601 | width: @medium-inline-input-width; |
|
605 | width: @medium-inline-input-width; | |
602 | min-width: 100px; |
|
606 | min-width: 100px; | |
603 | } |
|
607 | } | |
604 |
|
608 | |||
605 | select { |
|
609 | select { | |
606 | //reset |
|
610 | //reset | |
607 | -webkit-appearance: none; |
|
611 | -webkit-appearance: none; | |
608 | -moz-appearance: none; |
|
612 | -moz-appearance: none; | |
609 |
|
613 | |||
610 | display: inline-block; |
|
614 | display: inline-block; | |
611 | height: 28px; |
|
615 | height: 28px; | |
612 | width: auto; |
|
616 | width: auto; | |
613 | margin: 0 @padding @padding 0; |
|
617 | margin: 0 @padding @padding 0; | |
614 | padding: 0 18px 0 8px; |
|
618 | padding: 0 18px 0 8px; | |
615 | line-height:1em; |
|
619 | line-height:1em; | |
616 | font-size: @basefontsize; |
|
620 | font-size: @basefontsize; | |
617 | border: @border-thickness solid @rcblue; |
|
621 | border: @border-thickness solid @rcblue; | |
618 | background:white url("../images/dt-arrow-dn.png") no-repeat 100% 50%; |
|
622 | background:white url("../images/dt-arrow-dn.png") no-repeat 100% 50%; | |
619 | color: @rcblue; |
|
623 | color: @rcblue; | |
620 |
|
624 | |||
621 | &:after { |
|
625 | &:after { | |
622 | content: "\00A0\25BE"; |
|
626 | content: "\00A0\25BE"; | |
623 | } |
|
627 | } | |
624 |
|
628 | |||
625 | &:focus { |
|
629 | &:focus { | |
626 | outline: none; |
|
630 | outline: none; | |
627 | } |
|
631 | } | |
628 | } |
|
632 | } | |
629 |
|
633 | |||
630 | option { |
|
634 | option { | |
631 | &:focus { |
|
635 | &:focus { | |
632 | outline: none; |
|
636 | outline: none; | |
633 | } |
|
637 | } | |
634 | } |
|
638 | } | |
635 |
|
639 | |||
636 | input, |
|
640 | input, | |
637 | textarea { |
|
641 | textarea { | |
638 | padding: @input-padding; |
|
642 | padding: @input-padding; | |
639 | border: @input-border-thickness solid @border-highlight-color; |
|
643 | border: @input-border-thickness solid @border-highlight-color; | |
640 | .border-radius (@border-radius); |
|
644 | .border-radius (@border-radius); | |
641 | font-family: @text-light; |
|
645 | font-family: @text-light; | |
642 | font-size: @basefontsize; |
|
646 | font-size: @basefontsize; | |
643 |
|
647 | |||
644 | &.input-sm { |
|
648 | &.input-sm { | |
645 | padding: 5px; |
|
649 | padding: 5px; | |
646 | } |
|
650 | } | |
647 |
|
651 | |||
648 | &#description { |
|
652 | &#description { | |
649 | min-width: @input-description-minwidth; |
|
653 | min-width: @input-description-minwidth; | |
650 | min-height: 1em; |
|
654 | min-height: 1em; | |
651 | padding: 10px; |
|
655 | padding: 10px; | |
652 | } |
|
656 | } | |
653 | } |
|
657 | } | |
654 |
|
658 | |||
655 | .field-sm { |
|
659 | .field-sm { | |
656 | input, |
|
660 | input, | |
657 | textarea { |
|
661 | textarea { | |
658 | padding: 5px; |
|
662 | padding: 5px; | |
659 | } |
|
663 | } | |
660 | } |
|
664 | } | |
661 |
|
665 | |||
662 | textarea { |
|
666 | textarea { | |
663 | display: block; |
|
667 | display: block; | |
664 | clear: both; |
|
668 | clear: both; | |
665 | width: 100%; |
|
669 | width: 100%; | |
666 | min-height: 100px; |
|
670 | min-height: 100px; | |
667 | margin-bottom: @padding; |
|
671 | margin-bottom: @padding; | |
668 | .box-sizing(border-box); |
|
672 | .box-sizing(border-box); | |
669 | overflow: auto; |
|
673 | overflow: auto; | |
670 | } |
|
674 | } | |
671 |
|
675 | |||
672 | label { |
|
676 | label { | |
673 | font-family: @text-light; |
|
677 | font-family: @text-light; | |
674 | } |
|
678 | } | |
675 |
|
679 | |||
676 | // GRAVATARS |
|
680 | // GRAVATARS | |
677 | // centers gravatar on username to the right |
|
681 | // centers gravatar on username to the right | |
678 |
|
682 | |||
679 | .gravatar { |
|
683 | .gravatar { | |
680 | display: inline; |
|
684 | display: inline; | |
681 | min-width: 16px; |
|
685 | min-width: 16px; | |
682 | min-height: 16px; |
|
686 | min-height: 16px; | |
683 | margin: -5px 0; |
|
687 | margin: -5px 0; | |
684 | padding: 0; |
|
688 | padding: 0; | |
685 | line-height: 1em; |
|
689 | line-height: 1em; | |
686 | border: 1px solid @grey4; |
|
690 | border: 1px solid @grey4; | |
687 |
|
691 | |||
688 | &.gravatar-large { |
|
692 | &.gravatar-large { | |
689 | margin: -0.5em .25em -0.5em 0; |
|
693 | margin: -0.5em .25em -0.5em 0; | |
690 | } |
|
694 | } | |
691 |
|
695 | |||
692 | & + .user { |
|
696 | & + .user { | |
693 | display: inline; |
|
697 | display: inline; | |
694 | margin: 0; |
|
698 | margin: 0; | |
695 | padding: 0 0 0 .17em; |
|
699 | padding: 0 0 0 .17em; | |
696 | line-height: 1em; |
|
700 | line-height: 1em; | |
697 | } |
|
701 | } | |
698 | } |
|
702 | } | |
699 |
|
703 | |||
700 | .user-inline-data { |
|
704 | .user-inline-data { | |
701 | display: inline-block; |
|
705 | display: inline-block; | |
702 | float: left; |
|
706 | float: left; | |
703 | padding-left: .5em; |
|
707 | padding-left: .5em; | |
704 | line-height: 1.3em; |
|
708 | line-height: 1.3em; | |
705 | } |
|
709 | } | |
706 |
|
710 | |||
707 | .rc-user { // gravatar + user wrapper |
|
711 | .rc-user { // gravatar + user wrapper | |
708 | float: left; |
|
712 | float: left; | |
709 | position: relative; |
|
713 | position: relative; | |
710 | min-width: 100px; |
|
714 | min-width: 100px; | |
711 | max-width: 200px; |
|
715 | max-width: 200px; | |
712 | min-height: (@gravatar-size + @border-thickness * 2); // account for border |
|
716 | min-height: (@gravatar-size + @border-thickness * 2); // account for border | |
713 | display: block; |
|
717 | display: block; | |
714 | padding: 0 0 0 (@gravatar-size + @basefontsize/2 + @border-thickness * 2); |
|
718 | padding: 0 0 0 (@gravatar-size + @basefontsize/2 + @border-thickness * 2); | |
715 |
|
719 | |||
716 |
|
720 | |||
717 | .gravatar { |
|
721 | .gravatar { | |
718 | display: block; |
|
722 | display: block; | |
719 | position: absolute; |
|
723 | position: absolute; | |
720 | top: 0; |
|
724 | top: 0; | |
721 | left: 0; |
|
725 | left: 0; | |
722 | min-width: @gravatar-size; |
|
726 | min-width: @gravatar-size; | |
723 | min-height: @gravatar-size; |
|
727 | min-height: @gravatar-size; | |
724 | margin: 0; |
|
728 | margin: 0; | |
725 | } |
|
729 | } | |
726 |
|
730 | |||
727 | .user { |
|
731 | .user { | |
728 | display: block; |
|
732 | display: block; | |
729 | max-width: 175px; |
|
733 | max-width: 175px; | |
730 | padding-top: 2px; |
|
734 | padding-top: 2px; | |
731 | overflow: hidden; |
|
735 | overflow: hidden; | |
732 | text-overflow: ellipsis; |
|
736 | text-overflow: ellipsis; | |
733 | } |
|
737 | } | |
734 | } |
|
738 | } | |
735 |
|
739 | |||
736 | .gist-gravatar, |
|
740 | .gist-gravatar, | |
737 | .journal_container { |
|
741 | .journal_container { | |
738 | .gravatar-large { |
|
742 | .gravatar-large { | |
739 | margin: 0 .5em -10px 0; |
|
743 | margin: 0 .5em -10px 0; | |
740 | } |
|
744 | } | |
741 | } |
|
745 | } | |
742 |
|
746 | |||
743 |
|
747 | |||
744 | // ADMIN SETTINGS |
|
748 | // ADMIN SETTINGS | |
745 |
|
749 | |||
746 | // Tag Patterns |
|
750 | // Tag Patterns | |
747 | .tag_patterns { |
|
751 | .tag_patterns { | |
748 | .tag_input { |
|
752 | .tag_input { | |
749 | margin-bottom: @padding; |
|
753 | margin-bottom: @padding; | |
750 | } |
|
754 | } | |
751 | } |
|
755 | } | |
752 |
|
756 | |||
753 | .locked_input { |
|
757 | .locked_input { | |
754 | position: relative; |
|
758 | position: relative; | |
755 |
|
759 | |||
756 | input { |
|
760 | input { | |
757 | display: inline; |
|
761 | display: inline; | |
758 | margin-top: 3px; |
|
762 | margin-top: 3px; | |
759 | } |
|
763 | } | |
760 |
|
764 | |||
761 | br { |
|
765 | br { | |
762 | display: none; |
|
766 | display: none; | |
763 | } |
|
767 | } | |
764 |
|
768 | |||
765 | .error-message { |
|
769 | .error-message { | |
766 | float: left; |
|
770 | float: left; | |
767 | width: 100%; |
|
771 | width: 100%; | |
768 | } |
|
772 | } | |
769 |
|
773 | |||
770 | .lock_input_button { |
|
774 | .lock_input_button { | |
771 | display: inline; |
|
775 | display: inline; | |
772 | } |
|
776 | } | |
773 |
|
777 | |||
774 | .help-block { |
|
778 | .help-block { | |
775 | clear: both; |
|
779 | clear: both; | |
776 | } |
|
780 | } | |
777 | } |
|
781 | } | |
778 |
|
782 | |||
779 | // Notifications |
|
783 | // Notifications | |
780 |
|
784 | |||
781 | .notifications_buttons { |
|
785 | .notifications_buttons { | |
782 | margin: 0 0 @space 0; |
|
786 | margin: 0 0 @space 0; | |
783 | padding: 0; |
|
787 | padding: 0; | |
784 |
|
788 | |||
785 | .btn { |
|
789 | .btn { | |
786 | display: inline-block; |
|
790 | display: inline-block; | |
787 | } |
|
791 | } | |
788 | } |
|
792 | } | |
789 |
|
793 | |||
790 | .notification-list { |
|
794 | .notification-list { | |
791 |
|
795 | |||
792 | div { |
|
796 | div { | |
793 | display: inline-block; |
|
797 | display: inline-block; | |
794 | vertical-align: middle; |
|
798 | vertical-align: middle; | |
795 | } |
|
799 | } | |
796 |
|
800 | |||
797 | .container { |
|
801 | .container { | |
798 | display: block; |
|
802 | display: block; | |
799 | margin: 0 0 @padding 0; |
|
803 | margin: 0 0 @padding 0; | |
800 | } |
|
804 | } | |
801 |
|
805 | |||
802 | .delete-notifications { |
|
806 | .delete-notifications { | |
803 | margin-left: @padding; |
|
807 | margin-left: @padding; | |
804 | text-align: right; |
|
808 | text-align: right; | |
805 | cursor: pointer; |
|
809 | cursor: pointer; | |
806 | } |
|
810 | } | |
807 |
|
811 | |||
808 | .read-notifications { |
|
812 | .read-notifications { | |
809 | margin-left: @padding/2; |
|
813 | margin-left: @padding/2; | |
810 | text-align: right; |
|
814 | text-align: right; | |
811 | width: 35px; |
|
815 | width: 35px; | |
812 | cursor: pointer; |
|
816 | cursor: pointer; | |
813 | } |
|
817 | } | |
814 |
|
818 | |||
815 | .icon-minus-sign { |
|
819 | .icon-minus-sign { | |
816 | color: @alert2; |
|
820 | color: @alert2; | |
817 | } |
|
821 | } | |
818 |
|
822 | |||
819 | .icon-ok-sign { |
|
823 | .icon-ok-sign { | |
820 | color: @alert1; |
|
824 | color: @alert1; | |
821 | } |
|
825 | } | |
822 | } |
|
826 | } | |
823 |
|
827 | |||
824 | .user_settings { |
|
828 | .user_settings { | |
825 | float: left; |
|
829 | float: left; | |
826 | clear: both; |
|
830 | clear: both; | |
827 | display: block; |
|
831 | display: block; | |
828 | width: 100%; |
|
832 | width: 100%; | |
829 |
|
833 | |||
830 | .gravatar_box { |
|
834 | .gravatar_box { | |
831 | margin-bottom: @padding; |
|
835 | margin-bottom: @padding; | |
832 |
|
836 | |||
833 | &:after { |
|
837 | &:after { | |
834 | content: " "; |
|
838 | content: " "; | |
835 | clear: both; |
|
839 | clear: both; | |
836 | width: 100%; |
|
840 | width: 100%; | |
837 | } |
|
841 | } | |
838 | } |
|
842 | } | |
839 |
|
843 | |||
840 | .fields .field { |
|
844 | .fields .field { | |
841 | clear: both; |
|
845 | clear: both; | |
842 | } |
|
846 | } | |
843 | } |
|
847 | } | |
844 |
|
848 | |||
845 | .advanced_settings { |
|
849 | .advanced_settings { | |
846 | margin-bottom: @space; |
|
850 | margin-bottom: @space; | |
847 |
|
851 | |||
848 | .help-block { |
|
852 | .help-block { | |
849 | margin-left: 0; |
|
853 | margin-left: 0; | |
850 | } |
|
854 | } | |
851 |
|
855 | |||
852 | button + .help-block { |
|
856 | button + .help-block { | |
853 | margin-top: @padding; |
|
857 | margin-top: @padding; | |
854 | } |
|
858 | } | |
855 | } |
|
859 | } | |
856 |
|
860 | |||
857 | // admin settings radio buttons and labels |
|
861 | // admin settings radio buttons and labels | |
858 | .label-2 { |
|
862 | .label-2 { | |
859 | float: left; |
|
863 | float: left; | |
860 | width: @label2-width; |
|
864 | width: @label2-width; | |
861 |
|
865 | |||
862 | label { |
|
866 | label { | |
863 | color: @grey1; |
|
867 | color: @grey1; | |
864 | } |
|
868 | } | |
865 | } |
|
869 | } | |
866 | .checkboxes { |
|
870 | .checkboxes { | |
867 | float: left; |
|
871 | float: left; | |
868 | width: @checkboxes-width; |
|
872 | width: @checkboxes-width; | |
869 | margin-bottom: @padding; |
|
873 | margin-bottom: @padding; | |
870 |
|
874 | |||
871 | .checkbox { |
|
875 | .checkbox { | |
872 | width: 100%; |
|
876 | width: 100%; | |
873 |
|
877 | |||
874 | label { |
|
878 | label { | |
875 | margin: 0; |
|
879 | margin: 0; | |
876 | padding: 0; |
|
880 | padding: 0; | |
877 | } |
|
881 | } | |
878 | } |
|
882 | } | |
879 |
|
883 | |||
880 | .checkbox + .checkbox { |
|
884 | .checkbox + .checkbox { | |
881 | display: inline-block; |
|
885 | display: inline-block; | |
882 | } |
|
886 | } | |
883 |
|
887 | |||
884 | label { |
|
888 | label { | |
885 | margin-right: 1em; |
|
889 | margin-right: 1em; | |
886 | } |
|
890 | } | |
887 | } |
|
891 | } | |
888 |
|
892 | |||
889 | // CHANGELOG |
|
893 | // CHANGELOG | |
890 | .container_header { |
|
894 | .container_header { | |
891 | float: left; |
|
895 | float: left; | |
892 | display: block; |
|
896 | display: block; | |
893 | width: 100%; |
|
897 | width: 100%; | |
894 | margin: @padding 0 @padding; |
|
898 | margin: @padding 0 @padding; | |
895 |
|
899 | |||
896 | #filter_changelog { |
|
900 | #filter_changelog { | |
897 | float: left; |
|
901 | float: left; | |
898 | margin-right: @padding; |
|
902 | margin-right: @padding; | |
899 | } |
|
903 | } | |
900 |
|
904 | |||
901 | .breadcrumbs_light { |
|
905 | .breadcrumbs_light { | |
902 | display: inline-block; |
|
906 | display: inline-block; | |
903 | } |
|
907 | } | |
904 | } |
|
908 | } | |
905 |
|
909 | |||
906 | .info_box { |
|
910 | .info_box { | |
907 | float: right; |
|
911 | float: right; | |
908 | } |
|
912 | } | |
909 |
|
913 | |||
910 |
|
914 | |||
911 | #graph_nodes { |
|
915 | #graph_nodes { | |
912 | padding-top: 43px; |
|
916 | padding-top: 43px; | |
913 | } |
|
917 | } | |
914 |
|
918 | |||
915 | #graph_content{ |
|
919 | #graph_content{ | |
916 |
|
920 | |||
917 | // adjust for table headers so that graph renders properly |
|
921 | // adjust for table headers so that graph renders properly | |
918 | // #graph_nodes padding - table cell padding |
|
922 | // #graph_nodes padding - table cell padding | |
919 | padding-top: (@space - (@basefontsize * 2.4)); |
|
923 | padding-top: (@space - (@basefontsize * 2.4)); | |
920 |
|
924 | |||
921 | &.graph_full_width { |
|
925 | &.graph_full_width { | |
922 | width: 100%; |
|
926 | width: 100%; | |
923 | max-width: 100%; |
|
927 | max-width: 100%; | |
924 | } |
|
928 | } | |
925 | } |
|
929 | } | |
926 |
|
930 | |||
927 | #graph { |
|
931 | #graph { | |
928 | .flag_status { |
|
932 | .flag_status { | |
929 | margin: 0; |
|
933 | margin: 0; | |
930 | } |
|
934 | } | |
931 |
|
935 | |||
932 | .pagination-left { |
|
936 | .pagination-left { | |
933 | float: left; |
|
937 | float: left; | |
934 | clear: both; |
|
938 | clear: both; | |
935 | } |
|
939 | } | |
936 |
|
940 | |||
937 | .log-container { |
|
941 | .log-container { | |
938 | max-width: 345px; |
|
942 | max-width: 345px; | |
939 |
|
943 | |||
940 | .message{ |
|
944 | .message{ | |
941 | max-width: 340px; |
|
945 | max-width: 340px; | |
942 | } |
|
946 | } | |
943 | } |
|
947 | } | |
944 |
|
948 | |||
945 | .graph-col-wrapper { |
|
949 | .graph-col-wrapper { | |
946 | padding-left: 110px; |
|
950 | padding-left: 110px; | |
947 |
|
951 | |||
948 | #graph_nodes { |
|
952 | #graph_nodes { | |
949 | width: 100px; |
|
953 | width: 100px; | |
950 | margin-left: -110px; |
|
954 | margin-left: -110px; | |
951 | float: left; |
|
955 | float: left; | |
952 | clear: left; |
|
956 | clear: left; | |
953 | } |
|
957 | } | |
954 | } |
|
958 | } | |
955 | } |
|
959 | } | |
956 |
|
960 | |||
957 | #filter_changelog { |
|
961 | #filter_changelog { | |
958 | float: left; |
|
962 | float: left; | |
959 | } |
|
963 | } | |
960 |
|
964 | |||
961 |
|
965 | |||
962 | //--- THEME ------------------// |
|
966 | //--- THEME ------------------// | |
963 |
|
967 | |||
964 | #logo { |
|
968 | #logo { | |
965 | float: left; |
|
969 | float: left; | |
966 | margin: 9px 0 0 0; |
|
970 | margin: 9px 0 0 0; | |
967 |
|
971 | |||
968 | .header { |
|
972 | .header { | |
969 | background-color: transparent; |
|
973 | background-color: transparent; | |
970 | } |
|
974 | } | |
971 |
|
975 | |||
972 | a { |
|
976 | a { | |
973 | display: inline-block; |
|
977 | display: inline-block; | |
974 | } |
|
978 | } | |
975 |
|
979 | |||
976 | img { |
|
980 | img { | |
977 | height:30px; |
|
981 | height:30px; | |
978 | } |
|
982 | } | |
979 | } |
|
983 | } | |
980 |
|
984 | |||
981 | .logo-wrapper { |
|
985 | .logo-wrapper { | |
982 | float:left; |
|
986 | float:left; | |
983 | } |
|
987 | } | |
984 |
|
988 | |||
985 | .branding{ |
|
989 | .branding{ | |
986 | float: left; |
|
990 | float: left; | |
987 | padding: 9px 2px; |
|
991 | padding: 9px 2px; | |
988 | line-height: 1em; |
|
992 | line-height: 1em; | |
989 | font-size: @navigation-fontsize; |
|
993 | font-size: @navigation-fontsize; | |
990 | } |
|
994 | } | |
991 |
|
995 | |||
992 | img { |
|
996 | img { | |
993 | border: none; |
|
997 | border: none; | |
994 | outline: none; |
|
998 | outline: none; | |
995 | } |
|
999 | } | |
996 | user-profile-header |
|
1000 | user-profile-header | |
997 | label { |
|
1001 | label { | |
998 |
|
1002 | |||
999 | input[type="checkbox"] { |
|
1003 | input[type="checkbox"] { | |
1000 | margin-right: 1em; |
|
1004 | margin-right: 1em; | |
1001 | } |
|
1005 | } | |
1002 | input[type="radio"] { |
|
1006 | input[type="radio"] { | |
1003 | margin-right: 1em; |
|
1007 | margin-right: 1em; | |
1004 | } |
|
1008 | } | |
1005 | } |
|
1009 | } | |
1006 |
|
1010 | |||
1007 | .flag_status { |
|
1011 | .flag_status { | |
1008 | margin: 2px 8px 6px 2px; |
|
1012 | margin: 2px 8px 6px 2px; | |
1009 | &.under_review { |
|
1013 | &.under_review { | |
1010 | .circle(5px, @alert3); |
|
1014 | .circle(5px, @alert3); | |
1011 | } |
|
1015 | } | |
1012 | &.approved { |
|
1016 | &.approved { | |
1013 | .circle(5px, @alert1); |
|
1017 | .circle(5px, @alert1); | |
1014 | } |
|
1018 | } | |
1015 | &.rejected, |
|
1019 | &.rejected, | |
1016 | &.forced_closed{ |
|
1020 | &.forced_closed{ | |
1017 | .circle(5px, @alert2); |
|
1021 | .circle(5px, @alert2); | |
1018 | } |
|
1022 | } | |
1019 | &.not_reviewed { |
|
1023 | &.not_reviewed { | |
1020 | .circle(5px, @grey5); |
|
1024 | .circle(5px, @grey5); | |
1021 | } |
|
1025 | } | |
1022 | } |
|
1026 | } | |
1023 |
|
1027 | |||
1024 | .flag_status_comment_box { |
|
1028 | .flag_status_comment_box { | |
1025 | margin: 5px 6px 0px 2px; |
|
1029 | margin: 5px 6px 0px 2px; | |
1026 | } |
|
1030 | } | |
1027 | .test_pattern_preview { |
|
1031 | .test_pattern_preview { | |
1028 | margin: @space 0; |
|
1032 | margin: @space 0; | |
1029 |
|
1033 | |||
1030 | p { |
|
1034 | p { | |
1031 | margin-bottom: 0; |
|
1035 | margin-bottom: 0; | |
1032 | border-bottom: @border-thickness solid @border-default-color; |
|
1036 | border-bottom: @border-thickness solid @border-default-color; | |
1033 | color: @grey3; |
|
1037 | color: @grey3; | |
1034 | } |
|
1038 | } | |
1035 |
|
1039 | |||
1036 | .btn { |
|
1040 | .btn { | |
1037 | margin-bottom: @padding; |
|
1041 | margin-bottom: @padding; | |
1038 | } |
|
1042 | } | |
1039 | } |
|
1043 | } | |
1040 | #test_pattern_result { |
|
1044 | #test_pattern_result { | |
1041 | display: none; |
|
1045 | display: none; | |
1042 | &:extend(pre); |
|
1046 | &:extend(pre); | |
1043 | padding: .9em; |
|
1047 | padding: .9em; | |
1044 | color: @grey3; |
|
1048 | color: @grey3; | |
1045 | background-color: @grey7; |
|
1049 | background-color: @grey7; | |
1046 | border-right: @border-thickness solid @border-default-color; |
|
1050 | border-right: @border-thickness solid @border-default-color; | |
1047 | border-bottom: @border-thickness solid @border-default-color; |
|
1051 | border-bottom: @border-thickness solid @border-default-color; | |
1048 | border-left: @border-thickness solid @border-default-color; |
|
1052 | border-left: @border-thickness solid @border-default-color; | |
1049 | } |
|
1053 | } | |
1050 |
|
1054 | |||
1051 | #repo_vcs_settings { |
|
1055 | #repo_vcs_settings { | |
1052 | #inherit_overlay_vcs_default { |
|
1056 | #inherit_overlay_vcs_default { | |
1053 | display: none; |
|
1057 | display: none; | |
1054 | } |
|
1058 | } | |
1055 | #inherit_overlay_vcs_custom { |
|
1059 | #inherit_overlay_vcs_custom { | |
1056 | display: custom; |
|
1060 | display: custom; | |
1057 | } |
|
1061 | } | |
1058 | &.inherited { |
|
1062 | &.inherited { | |
1059 | #inherit_overlay_vcs_default { |
|
1063 | #inherit_overlay_vcs_default { | |
1060 | display: block; |
|
1064 | display: block; | |
1061 | } |
|
1065 | } | |
1062 | #inherit_overlay_vcs_custom { |
|
1066 | #inherit_overlay_vcs_custom { | |
1063 | display: none; |
|
1067 | display: none; | |
1064 | } |
|
1068 | } | |
1065 | } |
|
1069 | } | |
1066 | } |
|
1070 | } | |
1067 |
|
1071 | |||
1068 | .issue-tracker-link { |
|
1072 | .issue-tracker-link { | |
1069 | color: @rcblue; |
|
1073 | color: @rcblue; | |
1070 | } |
|
1074 | } | |
1071 |
|
1075 | |||
1072 | // Issue Tracker Table Show/Hide |
|
1076 | // Issue Tracker Table Show/Hide | |
1073 | #repo_issue_tracker { |
|
1077 | #repo_issue_tracker { | |
1074 | #inherit_overlay { |
|
1078 | #inherit_overlay { | |
1075 | display: none; |
|
1079 | display: none; | |
1076 | } |
|
1080 | } | |
1077 | #custom_overlay { |
|
1081 | #custom_overlay { | |
1078 | display: custom; |
|
1082 | display: custom; | |
1079 | } |
|
1083 | } | |
1080 | &.inherited { |
|
1084 | &.inherited { | |
1081 | #inherit_overlay { |
|
1085 | #inherit_overlay { | |
1082 | display: block; |
|
1086 | display: block; | |
1083 | } |
|
1087 | } | |
1084 | #custom_overlay { |
|
1088 | #custom_overlay { | |
1085 | display: none; |
|
1089 | display: none; | |
1086 | } |
|
1090 | } | |
1087 | } |
|
1091 | } | |
1088 | } |
|
1092 | } | |
1089 | table.issuetracker { |
|
1093 | table.issuetracker { | |
1090 | &.readonly { |
|
1094 | &.readonly { | |
1091 | tr, td { |
|
1095 | tr, td { | |
1092 | color: @grey3; |
|
1096 | color: @grey3; | |
1093 | } |
|
1097 | } | |
1094 | } |
|
1098 | } | |
1095 | .edit { |
|
1099 | .edit { | |
1096 | display: none; |
|
1100 | display: none; | |
1097 | } |
|
1101 | } | |
1098 | .editopen { |
|
1102 | .editopen { | |
1099 | .edit { |
|
1103 | .edit { | |
1100 | display: inline; |
|
1104 | display: inline; | |
1101 | } |
|
1105 | } | |
1102 | .entry { |
|
1106 | .entry { | |
1103 | display: none; |
|
1107 | display: none; | |
1104 | } |
|
1108 | } | |
1105 | } |
|
1109 | } | |
1106 | tr td.td-action { |
|
1110 | tr td.td-action { | |
1107 | min-width: 117px; |
|
1111 | min-width: 117px; | |
1108 | } |
|
1112 | } | |
1109 | td input { |
|
1113 | td input { | |
1110 | max-width: none; |
|
1114 | max-width: none; | |
1111 | min-width: 30px; |
|
1115 | min-width: 30px; | |
1112 | width: 80%; |
|
1116 | width: 80%; | |
1113 | } |
|
1117 | } | |
1114 | .issuetracker_pref input { |
|
1118 | .issuetracker_pref input { | |
1115 | width: 40%; |
|
1119 | width: 40%; | |
1116 | } |
|
1120 | } | |
1117 | input.edit_issuetracker_update { |
|
1121 | input.edit_issuetracker_update { | |
1118 | margin-right: 0; |
|
1122 | margin-right: 0; | |
1119 | width: auto; |
|
1123 | width: auto; | |
1120 | } |
|
1124 | } | |
1121 | } |
|
1125 | } | |
1122 |
|
1126 | |||
1123 | table.integrations { |
|
1127 | table.integrations { | |
1124 | .td-icon { |
|
1128 | .td-icon { | |
1125 | width: 20px; |
|
1129 | width: 20px; | |
1126 | .integration-icon { |
|
1130 | .integration-icon { | |
1127 | height: 20px; |
|
1131 | height: 20px; | |
1128 | width: 20px; |
|
1132 | width: 20px; | |
1129 | } |
|
1133 | } | |
1130 | } |
|
1134 | } | |
1131 | } |
|
1135 | } | |
1132 |
|
1136 | |||
1133 | .integrations { |
|
1137 | .integrations { | |
1134 | a.integration-box { |
|
1138 | a.integration-box { | |
1135 | color: @text-color; |
|
1139 | color: @text-color; | |
1136 | &:hover { |
|
1140 | &:hover { | |
1137 | .panel { |
|
1141 | .panel { | |
1138 | background: #fbfbfb; |
|
1142 | background: #fbfbfb; | |
1139 | } |
|
1143 | } | |
1140 | } |
|
1144 | } | |
1141 | .integration-icon { |
|
1145 | .integration-icon { | |
1142 | width: 30px; |
|
1146 | width: 30px; | |
1143 | height: 30px; |
|
1147 | height: 30px; | |
1144 | margin-right: 20px; |
|
1148 | margin-right: 20px; | |
1145 | float: left; |
|
1149 | float: left; | |
1146 | } |
|
1150 | } | |
1147 |
|
1151 | |||
1148 | .panel-body { |
|
1152 | .panel-body { | |
1149 | padding: 10px; |
|
1153 | padding: 10px; | |
1150 | } |
|
1154 | } | |
1151 | .panel { |
|
1155 | .panel { | |
1152 | margin-bottom: 10px; |
|
1156 | margin-bottom: 10px; | |
1153 | } |
|
1157 | } | |
1154 | h2 { |
|
1158 | h2 { | |
1155 | display: inline-block; |
|
1159 | display: inline-block; | |
1156 | margin: 0; |
|
1160 | margin: 0; | |
1157 | min-width: 140px; |
|
1161 | min-width: 140px; | |
1158 | } |
|
1162 | } | |
1159 | } |
|
1163 | } | |
1160 | } |
|
1164 | } | |
1161 |
|
1165 | |||
1162 | //Permissions Settings |
|
1166 | //Permissions Settings | |
1163 | #add_perm { |
|
1167 | #add_perm { | |
1164 | margin: 0 0 @padding; |
|
1168 | margin: 0 0 @padding; | |
1165 | cursor: pointer; |
|
1169 | cursor: pointer; | |
1166 | } |
|
1170 | } | |
1167 |
|
1171 | |||
1168 | .perm_ac { |
|
1172 | .perm_ac { | |
1169 | input { |
|
1173 | input { | |
1170 | width: 95%; |
|
1174 | width: 95%; | |
1171 | } |
|
1175 | } | |
1172 | } |
|
1176 | } | |
1173 |
|
1177 | |||
1174 | .autocomplete-suggestions { |
|
1178 | .autocomplete-suggestions { | |
1175 | width: auto !important; // overrides autocomplete.js |
|
1179 | width: auto !important; // overrides autocomplete.js | |
1176 | margin: 0; |
|
1180 | margin: 0; | |
1177 | border: @border-thickness solid @rcblue; |
|
1181 | border: @border-thickness solid @rcblue; | |
1178 | border-radius: @border-radius; |
|
1182 | border-radius: @border-radius; | |
1179 | color: @rcblue; |
|
1183 | color: @rcblue; | |
1180 | background-color: white; |
|
1184 | background-color: white; | |
1181 | } |
|
1185 | } | |
1182 | .autocomplete-selected { |
|
1186 | .autocomplete-selected { | |
1183 | background: #F0F0F0; |
|
1187 | background: #F0F0F0; | |
1184 | } |
|
1188 | } | |
1185 | .ac-container-wrap { |
|
1189 | .ac-container-wrap { | |
1186 | margin: 0; |
|
1190 | margin: 0; | |
1187 | padding: 8px; |
|
1191 | padding: 8px; | |
1188 | border-bottom: @border-thickness solid @rclightblue; |
|
1192 | border-bottom: @border-thickness solid @rclightblue; | |
1189 | list-style-type: none; |
|
1193 | list-style-type: none; | |
1190 | cursor: pointer; |
|
1194 | cursor: pointer; | |
1191 |
|
1195 | |||
1192 | &:hover { |
|
1196 | &:hover { | |
1193 | background-color: @rclightblue; |
|
1197 | background-color: @rclightblue; | |
1194 | } |
|
1198 | } | |
1195 |
|
1199 | |||
1196 | img { |
|
1200 | img { | |
1197 | height: @gravatar-size; |
|
1201 | height: @gravatar-size; | |
1198 | width: @gravatar-size; |
|
1202 | width: @gravatar-size; | |
1199 | margin-right: 1em; |
|
1203 | margin-right: 1em; | |
1200 | } |
|
1204 | } | |
1201 |
|
1205 | |||
1202 | strong { |
|
1206 | strong { | |
1203 | font-weight: normal; |
|
1207 | font-weight: normal; | |
1204 | } |
|
1208 | } | |
1205 | } |
|
1209 | } | |
1206 |
|
1210 | |||
1207 | // Settings Dropdown |
|
1211 | // Settings Dropdown | |
1208 | .user-menu .container { |
|
1212 | .user-menu .container { | |
1209 | padding: 0 4px; |
|
1213 | padding: 0 4px; | |
1210 | margin: 0; |
|
1214 | margin: 0; | |
1211 | } |
|
1215 | } | |
1212 |
|
1216 | |||
1213 | .user-menu .gravatar { |
|
1217 | .user-menu .gravatar { | |
1214 | cursor: pointer; |
|
1218 | cursor: pointer; | |
1215 | } |
|
1219 | } | |
1216 |
|
1220 | |||
1217 | .codeblock { |
|
1221 | .codeblock { | |
1218 | margin-bottom: @padding; |
|
1222 | margin-bottom: @padding; | |
1219 | clear: both; |
|
1223 | clear: both; | |
1220 |
|
1224 | |||
1221 | .stats{ |
|
1225 | .stats{ | |
1222 | overflow: hidden; |
|
1226 | overflow: hidden; | |
1223 | } |
|
1227 | } | |
1224 |
|
1228 | |||
1225 | .message{ |
|
1229 | .message{ | |
1226 | textarea{ |
|
1230 | textarea{ | |
1227 | margin: 0; |
|
1231 | margin: 0; | |
1228 | } |
|
1232 | } | |
1229 | } |
|
1233 | } | |
1230 |
|
1234 | |||
1231 | .code-header { |
|
1235 | .code-header { | |
1232 | .stats { |
|
1236 | .stats { | |
1233 | line-height: 2em; |
|
1237 | line-height: 2em; | |
1234 |
|
1238 | |||
1235 | .revision_id { |
|
1239 | .revision_id { | |
1236 | margin-left: 0; |
|
1240 | margin-left: 0; | |
1237 | } |
|
1241 | } | |
1238 | .buttons { |
|
1242 | .buttons { | |
1239 | padding-right: 0; |
|
1243 | padding-right: 0; | |
1240 | } |
|
1244 | } | |
1241 | } |
|
1245 | } | |
1242 |
|
1246 | |||
1243 | .item{ |
|
1247 | .item{ | |
1244 | margin-right: 0.5em; |
|
1248 | margin-right: 0.5em; | |
1245 | } |
|
1249 | } | |
1246 | } |
|
1250 | } | |
1247 |
|
1251 | |||
1248 | #editor_container{ |
|
1252 | #editor_container{ | |
1249 | position: relative; |
|
1253 | position: relative; | |
1250 | margin: @padding; |
|
1254 | margin: @padding; | |
1251 | } |
|
1255 | } | |
1252 | } |
|
1256 | } | |
1253 |
|
1257 | |||
1254 | #file_history_container { |
|
1258 | #file_history_container { | |
1255 | display: none; |
|
1259 | display: none; | |
1256 | } |
|
1260 | } | |
1257 |
|
1261 | |||
1258 | .file-history-inner { |
|
1262 | .file-history-inner { | |
1259 | margin-bottom: 10px; |
|
1263 | margin-bottom: 10px; | |
1260 | } |
|
1264 | } | |
1261 |
|
1265 | |||
1262 | // Pull Requests |
|
1266 | // Pull Requests | |
1263 | .summary-details { |
|
1267 | .summary-details { | |
1264 | width: 72%; |
|
1268 | width: 72%; | |
1265 | } |
|
1269 | } | |
1266 | .pr-summary { |
|
1270 | .pr-summary { | |
1267 | border-bottom: @border-thickness solid @grey5; |
|
1271 | border-bottom: @border-thickness solid @grey5; | |
1268 | margin-bottom: @space; |
|
1272 | margin-bottom: @space; | |
1269 | } |
|
1273 | } | |
1270 | .reviewers-title { |
|
1274 | .reviewers-title { | |
1271 | width: 25%; |
|
1275 | width: 25%; | |
1272 | min-width: 200px; |
|
1276 | min-width: 200px; | |
1273 | } |
|
1277 | } | |
1274 | .reviewers { |
|
1278 | .reviewers { | |
1275 | width: 25%; |
|
1279 | width: 25%; | |
1276 | min-width: 200px; |
|
1280 | min-width: 200px; | |
1277 | } |
|
1281 | } | |
1278 | .reviewers ul li { |
|
1282 | .reviewers ul li { | |
1279 | position: relative; |
|
1283 | position: relative; | |
1280 | width: 100%; |
|
1284 | width: 100%; | |
1281 | margin-bottom: 8px; |
|
1285 | margin-bottom: 8px; | |
1282 | } |
|
1286 | } | |
1283 | .reviewers_member { |
|
1287 | .reviewers_member { | |
1284 | width: 100%; |
|
1288 | width: 100%; | |
1285 | overflow: auto; |
|
1289 | overflow: auto; | |
1286 | } |
|
1290 | } | |
1287 | .reviewer_reason { |
|
1291 | .reviewer_reason { | |
1288 | padding-left: 20px; |
|
1292 | padding-left: 20px; | |
1289 | } |
|
1293 | } | |
1290 | .reviewer_status { |
|
1294 | .reviewer_status { | |
1291 | display: inline-block; |
|
1295 | display: inline-block; | |
1292 | vertical-align: top; |
|
1296 | vertical-align: top; | |
1293 | width: 7%; |
|
1297 | width: 7%; | |
1294 | min-width: 20px; |
|
1298 | min-width: 20px; | |
1295 | height: 1.2em; |
|
1299 | height: 1.2em; | |
1296 | margin-top: 3px; |
|
1300 | margin-top: 3px; | |
1297 | line-height: 1em; |
|
1301 | line-height: 1em; | |
1298 | } |
|
1302 | } | |
1299 |
|
1303 | |||
1300 | .reviewer_name { |
|
1304 | .reviewer_name { | |
1301 | display: inline-block; |
|
1305 | display: inline-block; | |
1302 | max-width: 83%; |
|
1306 | max-width: 83%; | |
1303 | padding-right: 20px; |
|
1307 | padding-right: 20px; | |
1304 | vertical-align: middle; |
|
1308 | vertical-align: middle; | |
1305 | line-height: 1; |
|
1309 | line-height: 1; | |
1306 |
|
1310 | |||
1307 | .rc-user { |
|
1311 | .rc-user { | |
1308 | min-width: 0; |
|
1312 | min-width: 0; | |
1309 | margin: -2px 1em 0 0; |
|
1313 | margin: -2px 1em 0 0; | |
1310 | } |
|
1314 | } | |
1311 |
|
1315 | |||
1312 | .reviewer { |
|
1316 | .reviewer { | |
1313 | float: left; |
|
1317 | float: left; | |
1314 | } |
|
1318 | } | |
1315 |
|
1319 | |||
1316 | &.to-delete { |
|
1320 | &.to-delete { | |
1317 | .user, |
|
1321 | .user, | |
1318 | .reviewer { |
|
1322 | .reviewer { | |
1319 | text-decoration: line-through; |
|
1323 | text-decoration: line-through; | |
1320 | } |
|
1324 | } | |
1321 | } |
|
1325 | } | |
1322 | } |
|
1326 | } | |
1323 |
|
1327 | |||
1324 | .reviewer_member_remove { |
|
1328 | .reviewer_member_remove { | |
1325 | position: absolute; |
|
1329 | position: absolute; | |
1326 | right: 0; |
|
1330 | right: 0; | |
1327 | top: 0; |
|
1331 | top: 0; | |
1328 | width: 16px; |
|
1332 | width: 16px; | |
1329 | margin-bottom: 10px; |
|
1333 | margin-bottom: 10px; | |
1330 | padding: 0; |
|
1334 | padding: 0; | |
1331 | color: black; |
|
1335 | color: black; | |
1332 | } |
|
1336 | } | |
1333 | .reviewer_member_status { |
|
1337 | .reviewer_member_status { | |
1334 | margin-top: 5px; |
|
1338 | margin-top: 5px; | |
1335 | } |
|
1339 | } | |
1336 | .pr-summary #summary{ |
|
1340 | .pr-summary #summary{ | |
1337 | width: 100%; |
|
1341 | width: 100%; | |
1338 | } |
|
1342 | } | |
1339 | .pr-summary .action_button:hover { |
|
1343 | .pr-summary .action_button:hover { | |
1340 | border: 0; |
|
1344 | border: 0; | |
1341 | cursor: pointer; |
|
1345 | cursor: pointer; | |
1342 | } |
|
1346 | } | |
1343 | .pr-details-title { |
|
1347 | .pr-details-title { | |
1344 | padding-bottom: 8px; |
|
1348 | padding-bottom: 8px; | |
1345 | border-bottom: @border-thickness solid @grey5; |
|
1349 | border-bottom: @border-thickness solid @grey5; | |
1346 |
|
1350 | |||
1347 | .action_button.disabled { |
|
1351 | .action_button.disabled { | |
1348 | color: @grey4; |
|
1352 | color: @grey4; | |
1349 | cursor: inherit; |
|
1353 | cursor: inherit; | |
1350 | } |
|
1354 | } | |
1351 | .action_button { |
|
1355 | .action_button { | |
1352 | color: @rcblue; |
|
1356 | color: @rcblue; | |
1353 | } |
|
1357 | } | |
1354 | } |
|
1358 | } | |
1355 | .pr-details-content { |
|
1359 | .pr-details-content { | |
1356 | margin-top: @textmargin; |
|
1360 | margin-top: @textmargin; | |
1357 | margin-bottom: @textmargin; |
|
1361 | margin-bottom: @textmargin; | |
1358 | } |
|
1362 | } | |
1359 | .pr-description { |
|
1363 | .pr-description { | |
1360 | white-space:pre-wrap; |
|
1364 | white-space:pre-wrap; | |
1361 | } |
|
1365 | } | |
1362 | .group_members { |
|
1366 | .group_members { | |
1363 | margin-top: 0; |
|
1367 | margin-top: 0; | |
1364 | padding: 0; |
|
1368 | padding: 0; | |
1365 | list-style: outside none none; |
|
1369 | list-style: outside none none; | |
1366 |
|
1370 | |||
1367 | img { |
|
1371 | img { | |
1368 | height: @gravatar-size; |
|
1372 | height: @gravatar-size; | |
1369 | width: @gravatar-size; |
|
1373 | width: @gravatar-size; | |
1370 | margin-right: .5em; |
|
1374 | margin-right: .5em; | |
1371 | margin-left: 3px; |
|
1375 | margin-left: 3px; | |
1372 | } |
|
1376 | } | |
1373 |
|
1377 | |||
1374 | .to-delete { |
|
1378 | .to-delete { | |
1375 | .user { |
|
1379 | .user { | |
1376 | text-decoration: line-through; |
|
1380 | text-decoration: line-through; | |
1377 | } |
|
1381 | } | |
1378 | } |
|
1382 | } | |
1379 | } |
|
1383 | } | |
1380 |
|
1384 | |||
1381 | // new entry in group_members |
|
1385 | // new entry in group_members | |
1382 | .td-author-new-entry { |
|
1386 | .td-author-new-entry { | |
1383 | background-color: rgba(red(@alert1), green(@alert1), blue(@alert1), 0.3); |
|
1387 | background-color: rgba(red(@alert1), green(@alert1), blue(@alert1), 0.3); | |
1384 | } |
|
1388 | } | |
1385 |
|
1389 | |||
1386 | .usergroup_member_remove { |
|
1390 | .usergroup_member_remove { | |
1387 | width: 16px; |
|
1391 | width: 16px; | |
1388 | margin-bottom: 10px; |
|
1392 | margin-bottom: 10px; | |
1389 | padding: 0; |
|
1393 | padding: 0; | |
1390 | color: black !important; |
|
1394 | color: black !important; | |
1391 | cursor: pointer; |
|
1395 | cursor: pointer; | |
1392 | } |
|
1396 | } | |
1393 |
|
1397 | |||
1394 | .reviewer_ac .ac-input { |
|
1398 | .reviewer_ac .ac-input { | |
1395 | width: 92%; |
|
1399 | width: 92%; | |
1396 | margin-bottom: 1em; |
|
1400 | margin-bottom: 1em; | |
1397 | } |
|
1401 | } | |
1398 |
|
1402 | |||
1399 | .compare_view_commits tr{ |
|
1403 | .compare_view_commits tr{ | |
1400 | height: 20px; |
|
1404 | height: 20px; | |
1401 | } |
|
1405 | } | |
1402 | .compare_view_commits td { |
|
1406 | .compare_view_commits td { | |
1403 | vertical-align: top; |
|
1407 | vertical-align: top; | |
1404 | padding-top: 10px; |
|
1408 | padding-top: 10px; | |
1405 | } |
|
1409 | } | |
1406 | .compare_view_commits .author { |
|
1410 | .compare_view_commits .author { | |
1407 | margin-left: 5px; |
|
1411 | margin-left: 5px; | |
1408 | } |
|
1412 | } | |
1409 |
|
1413 | |||
1410 | .compare_view_files { |
|
1414 | .compare_view_files { | |
1411 | width: 100%; |
|
1415 | width: 100%; | |
1412 |
|
1416 | |||
1413 | td { |
|
1417 | td { | |
1414 | vertical-align: middle; |
|
1418 | vertical-align: middle; | |
1415 | } |
|
1419 | } | |
1416 | } |
|
1420 | } | |
1417 |
|
1421 | |||
1418 | .compare_view_filepath { |
|
1422 | .compare_view_filepath { | |
1419 | color: @grey1; |
|
1423 | color: @grey1; | |
1420 | } |
|
1424 | } | |
1421 |
|
1425 | |||
1422 | .show_more { |
|
1426 | .show_more { | |
1423 | display: inline-block; |
|
1427 | display: inline-block; | |
1424 | position: relative; |
|
1428 | position: relative; | |
1425 | vertical-align: middle; |
|
1429 | vertical-align: middle; | |
1426 | width: 4px; |
|
1430 | width: 4px; | |
1427 | height: @basefontsize; |
|
1431 | height: @basefontsize; | |
1428 |
|
1432 | |||
1429 | &:after { |
|
1433 | &:after { | |
1430 | content: "\00A0\25BE"; |
|
1434 | content: "\00A0\25BE"; | |
1431 | display: inline-block; |
|
1435 | display: inline-block; | |
1432 | width:10px; |
|
1436 | width:10px; | |
1433 | line-height: 5px; |
|
1437 | line-height: 5px; | |
1434 | font-size: 12px; |
|
1438 | font-size: 12px; | |
1435 | cursor: pointer; |
|
1439 | cursor: pointer; | |
1436 | } |
|
1440 | } | |
1437 | } |
|
1441 | } | |
1438 |
|
1442 | |||
1439 | .journal_more .show_more { |
|
1443 | .journal_more .show_more { | |
1440 | display: inline; |
|
1444 | display: inline; | |
1441 |
|
1445 | |||
1442 | &:after { |
|
1446 | &:after { | |
1443 | content: none; |
|
1447 | content: none; | |
1444 | } |
|
1448 | } | |
1445 | } |
|
1449 | } | |
1446 |
|
1450 | |||
1447 | .open .show_more:after, |
|
1451 | .open .show_more:after, | |
1448 | .select2-dropdown-open .show_more:after { |
|
1452 | .select2-dropdown-open .show_more:after { | |
1449 | .rotate(180deg); |
|
1453 | .rotate(180deg); | |
1450 | margin-left: 4px; |
|
1454 | margin-left: 4px; | |
1451 | } |
|
1455 | } | |
1452 |
|
1456 | |||
1453 |
|
1457 | |||
1454 | .compare_view_commits .collapse_commit:after { |
|
1458 | .compare_view_commits .collapse_commit:after { | |
1455 | cursor: pointer; |
|
1459 | cursor: pointer; | |
1456 | content: "\00A0\25B4"; |
|
1460 | content: "\00A0\25B4"; | |
1457 | margin-left: -3px; |
|
1461 | margin-left: -3px; | |
1458 | font-size: 17px; |
|
1462 | font-size: 17px; | |
1459 | color: @grey4; |
|
1463 | color: @grey4; | |
1460 | } |
|
1464 | } | |
1461 |
|
1465 | |||
1462 | .diff_links { |
|
1466 | .diff_links { | |
1463 | margin-left: 8px; |
|
1467 | margin-left: 8px; | |
1464 | } |
|
1468 | } | |
1465 |
|
1469 | |||
1466 | p.ancestor { |
|
1470 | p.ancestor { | |
1467 | margin: @padding 0; |
|
1471 | margin: @padding 0; | |
1468 | } |
|
1472 | } | |
1469 |
|
1473 | |||
1470 | .cs_icon_td input[type="checkbox"] { |
|
1474 | .cs_icon_td input[type="checkbox"] { | |
1471 | display: none; |
|
1475 | display: none; | |
1472 | } |
|
1476 | } | |
1473 |
|
1477 | |||
1474 | .cs_icon_td .expand_file_icon:after { |
|
1478 | .cs_icon_td .expand_file_icon:after { | |
1475 | cursor: pointer; |
|
1479 | cursor: pointer; | |
1476 | content: "\00A0\25B6"; |
|
1480 | content: "\00A0\25B6"; | |
1477 | font-size: 12px; |
|
1481 | font-size: 12px; | |
1478 | color: @grey4; |
|
1482 | color: @grey4; | |
1479 | } |
|
1483 | } | |
1480 |
|
1484 | |||
1481 | .cs_icon_td .collapse_file_icon:after { |
|
1485 | .cs_icon_td .collapse_file_icon:after { | |
1482 | cursor: pointer; |
|
1486 | cursor: pointer; | |
1483 | content: "\00A0\25BC"; |
|
1487 | content: "\00A0\25BC"; | |
1484 | font-size: 12px; |
|
1488 | font-size: 12px; | |
1485 | color: @grey4; |
|
1489 | color: @grey4; | |
1486 | } |
|
1490 | } | |
1487 |
|
1491 | |||
1488 | /*new binary |
|
1492 | /*new binary | |
1489 | NEW_FILENODE = 1 |
|
1493 | NEW_FILENODE = 1 | |
1490 | DEL_FILENODE = 2 |
|
1494 | DEL_FILENODE = 2 | |
1491 | MOD_FILENODE = 3 |
|
1495 | MOD_FILENODE = 3 | |
1492 | RENAMED_FILENODE = 4 |
|
1496 | RENAMED_FILENODE = 4 | |
1493 | COPIED_FILENODE = 5 |
|
1497 | COPIED_FILENODE = 5 | |
1494 | CHMOD_FILENODE = 6 |
|
1498 | CHMOD_FILENODE = 6 | |
1495 | BIN_FILENODE = 7 |
|
1499 | BIN_FILENODE = 7 | |
1496 | */ |
|
1500 | */ | |
1497 | .cs_files_expand { |
|
1501 | .cs_files_expand { | |
1498 | font-size: @basefontsize + 5px; |
|
1502 | font-size: @basefontsize + 5px; | |
1499 | line-height: 1.8em; |
|
1503 | line-height: 1.8em; | |
1500 | float: right; |
|
1504 | float: right; | |
1501 | } |
|
1505 | } | |
1502 |
|
1506 | |||
1503 | .cs_files_expand span{ |
|
1507 | .cs_files_expand span{ | |
1504 | color: @rcblue; |
|
1508 | color: @rcblue; | |
1505 | cursor: pointer; |
|
1509 | cursor: pointer; | |
1506 | } |
|
1510 | } | |
1507 | .cs_files { |
|
1511 | .cs_files { | |
1508 | clear: both; |
|
1512 | clear: both; | |
1509 | padding-bottom: @padding; |
|
1513 | padding-bottom: @padding; | |
1510 |
|
1514 | |||
1511 | .cur_cs { |
|
1515 | .cur_cs { | |
1512 | margin: 10px 2px; |
|
1516 | margin: 10px 2px; | |
1513 | font-weight: bold; |
|
1517 | font-weight: bold; | |
1514 | } |
|
1518 | } | |
1515 |
|
1519 | |||
1516 | .node { |
|
1520 | .node { | |
1517 | float: left; |
|
1521 | float: left; | |
1518 | } |
|
1522 | } | |
1519 |
|
1523 | |||
1520 | .changes { |
|
1524 | .changes { | |
1521 | float: right; |
|
1525 | float: right; | |
1522 | color: white; |
|
1526 | color: white; | |
1523 | font-size: @basefontsize - 4px; |
|
1527 | font-size: @basefontsize - 4px; | |
1524 | margin-top: 4px; |
|
1528 | margin-top: 4px; | |
1525 | opacity: 0.6; |
|
1529 | opacity: 0.6; | |
1526 | filter: Alpha(opacity=60); /* IE8 and earlier */ |
|
1530 | filter: Alpha(opacity=60); /* IE8 and earlier */ | |
1527 |
|
1531 | |||
1528 | .added { |
|
1532 | .added { | |
1529 | background-color: @alert1; |
|
1533 | background-color: @alert1; | |
1530 | float: left; |
|
1534 | float: left; | |
1531 | text-align: center; |
|
1535 | text-align: center; | |
1532 | } |
|
1536 | } | |
1533 |
|
1537 | |||
1534 | .deleted { |
|
1538 | .deleted { | |
1535 | background-color: @alert2; |
|
1539 | background-color: @alert2; | |
1536 | float: left; |
|
1540 | float: left; | |
1537 | text-align: center; |
|
1541 | text-align: center; | |
1538 | } |
|
1542 | } | |
1539 |
|
1543 | |||
1540 | .bin { |
|
1544 | .bin { | |
1541 | background-color: @alert1; |
|
1545 | background-color: @alert1; | |
1542 | text-align: center; |
|
1546 | text-align: center; | |
1543 | } |
|
1547 | } | |
1544 |
|
1548 | |||
1545 | /*new binary*/ |
|
1549 | /*new binary*/ | |
1546 | .bin.bin1 { |
|
1550 | .bin.bin1 { | |
1547 | background-color: @alert1; |
|
1551 | background-color: @alert1; | |
1548 | text-align: center; |
|
1552 | text-align: center; | |
1549 | } |
|
1553 | } | |
1550 |
|
1554 | |||
1551 | /*deleted binary*/ |
|
1555 | /*deleted binary*/ | |
1552 | .bin.bin2 { |
|
1556 | .bin.bin2 { | |
1553 | background-color: @alert2; |
|
1557 | background-color: @alert2; | |
1554 | text-align: center; |
|
1558 | text-align: center; | |
1555 | } |
|
1559 | } | |
1556 |
|
1560 | |||
1557 | /*mod binary*/ |
|
1561 | /*mod binary*/ | |
1558 | .bin.bin3 { |
|
1562 | .bin.bin3 { | |
1559 | background-color: @grey2; |
|
1563 | background-color: @grey2; | |
1560 | text-align: center; |
|
1564 | text-align: center; | |
1561 | } |
|
1565 | } | |
1562 |
|
1566 | |||
1563 | /*rename file*/ |
|
1567 | /*rename file*/ | |
1564 | .bin.bin4 { |
|
1568 | .bin.bin4 { | |
1565 | background-color: @alert4; |
|
1569 | background-color: @alert4; | |
1566 | text-align: center; |
|
1570 | text-align: center; | |
1567 | } |
|
1571 | } | |
1568 |
|
1572 | |||
1569 | /*copied file*/ |
|
1573 | /*copied file*/ | |
1570 | .bin.bin5 { |
|
1574 | .bin.bin5 { | |
1571 | background-color: @alert4; |
|
1575 | background-color: @alert4; | |
1572 | text-align: center; |
|
1576 | text-align: center; | |
1573 | } |
|
1577 | } | |
1574 |
|
1578 | |||
1575 | /*chmod file*/ |
|
1579 | /*chmod file*/ | |
1576 | .bin.bin6 { |
|
1580 | .bin.bin6 { | |
1577 | background-color: @grey2; |
|
1581 | background-color: @grey2; | |
1578 | text-align: center; |
|
1582 | text-align: center; | |
1579 | } |
|
1583 | } | |
1580 | } |
|
1584 | } | |
1581 | } |
|
1585 | } | |
1582 |
|
1586 | |||
1583 | .cs_files .cs_added, .cs_files .cs_A, |
|
1587 | .cs_files .cs_added, .cs_files .cs_A, | |
1584 | .cs_files .cs_added, .cs_files .cs_M, |
|
1588 | .cs_files .cs_added, .cs_files .cs_M, | |
1585 | .cs_files .cs_added, .cs_files .cs_D { |
|
1589 | .cs_files .cs_added, .cs_files .cs_D { | |
1586 | height: 16px; |
|
1590 | height: 16px; | |
1587 | padding-right: 10px; |
|
1591 | padding-right: 10px; | |
1588 | margin-top: 7px; |
|
1592 | margin-top: 7px; | |
1589 | text-align: left; |
|
1593 | text-align: left; | |
1590 | } |
|
1594 | } | |
1591 |
|
1595 | |||
1592 | .cs_icon_td { |
|
1596 | .cs_icon_td { | |
1593 | min-width: 16px; |
|
1597 | min-width: 16px; | |
1594 | width: 16px; |
|
1598 | width: 16px; | |
1595 | } |
|
1599 | } | |
1596 |
|
1600 | |||
1597 | .pull-request-merge { |
|
1601 | .pull-request-merge { | |
1598 | padding: 10px 0; |
|
1602 | padding: 10px 0; | |
1599 | margin-top: 10px; |
|
1603 | margin-top: 10px; | |
1600 | margin-bottom: 20px; |
|
1604 | margin-bottom: 20px; | |
1601 | } |
|
1605 | } | |
1602 |
|
1606 | |||
1603 | .pull-request-merge .pull-request-wrap { |
|
1607 | .pull-request-merge .pull-request-wrap { | |
1604 | height: 25px; |
|
1608 | height: 25px; | |
1605 | padding: 5px 0; |
|
1609 | padding: 5px 0; | |
1606 | } |
|
1610 | } | |
1607 |
|
1611 | |||
1608 | .pull-request-merge span { |
|
1612 | .pull-request-merge span { | |
1609 | margin-right: 10px; |
|
1613 | margin-right: 10px; | |
1610 | } |
|
1614 | } | |
1611 | #close_pull_request { |
|
1615 | #close_pull_request { | |
1612 | margin-right: 0px; |
|
1616 | margin-right: 0px; | |
1613 | } |
|
1617 | } | |
1614 |
|
1618 | |||
1615 | .empty_data { |
|
1619 | .empty_data { | |
1616 | color: @grey4; |
|
1620 | color: @grey4; | |
1617 | } |
|
1621 | } | |
1618 |
|
1622 | |||
1619 | #changeset_compare_view_content { |
|
1623 | #changeset_compare_view_content { | |
1620 | margin-bottom: @space; |
|
1624 | margin-bottom: @space; | |
1621 | clear: both; |
|
1625 | clear: both; | |
1622 | width: 100%; |
|
1626 | width: 100%; | |
1623 | box-sizing: border-box; |
|
1627 | box-sizing: border-box; | |
1624 | .border-radius(@border-radius); |
|
1628 | .border-radius(@border-radius); | |
1625 |
|
1629 | |||
1626 | .help-block { |
|
1630 | .help-block { | |
1627 | margin: @padding 0; |
|
1631 | margin: @padding 0; | |
1628 | color: @text-color; |
|
1632 | color: @text-color; | |
1629 | } |
|
1633 | } | |
1630 |
|
1634 | |||
1631 | .empty_data { |
|
1635 | .empty_data { | |
1632 | margin: @padding 0; |
|
1636 | margin: @padding 0; | |
1633 | } |
|
1637 | } | |
1634 |
|
1638 | |||
1635 | .alert { |
|
1639 | .alert { | |
1636 | margin-bottom: @space; |
|
1640 | margin-bottom: @space; | |
1637 | } |
|
1641 | } | |
1638 | } |
|
1642 | } | |
1639 |
|
1643 | |||
1640 | .table_disp { |
|
1644 | .table_disp { | |
1641 | .status { |
|
1645 | .status { | |
1642 | width: auto; |
|
1646 | width: auto; | |
1643 |
|
1647 | |||
1644 | .flag_status { |
|
1648 | .flag_status { | |
1645 | float: left; |
|
1649 | float: left; | |
1646 | } |
|
1650 | } | |
1647 | } |
|
1651 | } | |
1648 | } |
|
1652 | } | |
1649 |
|
1653 | |||
1650 | .status_box_menu { |
|
1654 | .status_box_menu { | |
1651 | margin: 0; |
|
1655 | margin: 0; | |
1652 | } |
|
1656 | } | |
1653 |
|
1657 | |||
1654 | .notification-table{ |
|
1658 | .notification-table{ | |
1655 | margin-bottom: @space; |
|
1659 | margin-bottom: @space; | |
1656 | display: table; |
|
1660 | display: table; | |
1657 | width: 100%; |
|
1661 | width: 100%; | |
1658 |
|
1662 | |||
1659 | .container{ |
|
1663 | .container{ | |
1660 | display: table-row; |
|
1664 | display: table-row; | |
1661 |
|
1665 | |||
1662 | .notification-header{ |
|
1666 | .notification-header{ | |
1663 | border-bottom: @border-thickness solid @border-default-color; |
|
1667 | border-bottom: @border-thickness solid @border-default-color; | |
1664 | } |
|
1668 | } | |
1665 |
|
1669 | |||
1666 | .notification-subject{ |
|
1670 | .notification-subject{ | |
1667 | display: table-cell; |
|
1671 | display: table-cell; | |
1668 | } |
|
1672 | } | |
1669 | } |
|
1673 | } | |
1670 | } |
|
1674 | } | |
1671 |
|
1675 | |||
1672 | // Notifications |
|
1676 | // Notifications | |
1673 | .notification-header{ |
|
1677 | .notification-header{ | |
1674 | display: table; |
|
1678 | display: table; | |
1675 | width: 100%; |
|
1679 | width: 100%; | |
1676 | padding: floor(@basefontsize/2) 0; |
|
1680 | padding: floor(@basefontsize/2) 0; | |
1677 | line-height: 1em; |
|
1681 | line-height: 1em; | |
1678 |
|
1682 | |||
1679 | .desc, .delete-notifications, .read-notifications{ |
|
1683 | .desc, .delete-notifications, .read-notifications{ | |
1680 | display: table-cell; |
|
1684 | display: table-cell; | |
1681 | text-align: left; |
|
1685 | text-align: left; | |
1682 | } |
|
1686 | } | |
1683 |
|
1687 | |||
1684 | .desc{ |
|
1688 | .desc{ | |
1685 | width: 1163px; |
|
1689 | width: 1163px; | |
1686 | } |
|
1690 | } | |
1687 |
|
1691 | |||
1688 | .delete-notifications, .read-notifications{ |
|
1692 | .delete-notifications, .read-notifications{ | |
1689 | width: 35px; |
|
1693 | width: 35px; | |
1690 | min-width: 35px; //fixes when only one button is displayed |
|
1694 | min-width: 35px; //fixes when only one button is displayed | |
1691 | } |
|
1695 | } | |
1692 | } |
|
1696 | } | |
1693 |
|
1697 | |||
1694 | .notification-body { |
|
1698 | .notification-body { | |
1695 | .markdown-block, |
|
1699 | .markdown-block, | |
1696 | .rst-block { |
|
1700 | .rst-block { | |
1697 | padding: @padding 0; |
|
1701 | padding: @padding 0; | |
1698 | } |
|
1702 | } | |
1699 |
|
1703 | |||
1700 | .notification-subject { |
|
1704 | .notification-subject { | |
1701 | padding: @textmargin 0; |
|
1705 | padding: @textmargin 0; | |
1702 | border-bottom: @border-thickness solid @border-default-color; |
|
1706 | border-bottom: @border-thickness solid @border-default-color; | |
1703 | } |
|
1707 | } | |
1704 | } |
|
1708 | } | |
1705 |
|
1709 | |||
1706 |
|
1710 | |||
1707 | .notifications_buttons{ |
|
1711 | .notifications_buttons{ | |
1708 | float: right; |
|
1712 | float: right; | |
1709 | } |
|
1713 | } | |
1710 |
|
1714 | |||
1711 | #notification-status{ |
|
1715 | #notification-status{ | |
1712 | display: inline; |
|
1716 | display: inline; | |
1713 | } |
|
1717 | } | |
1714 |
|
1718 | |||
1715 | // Repositories |
|
1719 | // Repositories | |
1716 |
|
1720 | |||
1717 | #summary.fields{ |
|
1721 | #summary.fields{ | |
1718 | display: table; |
|
1722 | display: table; | |
1719 |
|
1723 | |||
1720 | .field{ |
|
1724 | .field{ | |
1721 | display: table-row; |
|
1725 | display: table-row; | |
1722 |
|
1726 | |||
1723 | .label-summary{ |
|
1727 | .label-summary{ | |
1724 | display: table-cell; |
|
1728 | display: table-cell; | |
1725 | min-width: @label-summary-minwidth; |
|
1729 | min-width: @label-summary-minwidth; | |
1726 | padding-top: @padding/2; |
|
1730 | padding-top: @padding/2; | |
1727 | padding-bottom: @padding/2; |
|
1731 | padding-bottom: @padding/2; | |
1728 | padding-right: @padding/2; |
|
1732 | padding-right: @padding/2; | |
1729 | } |
|
1733 | } | |
1730 |
|
1734 | |||
1731 | .input{ |
|
1735 | .input{ | |
1732 | display: table-cell; |
|
1736 | display: table-cell; | |
1733 | padding: @padding/2; |
|
1737 | padding: @padding/2; | |
1734 |
|
1738 | |||
1735 | input{ |
|
1739 | input{ | |
1736 | min-width: 29em; |
|
1740 | min-width: 29em; | |
1737 | padding: @padding/4; |
|
1741 | padding: @padding/4; | |
1738 | } |
|
1742 | } | |
1739 | } |
|
1743 | } | |
1740 | .statistics, .downloads{ |
|
1744 | .statistics, .downloads{ | |
1741 | .disabled{ |
|
1745 | .disabled{ | |
1742 | color: @grey4; |
|
1746 | color: @grey4; | |
1743 | } |
|
1747 | } | |
1744 | } |
|
1748 | } | |
1745 | } |
|
1749 | } | |
1746 | } |
|
1750 | } | |
1747 |
|
1751 | |||
1748 | #summary{ |
|
1752 | #summary{ | |
1749 | width: 70%; |
|
1753 | width: 70%; | |
1750 | } |
|
1754 | } | |
1751 |
|
1755 | |||
1752 |
|
1756 | |||
1753 | // Journal |
|
1757 | // Journal | |
1754 | .journal.title { |
|
1758 | .journal.title { | |
1755 | h5 { |
|
1759 | h5 { | |
1756 | float: left; |
|
1760 | float: left; | |
1757 | margin: 0; |
|
1761 | margin: 0; | |
1758 | width: 70%; |
|
1762 | width: 70%; | |
1759 | } |
|
1763 | } | |
1760 |
|
1764 | |||
1761 | ul { |
|
1765 | ul { | |
1762 | float: right; |
|
1766 | float: right; | |
1763 | display: inline-block; |
|
1767 | display: inline-block; | |
1764 | margin: 0; |
|
1768 | margin: 0; | |
1765 | width: 30%; |
|
1769 | width: 30%; | |
1766 | text-align: right; |
|
1770 | text-align: right; | |
1767 |
|
1771 | |||
1768 | li { |
|
1772 | li { | |
1769 | display: inline; |
|
1773 | display: inline; | |
1770 | font-size: @journal-fontsize; |
|
1774 | font-size: @journal-fontsize; | |
1771 | line-height: 1em; |
|
1775 | line-height: 1em; | |
1772 |
|
1776 | |||
1773 | &:before { content: none; } |
|
1777 | &:before { content: none; } | |
1774 | } |
|
1778 | } | |
1775 | } |
|
1779 | } | |
1776 | } |
|
1780 | } | |
1777 |
|
1781 | |||
1778 | .filterexample { |
|
1782 | .filterexample { | |
1779 | position: absolute; |
|
1783 | position: absolute; | |
1780 | top: 95px; |
|
1784 | top: 95px; | |
1781 | left: @contentpadding; |
|
1785 | left: @contentpadding; | |
1782 | color: @rcblue; |
|
1786 | color: @rcblue; | |
1783 | font-size: 11px; |
|
1787 | font-size: 11px; | |
1784 | font-family: @text-regular; |
|
1788 | font-family: @text-regular; | |
1785 | cursor: help; |
|
1789 | cursor: help; | |
1786 |
|
1790 | |||
1787 | &:hover { |
|
1791 | &:hover { | |
1788 | color: @rcdarkblue; |
|
1792 | color: @rcdarkblue; | |
1789 | } |
|
1793 | } | |
1790 |
|
1794 | |||
1791 | @media (max-width:768px) { |
|
1795 | @media (max-width:768px) { | |
1792 | position: relative; |
|
1796 | position: relative; | |
1793 | top: auto; |
|
1797 | top: auto; | |
1794 | left: auto; |
|
1798 | left: auto; | |
1795 | display: block; |
|
1799 | display: block; | |
1796 | } |
|
1800 | } | |
1797 | } |
|
1801 | } | |
1798 |
|
1802 | |||
1799 |
|
1803 | |||
1800 | #journal{ |
|
1804 | #journal{ | |
1801 | margin-bottom: @space; |
|
1805 | margin-bottom: @space; | |
1802 |
|
1806 | |||
1803 | .journal_day{ |
|
1807 | .journal_day{ | |
1804 | margin-bottom: @textmargin/2; |
|
1808 | margin-bottom: @textmargin/2; | |
1805 | padding-bottom: @textmargin/2; |
|
1809 | padding-bottom: @textmargin/2; | |
1806 | font-size: @journal-fontsize; |
|
1810 | font-size: @journal-fontsize; | |
1807 | border-bottom: @border-thickness solid @border-default-color; |
|
1811 | border-bottom: @border-thickness solid @border-default-color; | |
1808 | } |
|
1812 | } | |
1809 |
|
1813 | |||
1810 | .journal_container{ |
|
1814 | .journal_container{ | |
1811 | margin-bottom: @space; |
|
1815 | margin-bottom: @space; | |
1812 |
|
1816 | |||
1813 | .journal_user{ |
|
1817 | .journal_user{ | |
1814 | display: inline-block; |
|
1818 | display: inline-block; | |
1815 | } |
|
1819 | } | |
1816 | .journal_action_container{ |
|
1820 | .journal_action_container{ | |
1817 | display: block; |
|
1821 | display: block; | |
1818 | margin-top: @textmargin; |
|
1822 | margin-top: @textmargin; | |
1819 |
|
1823 | |||
1820 | div{ |
|
1824 | div{ | |
1821 | display: inline; |
|
1825 | display: inline; | |
1822 | } |
|
1826 | } | |
1823 |
|
1827 | |||
1824 | div.journal_action_params{ |
|
1828 | div.journal_action_params{ | |
1825 | display: block; |
|
1829 | display: block; | |
1826 | } |
|
1830 | } | |
1827 |
|
1831 | |||
1828 | div.journal_repo:after{ |
|
1832 | div.journal_repo:after{ | |
1829 | content: "\A"; |
|
1833 | content: "\A"; | |
1830 | white-space: pre; |
|
1834 | white-space: pre; | |
1831 | } |
|
1835 | } | |
1832 |
|
1836 | |||
1833 | div.date{ |
|
1837 | div.date{ | |
1834 | display: block; |
|
1838 | display: block; | |
1835 | margin-bottom: @textmargin; |
|
1839 | margin-bottom: @textmargin; | |
1836 | } |
|
1840 | } | |
1837 | } |
|
1841 | } | |
1838 | } |
|
1842 | } | |
1839 | } |
|
1843 | } | |
1840 |
|
1844 | |||
1841 | // Files |
|
1845 | // Files | |
1842 | .edit-file-title { |
|
1846 | .edit-file-title { | |
1843 | border-bottom: @border-thickness solid @border-default-color; |
|
1847 | border-bottom: @border-thickness solid @border-default-color; | |
1844 |
|
1848 | |||
1845 | .breadcrumbs { |
|
1849 | .breadcrumbs { | |
1846 | margin-bottom: 0; |
|
1850 | margin-bottom: 0; | |
1847 | } |
|
1851 | } | |
1848 | } |
|
1852 | } | |
1849 |
|
1853 | |||
1850 | .edit-file-fieldset { |
|
1854 | .edit-file-fieldset { | |
1851 | margin-top: @sidebarpadding; |
|
1855 | margin-top: @sidebarpadding; | |
1852 |
|
1856 | |||
1853 | .fieldset { |
|
1857 | .fieldset { | |
1854 | .left-label { |
|
1858 | .left-label { | |
1855 | width: 13%; |
|
1859 | width: 13%; | |
1856 | } |
|
1860 | } | |
1857 | .right-content { |
|
1861 | .right-content { | |
1858 | width: 87%; |
|
1862 | width: 87%; | |
1859 | max-width: 100%; |
|
1863 | max-width: 100%; | |
1860 | } |
|
1864 | } | |
1861 | .filename-label { |
|
1865 | .filename-label { | |
1862 | margin-top: 13px; |
|
1866 | margin-top: 13px; | |
1863 | } |
|
1867 | } | |
1864 | .commit-message-label { |
|
1868 | .commit-message-label { | |
1865 | margin-top: 4px; |
|
1869 | margin-top: 4px; | |
1866 | } |
|
1870 | } | |
1867 | .file-upload-input { |
|
1871 | .file-upload-input { | |
1868 | input { |
|
1872 | input { | |
1869 | display: none; |
|
1873 | display: none; | |
1870 | } |
|
1874 | } | |
1871 | } |
|
1875 | } | |
1872 | p { |
|
1876 | p { | |
1873 | margin-top: 5px; |
|
1877 | margin-top: 5px; | |
1874 | } |
|
1878 | } | |
1875 |
|
1879 | |||
1876 | } |
|
1880 | } | |
1877 | .custom-path-link { |
|
1881 | .custom-path-link { | |
1878 | margin-left: 5px; |
|
1882 | margin-left: 5px; | |
1879 | } |
|
1883 | } | |
1880 | #commit { |
|
1884 | #commit { | |
1881 | resize: vertical; |
|
1885 | resize: vertical; | |
1882 | } |
|
1886 | } | |
1883 | } |
|
1887 | } | |
1884 |
|
1888 | |||
1885 | .delete-file-preview { |
|
1889 | .delete-file-preview { | |
1886 | max-height: 250px; |
|
1890 | max-height: 250px; | |
1887 | } |
|
1891 | } | |
1888 |
|
1892 | |||
1889 | .new-file, |
|
1893 | .new-file, | |
1890 | #filter_activate, |
|
1894 | #filter_activate, | |
1891 | #filter_deactivate { |
|
1895 | #filter_deactivate { | |
1892 | float: left; |
|
1896 | float: left; | |
1893 | margin: 0 0 0 15px; |
|
1897 | margin: 0 0 0 15px; | |
1894 | } |
|
1898 | } | |
1895 |
|
1899 | |||
1896 | h3.files_location{ |
|
1900 | h3.files_location{ | |
1897 | line-height: 2.4em; |
|
1901 | line-height: 2.4em; | |
1898 | } |
|
1902 | } | |
1899 |
|
1903 | |||
1900 | .browser-nav { |
|
1904 | .browser-nav { | |
1901 | display: table; |
|
1905 | display: table; | |
1902 | margin-bottom: @space; |
|
1906 | margin-bottom: @space; | |
1903 |
|
1907 | |||
1904 |
|
1908 | |||
1905 | .info_box { |
|
1909 | .info_box { | |
1906 | display: inline-table; |
|
1910 | display: inline-table; | |
1907 | height: 2.5em; |
|
1911 | height: 2.5em; | |
1908 |
|
1912 | |||
1909 | .browser-cur-rev, .info_box_elem { |
|
1913 | .browser-cur-rev, .info_box_elem { | |
1910 | display: table-cell; |
|
1914 | display: table-cell; | |
1911 | vertical-align: middle; |
|
1915 | vertical-align: middle; | |
1912 | } |
|
1916 | } | |
1913 |
|
1917 | |||
1914 | .info_box_elem { |
|
1918 | .info_box_elem { | |
1915 | border-top: @border-thickness solid @rcblue; |
|
1919 | border-top: @border-thickness solid @rcblue; | |
1916 | border-bottom: @border-thickness solid @rcblue; |
|
1920 | border-bottom: @border-thickness solid @rcblue; | |
1917 |
|
1921 | |||
1918 | #at_rev, a { |
|
1922 | #at_rev, a { | |
1919 | padding: 0.6em 0.9em; |
|
1923 | padding: 0.6em 0.9em; | |
1920 | margin: 0; |
|
1924 | margin: 0; | |
1921 | .box-shadow(none); |
|
1925 | .box-shadow(none); | |
1922 | border: 0; |
|
1926 | border: 0; | |
1923 | height: 12px; |
|
1927 | height: 12px; | |
1924 | } |
|
1928 | } | |
1925 |
|
1929 | |||
1926 | input#at_rev { |
|
1930 | input#at_rev { | |
1927 | max-width: 50px; |
|
1931 | max-width: 50px; | |
1928 | text-align: right; |
|
1932 | text-align: right; | |
1929 | } |
|
1933 | } | |
1930 |
|
1934 | |||
1931 | &.previous { |
|
1935 | &.previous { | |
1932 | border: @border-thickness solid @rcblue; |
|
1936 | border: @border-thickness solid @rcblue; | |
1933 | .disabled { |
|
1937 | .disabled { | |
1934 | color: @grey4; |
|
1938 | color: @grey4; | |
1935 | cursor: not-allowed; |
|
1939 | cursor: not-allowed; | |
1936 | } |
|
1940 | } | |
1937 | } |
|
1941 | } | |
1938 |
|
1942 | |||
1939 | &.next { |
|
1943 | &.next { | |
1940 | border: @border-thickness solid @rcblue; |
|
1944 | border: @border-thickness solid @rcblue; | |
1941 | .disabled { |
|
1945 | .disabled { | |
1942 | color: @grey4; |
|
1946 | color: @grey4; | |
1943 | cursor: not-allowed; |
|
1947 | cursor: not-allowed; | |
1944 | } |
|
1948 | } | |
1945 | } |
|
1949 | } | |
1946 | } |
|
1950 | } | |
1947 |
|
1951 | |||
1948 | .browser-cur-rev { |
|
1952 | .browser-cur-rev { | |
1949 |
|
1953 | |||
1950 | span{ |
|
1954 | span{ | |
1951 | margin: 0; |
|
1955 | margin: 0; | |
1952 | color: @rcblue; |
|
1956 | color: @rcblue; | |
1953 | height: 12px; |
|
1957 | height: 12px; | |
1954 | display: inline-block; |
|
1958 | display: inline-block; | |
1955 | padding: 0.7em 1em ; |
|
1959 | padding: 0.7em 1em ; | |
1956 | border: @border-thickness solid @rcblue; |
|
1960 | border: @border-thickness solid @rcblue; | |
1957 | margin-right: @padding; |
|
1961 | margin-right: @padding; | |
1958 | } |
|
1962 | } | |
1959 | } |
|
1963 | } | |
1960 | } |
|
1964 | } | |
1961 |
|
1965 | |||
1962 | .search_activate { |
|
1966 | .search_activate { | |
1963 | display: table-cell; |
|
1967 | display: table-cell; | |
1964 | vertical-align: middle; |
|
1968 | vertical-align: middle; | |
1965 |
|
1969 | |||
1966 | input, label{ |
|
1970 | input, label{ | |
1967 | margin: 0; |
|
1971 | margin: 0; | |
1968 | padding: 0; |
|
1972 | padding: 0; | |
1969 | } |
|
1973 | } | |
1970 |
|
1974 | |||
1971 | input{ |
|
1975 | input{ | |
1972 | margin-left: @textmargin; |
|
1976 | margin-left: @textmargin; | |
1973 | } |
|
1977 | } | |
1974 |
|
1978 | |||
1975 | } |
|
1979 | } | |
1976 | } |
|
1980 | } | |
1977 |
|
1981 | |||
1978 | .browser-cur-rev{ |
|
1982 | .browser-cur-rev{ | |
1979 | margin-bottom: @textmargin; |
|
1983 | margin-bottom: @textmargin; | |
1980 | } |
|
1984 | } | |
1981 |
|
1985 | |||
1982 | #node_filter_box_loading{ |
|
1986 | #node_filter_box_loading{ | |
1983 | .info_text; |
|
1987 | .info_text; | |
1984 | } |
|
1988 | } | |
1985 |
|
1989 | |||
1986 | .browser-search { |
|
1990 | .browser-search { | |
1987 | margin: -25px 0px 5px 0px; |
|
1991 | margin: -25px 0px 5px 0px; | |
1988 | } |
|
1992 | } | |
1989 |
|
1993 | |||
1990 | .node-filter { |
|
1994 | .node-filter { | |
1991 | font-size: @repo-title-fontsize; |
|
1995 | font-size: @repo-title-fontsize; | |
1992 | padding: 4px 0px 0px 0px; |
|
1996 | padding: 4px 0px 0px 0px; | |
1993 |
|
1997 | |||
1994 | .node-filter-path { |
|
1998 | .node-filter-path { | |
1995 | float: left; |
|
1999 | float: left; | |
1996 | color: @grey4; |
|
2000 | color: @grey4; | |
1997 | } |
|
2001 | } | |
1998 | .node-filter-input { |
|
2002 | .node-filter-input { | |
1999 | float: left; |
|
2003 | float: left; | |
2000 | margin: -2px 0px 0px 2px; |
|
2004 | margin: -2px 0px 0px 2px; | |
2001 | input { |
|
2005 | input { | |
2002 | padding: 2px; |
|
2006 | padding: 2px; | |
2003 | border: none; |
|
2007 | border: none; | |
2004 | font-size: @repo-title-fontsize; |
|
2008 | font-size: @repo-title-fontsize; | |
2005 | } |
|
2009 | } | |
2006 | } |
|
2010 | } | |
2007 | } |
|
2011 | } | |
2008 |
|
2012 | |||
2009 |
|
2013 | |||
2010 | .browser-result{ |
|
2014 | .browser-result{ | |
2011 | td a{ |
|
2015 | td a{ | |
2012 | margin-left: 0.5em; |
|
2016 | margin-left: 0.5em; | |
2013 | display: inline-block; |
|
2017 | display: inline-block; | |
2014 |
|
2018 | |||
2015 | em{ |
|
2019 | em{ | |
2016 | font-family: @text-bold; |
|
2020 | font-family: @text-bold; | |
2017 | } |
|
2021 | } | |
2018 | } |
|
2022 | } | |
2019 | } |
|
2023 | } | |
2020 |
|
2024 | |||
2021 | .browser-highlight{ |
|
2025 | .browser-highlight{ | |
2022 | background-color: @grey5-alpha; |
|
2026 | background-color: @grey5-alpha; | |
2023 | } |
|
2027 | } | |
2024 |
|
2028 | |||
2025 |
|
2029 | |||
2026 | // Search |
|
2030 | // Search | |
2027 |
|
2031 | |||
2028 | .search-form{ |
|
2032 | .search-form{ | |
2029 | #q { |
|
2033 | #q { | |
2030 | width: @search-form-width; |
|
2034 | width: @search-form-width; | |
2031 | } |
|
2035 | } | |
2032 | .fields{ |
|
2036 | .fields{ | |
2033 | margin: 0 0 @space; |
|
2037 | margin: 0 0 @space; | |
2034 | } |
|
2038 | } | |
2035 |
|
2039 | |||
2036 | label{ |
|
2040 | label{ | |
2037 | display: inline-block; |
|
2041 | display: inline-block; | |
2038 | margin-right: @textmargin; |
|
2042 | margin-right: @textmargin; | |
2039 | padding-top: 0.25em; |
|
2043 | padding-top: 0.25em; | |
2040 | } |
|
2044 | } | |
2041 |
|
2045 | |||
2042 |
|
2046 | |||
2043 | .results{ |
|
2047 | .results{ | |
2044 | clear: both; |
|
2048 | clear: both; | |
2045 | margin: 0 0 @padding; |
|
2049 | margin: 0 0 @padding; | |
2046 | } |
|
2050 | } | |
2047 | } |
|
2051 | } | |
2048 |
|
2052 | |||
2049 | div.search-feedback-items { |
|
2053 | div.search-feedback-items { | |
2050 | display: inline-block; |
|
2054 | display: inline-block; | |
2051 | padding:0px 0px 0px 96px; |
|
2055 | padding:0px 0px 0px 96px; | |
2052 | } |
|
2056 | } | |
2053 |
|
2057 | |||
2054 | div.search-code-body { |
|
2058 | div.search-code-body { | |
2055 | background-color: #ffffff; padding: 5px 0 5px 10px; |
|
2059 | background-color: #ffffff; padding: 5px 0 5px 10px; | |
2056 | pre { |
|
2060 | pre { | |
2057 | .match { background-color: #faffa6;} |
|
2061 | .match { background-color: #faffa6;} | |
2058 | .break { display: block; width: 100%; background-color: #DDE7EF; color: #747474; } |
|
2062 | .break { display: block; width: 100%; background-color: #DDE7EF; color: #747474; } | |
2059 | } |
|
2063 | } | |
2060 | } |
|
2064 | } | |
2061 |
|
2065 | |||
2062 | .expand_commit.search { |
|
2066 | .expand_commit.search { | |
2063 | .show_more.open { |
|
2067 | .show_more.open { | |
2064 | height: auto; |
|
2068 | height: auto; | |
2065 | max-height: none; |
|
2069 | max-height: none; | |
2066 | } |
|
2070 | } | |
2067 | } |
|
2071 | } | |
2068 |
|
2072 | |||
2069 | .search-results { |
|
2073 | .search-results { | |
2070 |
|
2074 | |||
2071 | h2 { |
|
2075 | h2 { | |
2072 | margin-bottom: 0; |
|
2076 | margin-bottom: 0; | |
2073 | } |
|
2077 | } | |
2074 | .codeblock { |
|
2078 | .codeblock { | |
2075 | border: none; |
|
2079 | border: none; | |
2076 | background: transparent; |
|
2080 | background: transparent; | |
2077 | } |
|
2081 | } | |
2078 |
|
2082 | |||
2079 | .codeblock-header { |
|
2083 | .codeblock-header { | |
2080 | border: none; |
|
2084 | border: none; | |
2081 | background: transparent; |
|
2085 | background: transparent; | |
2082 | } |
|
2086 | } | |
2083 |
|
2087 | |||
2084 | .code-body { |
|
2088 | .code-body { | |
2085 | border: @border-thickness solid @border-default-color; |
|
2089 | border: @border-thickness solid @border-default-color; | |
2086 | .border-radius(@border-radius); |
|
2090 | .border-radius(@border-radius); | |
2087 | } |
|
2091 | } | |
2088 |
|
2092 | |||
2089 | .td-commit { |
|
2093 | .td-commit { | |
2090 | &:extend(pre); |
|
2094 | &:extend(pre); | |
2091 | border-bottom: @border-thickness solid @border-default-color; |
|
2095 | border-bottom: @border-thickness solid @border-default-color; | |
2092 | } |
|
2096 | } | |
2093 |
|
2097 | |||
2094 | .message { |
|
2098 | .message { | |
2095 | height: auto; |
|
2099 | height: auto; | |
2096 | max-width: 350px; |
|
2100 | max-width: 350px; | |
2097 | white-space: normal; |
|
2101 | white-space: normal; | |
2098 | text-overflow: initial; |
|
2102 | text-overflow: initial; | |
2099 | overflow: visible; |
|
2103 | overflow: visible; | |
2100 |
|
2104 | |||
2101 | .match { background-color: #faffa6;} |
|
2105 | .match { background-color: #faffa6;} | |
2102 | .break { background-color: #DDE7EF; width: 100%; color: #747474; display: block; } |
|
2106 | .break { background-color: #DDE7EF; width: 100%; color: #747474; display: block; } | |
2103 | } |
|
2107 | } | |
2104 |
|
2108 | |||
2105 | } |
|
2109 | } | |
2106 |
|
2110 | |||
2107 | table.rctable td.td-search-results div { |
|
2111 | table.rctable td.td-search-results div { | |
2108 | max-width: 100%; |
|
2112 | max-width: 100%; | |
2109 | } |
|
2113 | } | |
2110 |
|
2114 | |||
2111 | #tip-box, .tip-box{ |
|
2115 | #tip-box, .tip-box{ | |
2112 | padding: @menupadding/2; |
|
2116 | padding: @menupadding/2; | |
2113 | display: block; |
|
2117 | display: block; | |
2114 | border: @border-thickness solid @border-highlight-color; |
|
2118 | border: @border-thickness solid @border-highlight-color; | |
2115 | .border-radius(@border-radius); |
|
2119 | .border-radius(@border-radius); | |
2116 | background-color: white; |
|
2120 | background-color: white; | |
2117 | z-index: 99; |
|
2121 | z-index: 99; | |
2118 | white-space: pre-wrap; |
|
2122 | white-space: pre-wrap; | |
2119 | } |
|
2123 | } | |
2120 |
|
2124 | |||
2121 | #linktt { |
|
2125 | #linktt { | |
2122 | width: 79px; |
|
2126 | width: 79px; | |
2123 | } |
|
2127 | } | |
2124 |
|
2128 | |||
2125 | #help_kb .modal-content{ |
|
2129 | #help_kb .modal-content{ | |
2126 | max-width: 750px; |
|
2130 | max-width: 750px; | |
2127 | margin: 10% auto; |
|
2131 | margin: 10% auto; | |
2128 |
|
2132 | |||
2129 | table{ |
|
2133 | table{ | |
2130 | td,th{ |
|
2134 | td,th{ | |
2131 | border-bottom: none; |
|
2135 | border-bottom: none; | |
2132 | line-height: 2.5em; |
|
2136 | line-height: 2.5em; | |
2133 | } |
|
2137 | } | |
2134 | th{ |
|
2138 | th{ | |
2135 | padding-bottom: @textmargin/2; |
|
2139 | padding-bottom: @textmargin/2; | |
2136 | } |
|
2140 | } | |
2137 | td.keys{ |
|
2141 | td.keys{ | |
2138 | text-align: center; |
|
2142 | text-align: center; | |
2139 | } |
|
2143 | } | |
2140 | } |
|
2144 | } | |
2141 |
|
2145 | |||
2142 | .block-left{ |
|
2146 | .block-left{ | |
2143 | width: 45%; |
|
2147 | width: 45%; | |
2144 | margin-right: 5%; |
|
2148 | margin-right: 5%; | |
2145 | } |
|
2149 | } | |
2146 | .modal-footer{ |
|
2150 | .modal-footer{ | |
2147 | clear: both; |
|
2151 | clear: both; | |
2148 | } |
|
2152 | } | |
2149 | .key.tag{ |
|
2153 | .key.tag{ | |
2150 | padding: 0.5em; |
|
2154 | padding: 0.5em; | |
2151 | background-color: @rcblue; |
|
2155 | background-color: @rcblue; | |
2152 | color: white; |
|
2156 | color: white; | |
2153 | border-color: @rcblue; |
|
2157 | border-color: @rcblue; | |
2154 | .box-shadow(none); |
|
2158 | .box-shadow(none); | |
2155 | } |
|
2159 | } | |
2156 | } |
|
2160 | } | |
2157 |
|
2161 | |||
2158 |
|
2162 | |||
2159 |
|
2163 | |||
2160 | //--- IMPORTS FOR REFACTORED STYLES ------------------// |
|
2164 | //--- IMPORTS FOR REFACTORED STYLES ------------------// | |
2161 |
|
2165 | |||
2162 | @import 'statistics-graph'; |
|
2166 | @import 'statistics-graph'; | |
2163 | @import 'tables'; |
|
2167 | @import 'tables'; | |
2164 | @import 'forms'; |
|
2168 | @import 'forms'; | |
2165 | @import 'diff'; |
|
2169 | @import 'diff'; | |
2166 | @import 'summary'; |
|
2170 | @import 'summary'; | |
2167 | @import 'navigation'; |
|
2171 | @import 'navigation'; | |
2168 |
|
2172 | |||
2169 | //--- SHOW/HIDE SECTIONS --// |
|
2173 | //--- SHOW/HIDE SECTIONS --// | |
2170 |
|
2174 | |||
2171 | .btn-collapse { |
|
2175 | .btn-collapse { | |
2172 | float: right; |
|
2176 | float: right; | |
2173 | text-align: right; |
|
2177 | text-align: right; | |
2174 | font-family: @text-light; |
|
2178 | font-family: @text-light; | |
2175 | font-size: @basefontsize; |
|
2179 | font-size: @basefontsize; | |
2176 | cursor: pointer; |
|
2180 | cursor: pointer; | |
2177 | border: none; |
|
2181 | border: none; | |
2178 | color: @rcblue; |
|
2182 | color: @rcblue; | |
2179 | } |
|
2183 | } | |
2180 |
|
2184 | |||
2181 | table.rctable, |
|
2185 | table.rctable, | |
2182 | table.dataTable { |
|
2186 | table.dataTable { | |
2183 | .btn-collapse { |
|
2187 | .btn-collapse { | |
2184 | float: right; |
|
2188 | float: right; | |
2185 | text-align: right; |
|
2189 | text-align: right; | |
2186 | } |
|
2190 | } | |
2187 | } |
|
2191 | } | |
2188 |
|
2192 | |||
2189 |
|
2193 | |||
2190 | // TODO: johbo: Fix for IE10, this avoids that we see a border |
|
2194 | // TODO: johbo: Fix for IE10, this avoids that we see a border | |
2191 | // and padding around checkboxes and radio boxes. Move to the right place, |
|
2195 | // and padding around checkboxes and radio boxes. Move to the right place, | |
2192 | // or better: Remove this once we did the form refactoring. |
|
2196 | // or better: Remove this once we did the form refactoring. | |
2193 | input[type=checkbox], |
|
2197 | input[type=checkbox], | |
2194 | input[type=radio] { |
|
2198 | input[type=radio] { | |
2195 | padding: 0; |
|
2199 | padding: 0; | |
2196 | border: none; |
|
2200 | border: none; | |
2197 | } |
|
2201 | } | |
2198 |
|
2202 | |||
2199 | .toggle-ajax-spinner{ |
|
2203 | .toggle-ajax-spinner{ | |
2200 | height: 16px; |
|
2204 | height: 16px; | |
2201 | width: 16px; |
|
2205 | width: 16px; | |
2202 | } |
|
2206 | } |
@@ -1,627 +1,640 b'' | |||||
1 | // # Copyright (C) 2010-2016 RhodeCode GmbH |
|
1 | // # Copyright (C) 2010-2016 RhodeCode GmbH | |
2 | // # |
|
2 | // # | |
3 | // # This program is free software: you can redistribute it and/or modify |
|
3 | // # This program is free software: you can redistribute it and/or modify | |
4 | // # it under the terms of the GNU Affero General Public License, version 3 |
|
4 | // # it under the terms of the GNU Affero General Public License, version 3 | |
5 | // # (only), as published by the Free Software Foundation. |
|
5 | // # (only), as published by the Free Software Foundation. | |
6 | // # |
|
6 | // # | |
7 | // # This program is distributed in the hope that it will be useful, |
|
7 | // # This program is distributed in the hope that it will be useful, | |
8 | // # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
8 | // # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
9 | // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
9 | // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
10 | // # GNU General Public License for more details. |
|
10 | // # GNU General Public License for more details. | |
11 | // # |
|
11 | // # | |
12 | // # You should have received a copy of the GNU Affero General Public License |
|
12 | // # You should have received a copy of the GNU Affero General Public License | |
13 | // # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
13 | // # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
14 | // # |
|
14 | // # | |
15 | // # This program is dual-licensed. If you wish to learn more about the |
|
15 | // # This program is dual-licensed. If you wish to learn more about the | |
16 | // # RhodeCode Enterprise Edition, including its added features, Support services, |
|
16 | // # RhodeCode Enterprise Edition, including its added features, Support services, | |
17 | // # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
17 | // # and proprietary license terms, please see https://rhodecode.com/licenses/ | |
18 |
|
18 | |||
19 | var firefoxAnchorFix = function() { |
|
19 | var firefoxAnchorFix = function() { | |
20 | // hack to make anchor links behave properly on firefox, in our inline |
|
20 | // hack to make anchor links behave properly on firefox, in our inline | |
21 | // comments generation when comments are injected firefox is misbehaving |
|
21 | // comments generation when comments are injected firefox is misbehaving | |
22 | // when jumping to anchor links |
|
22 | // when jumping to anchor links | |
23 | if (location.href.indexOf('#') > -1) { |
|
23 | if (location.href.indexOf('#') > -1) { | |
24 | location.href += ''; |
|
24 | location.href += ''; | |
25 | } |
|
25 | } | |
26 | }; |
|
26 | }; | |
27 |
|
27 | |||
28 | // returns a node from given html; |
|
28 | // returns a node from given html; | |
29 | var fromHTML = function(html){ |
|
29 | var fromHTML = function(html){ | |
30 | var _html = document.createElement('element'); |
|
30 | var _html = document.createElement('element'); | |
31 | _html.innerHTML = html; |
|
31 | _html.innerHTML = html; | |
32 | return _html; |
|
32 | return _html; | |
33 | }; |
|
33 | }; | |
34 |
|
34 | |||
35 | var tableTr = function(cls, body){ |
|
35 | var tableTr = function(cls, body){ | |
36 | var _el = document.createElement('div'); |
|
36 | var _el = document.createElement('div'); | |
37 | var _body = $(body).attr('id'); |
|
37 | var _body = $(body).attr('id'); | |
38 | var comment_id = fromHTML(body).children[0].id.split('comment-')[1]; |
|
38 | var comment_id = fromHTML(body).children[0].id.split('comment-')[1]; | |
39 | var id = 'comment-tr-{0}'.format(comment_id); |
|
39 | var id = 'comment-tr-{0}'.format(comment_id); | |
40 | var _html = ('<table><tbody><tr id="{0}" class="{1}">'+ |
|
40 | var _html = ('<table><tbody><tr id="{0}" class="{1}">'+ | |
41 | '<td class="add-comment-line tooltip tooltip" title="Add Comment"><span class="add-comment-content"></span></td>'+ |
|
41 | '<td class="add-comment-line tooltip tooltip" title="Add Comment"><span class="add-comment-content"></span></td>'+ | |
42 | '<td></td>'+ |
|
42 | '<td></td>'+ | |
43 | '<td></td>'+ |
|
43 | '<td></td>'+ | |
44 | '<td></td>'+ |
|
44 | '<td></td>'+ | |
45 | '<td>{2}</td>'+ |
|
45 | '<td>{2}</td>'+ | |
46 | '</tr></tbody></table>').format(id, cls, body); |
|
46 | '</tr></tbody></table>').format(id, cls, body); | |
47 | $(_el).html(_html); |
|
47 | $(_el).html(_html); | |
48 | return _el.children[0].children[0].children[0]; |
|
48 | return _el.children[0].children[0].children[0]; | |
49 | }; |
|
49 | }; | |
50 |
|
50 | |||
51 | function bindDeleteCommentButtons() { |
|
51 | function bindDeleteCommentButtons() { | |
52 | $('.delete-comment').one('click', function() { |
|
52 | $('.delete-comment').one('click', function() { | |
53 | var comment_id = $(this).data("comment-id"); |
|
53 | var comment_id = $(this).data("comment-id"); | |
54 |
|
54 | |||
55 | if (comment_id){ |
|
55 | if (comment_id){ | |
56 | deleteComment(comment_id); |
|
56 | deleteComment(comment_id); | |
57 | } |
|
57 | } | |
58 | }); |
|
58 | }); | |
59 | } |
|
59 | } | |
60 |
|
60 | |||
61 | var deleteComment = function(comment_id) { |
|
61 | var deleteComment = function(comment_id) { | |
62 | var url = AJAX_COMMENT_DELETE_URL.replace('__COMMENT_ID__', comment_id); |
|
62 | var url = AJAX_COMMENT_DELETE_URL.replace('__COMMENT_ID__', comment_id); | |
63 | var postData = { |
|
63 | var postData = { | |
64 | '_method': 'delete', |
|
64 | '_method': 'delete', | |
65 | 'csrf_token': CSRF_TOKEN |
|
65 | 'csrf_token': CSRF_TOKEN | |
66 | }; |
|
66 | }; | |
67 |
|
67 | |||
68 | var success = function(o) { |
|
68 | var success = function(o) { | |
69 | window.location.reload(); |
|
69 | window.location.reload(); | |
70 | }; |
|
70 | }; | |
71 | ajaxPOST(url, postData, success); |
|
71 | ajaxPOST(url, postData, success); | |
72 | }; |
|
72 | }; | |
73 |
|
73 | |||
74 |
|
74 | |||
75 | var bindToggleButtons = function() { |
|
75 | var bindToggleButtons = function() { | |
76 | $('.comment-toggle').on('click', function() { |
|
76 | $('.comment-toggle').on('click', function() { | |
77 | $(this).parent().nextUntil('tr.line').toggle('inline-comments'); |
|
77 | $(this).parent().nextUntil('tr.line').toggle('inline-comments'); | |
78 | }); |
|
78 | }); | |
79 | }; |
|
79 | }; | |
80 |
|
80 | |||
81 | var linkifyComments = function(comments) { |
|
81 | var linkifyComments = function(comments) { | |
82 | /* TODO: dan: remove this - it should no longer needed */ |
|
82 | /* TODO: dan: remove this - it should no longer needed */ | |
83 | for (var i = 0; i < comments.length; i++) { |
|
83 | for (var i = 0; i < comments.length; i++) { | |
84 | var comment_id = $(comments[i]).data('comment-id'); |
|
84 | var comment_id = $(comments[i]).data('comment-id'); | |
85 | var prev_comment_id = $(comments[i - 1]).data('comment-id'); |
|
85 | var prev_comment_id = $(comments[i - 1]).data('comment-id'); | |
86 | var next_comment_id = $(comments[i + 1]).data('comment-id'); |
|
86 | var next_comment_id = $(comments[i + 1]).data('comment-id'); | |
87 |
|
87 | |||
88 | // place next/prev links |
|
88 | // place next/prev links | |
89 | if (prev_comment_id) { |
|
89 | if (prev_comment_id) { | |
90 | $('#prev_c_' + comment_id).show(); |
|
90 | $('#prev_c_' + comment_id).show(); | |
91 | $('#prev_c_' + comment_id + " a.arrow_comment_link").attr( |
|
91 | $('#prev_c_' + comment_id + " a.arrow_comment_link").attr( | |
92 | 'href', '#comment-' + prev_comment_id).removeClass('disabled'); |
|
92 | 'href', '#comment-' + prev_comment_id).removeClass('disabled'); | |
93 | } |
|
93 | } | |
94 | if (next_comment_id) { |
|
94 | if (next_comment_id) { | |
95 | $('#next_c_' + comment_id).show(); |
|
95 | $('#next_c_' + comment_id).show(); | |
96 | $('#next_c_' + comment_id + " a.arrow_comment_link").attr( |
|
96 | $('#next_c_' + comment_id + " a.arrow_comment_link").attr( | |
97 | 'href', '#comment-' + next_comment_id).removeClass('disabled'); |
|
97 | 'href', '#comment-' + next_comment_id).removeClass('disabled'); | |
98 | } |
|
98 | } | |
99 | // place a first link to the total counter |
|
99 | // place a first link to the total counter | |
100 | if (i === 0) { |
|
100 | if (i === 0) { | |
101 | $('#inline-comments-counter').attr('href', '#comment-' + comment_id); |
|
101 | $('#inline-comments-counter').attr('href', '#comment-' + comment_id); | |
102 | } |
|
102 | } | |
103 | } |
|
103 | } | |
104 |
|
104 | |||
105 | }; |
|
105 | }; | |
106 |
|
106 | |||
107 |
|
107 | |||
108 | /* Comment form for main and inline comments */ |
|
108 | /* Comment form for main and inline comments */ | |
109 | var CommentForm = (function() { |
|
109 | var CommentForm = (function() { | |
110 | "use strict"; |
|
110 | "use strict"; | |
111 |
|
111 | |||
112 | function CommentForm(formElement, commitId, pullRequestId, lineNo, initAutocompleteActions) { |
|
112 | function CommentForm(formElement, commitId, pullRequestId, lineNo, initAutocompleteActions) { | |
113 |
|
113 | |||
114 | this.withLineNo = function(selector) { |
|
114 | this.withLineNo = function(selector) { | |
115 | var lineNo = this.lineNo; |
|
115 | var lineNo = this.lineNo; | |
116 | if (lineNo === undefined) { |
|
116 | if (lineNo === undefined) { | |
117 | return selector |
|
117 | return selector | |
118 | } else { |
|
118 | } else { | |
119 | return selector + '_' + lineNo; |
|
119 | return selector + '_' + lineNo; | |
120 | } |
|
120 | } | |
121 | }; |
|
121 | }; | |
122 |
|
122 | |||
123 | this.commitId = commitId; |
|
123 | this.commitId = commitId; | |
124 | this.pullRequestId = pullRequestId; |
|
124 | this.pullRequestId = pullRequestId; | |
125 | this.lineNo = lineNo; |
|
125 | this.lineNo = lineNo; | |
126 | this.initAutocompleteActions = initAutocompleteActions; |
|
126 | this.initAutocompleteActions = initAutocompleteActions; | |
127 |
|
127 | |||
128 | this.previewButton = this.withLineNo('#preview-btn'); |
|
128 | this.previewButton = this.withLineNo('#preview-btn'); | |
129 | this.previewContainer = this.withLineNo('#preview-container'); |
|
129 | this.previewContainer = this.withLineNo('#preview-container'); | |
130 |
|
130 | |||
131 | this.previewBoxSelector = this.withLineNo('#preview-box'); |
|
131 | this.previewBoxSelector = this.withLineNo('#preview-box'); | |
132 |
|
132 | |||
133 | this.editButton = this.withLineNo('#edit-btn'); |
|
133 | this.editButton = this.withLineNo('#edit-btn'); | |
134 | this.editContainer = this.withLineNo('#edit-container'); |
|
134 | this.editContainer = this.withLineNo('#edit-container'); | |
135 |
|
135 | |||
136 | this.cancelButton = this.withLineNo('#cancel-btn'); |
|
136 | this.cancelButton = this.withLineNo('#cancel-btn'); | |
137 |
|
137 | |||
138 | this.statusChange = '#change_status'; |
|
138 | this.statusChange = '#change_status'; | |
139 | this.cmBox = this.withLineNo('#text'); |
|
139 | this.cmBox = this.withLineNo('#text'); | |
140 | this.cm = initCommentBoxCodeMirror(this.cmBox, this.initAutocompleteActions); |
|
140 | this.cm = initCommentBoxCodeMirror(this.cmBox, this.initAutocompleteActions); | |
141 |
|
141 | |||
142 | this.submitForm = formElement; |
|
142 | this.submitForm = formElement; | |
143 | this.submitButton = $(this.submitForm).find('input[type="submit"]'); |
|
143 | this.submitButton = $(this.submitForm).find('input[type="submit"]'); | |
144 | this.submitButtonText = this.submitButton.val(); |
|
144 | this.submitButtonText = this.submitButton.val(); | |
145 |
|
145 | |||
146 | this.previewUrl = pyroutes.url('changeset_comment_preview', |
|
146 | this.previewUrl = pyroutes.url('changeset_comment_preview', | |
147 | {'repo_name': templateContext.repo_name}); |
|
147 | {'repo_name': templateContext.repo_name}); | |
148 |
|
148 | |||
149 | // based on commitId, or pullReuqestId decide where do we submit |
|
149 | // based on commitId, or pullReuqestId decide where do we submit | |
150 | // out data |
|
150 | // out data | |
151 | if (this.commitId){ |
|
151 | if (this.commitId){ | |
152 | this.submitUrl = pyroutes.url('changeset_comment', |
|
152 | this.submitUrl = pyroutes.url('changeset_comment', | |
153 | {'repo_name': templateContext.repo_name, |
|
153 | {'repo_name': templateContext.repo_name, | |
154 | 'revision': this.commitId}); |
|
154 | 'revision': this.commitId}); | |
155 |
|
155 | |||
156 | } else if (this.pullRequestId) { |
|
156 | } else if (this.pullRequestId) { | |
157 | this.submitUrl = pyroutes.url('pullrequest_comment', |
|
157 | this.submitUrl = pyroutes.url('pullrequest_comment', | |
158 | {'repo_name': templateContext.repo_name, |
|
158 | {'repo_name': templateContext.repo_name, | |
159 | 'pull_request_id': this.pullRequestId}); |
|
159 | 'pull_request_id': this.pullRequestId}); | |
160 |
|
160 | |||
161 | } else { |
|
161 | } else { | |
162 | throw new Error( |
|
162 | throw new Error( | |
163 | 'CommentForm requires pullRequestId, or commitId to be specified.') |
|
163 | 'CommentForm requires pullRequestId, or commitId to be specified.') | |
164 | } |
|
164 | } | |
165 |
|
165 | |||
166 | this.getCmInstance = function(){ |
|
166 | this.getCmInstance = function(){ | |
167 | return this.cm |
|
167 | return this.cm | |
168 | }; |
|
168 | }; | |
169 |
|
169 | |||
170 | var self = this; |
|
170 | var self = this; | |
171 |
|
171 | |||
172 | this.getCommentStatus = function() { |
|
172 | this.getCommentStatus = function() { | |
173 | return $(this.submitForm).find(this.statusChange).val(); |
|
173 | return $(this.submitForm).find(this.statusChange).val(); | |
174 | }; |
|
174 | }; | |
175 |
|
175 | |||
176 | this.isAllowedToSubmit = function() { |
|
176 | this.isAllowedToSubmit = function() { | |
177 | return !$(this.submitButton).prop('disabled'); |
|
177 | return !$(this.submitButton).prop('disabled'); | |
178 | }; |
|
178 | }; | |
179 |
|
179 | |||
180 | this.initStatusChangeSelector = function(){ |
|
180 | this.initStatusChangeSelector = function(){ | |
181 | var formatChangeStatus = function(state, escapeMarkup) { |
|
181 | var formatChangeStatus = function(state, escapeMarkup) { | |
182 | var originalOption = state.element; |
|
182 | var originalOption = state.element; | |
183 | return '<div class="flag_status ' + $(originalOption).data('status') + ' pull-left"></div>' + |
|
183 | return '<div class="flag_status ' + $(originalOption).data('status') + ' pull-left"></div>' + | |
184 | '<span>' + escapeMarkup(state.text) + '</span>'; |
|
184 | '<span>' + escapeMarkup(state.text) + '</span>'; | |
185 | }; |
|
185 | }; | |
186 | var formatResult = function(result, container, query, escapeMarkup) { |
|
186 | var formatResult = function(result, container, query, escapeMarkup) { | |
187 | return formatChangeStatus(result, escapeMarkup); |
|
187 | return formatChangeStatus(result, escapeMarkup); | |
188 | }; |
|
188 | }; | |
189 |
|
189 | |||
190 | var formatSelection = function(data, container, escapeMarkup) { |
|
190 | var formatSelection = function(data, container, escapeMarkup) { | |
191 | return formatChangeStatus(data, escapeMarkup); |
|
191 | return formatChangeStatus(data, escapeMarkup); | |
192 | }; |
|
192 | }; | |
193 |
|
193 | |||
194 | $(this.submitForm).find(this.statusChange).select2({ |
|
194 | $(this.submitForm).find(this.statusChange).select2({ | |
195 | placeholder: _gettext('Status Review'), |
|
195 | placeholder: _gettext('Status Review'), | |
196 | formatResult: formatResult, |
|
196 | formatResult: formatResult, | |
197 | formatSelection: formatSelection, |
|
197 | formatSelection: formatSelection, | |
198 | containerCssClass: "drop-menu status_box_menu", |
|
198 | containerCssClass: "drop-menu status_box_menu", | |
199 | dropdownCssClass: "drop-menu-dropdown", |
|
199 | dropdownCssClass: "drop-menu-dropdown", | |
200 | dropdownAutoWidth: true, |
|
200 | dropdownAutoWidth: true, | |
201 | minimumResultsForSearch: -1 |
|
201 | minimumResultsForSearch: -1 | |
202 | }); |
|
202 | }); | |
203 | $(this.submitForm).find(this.statusChange).on('change', function() { |
|
203 | $(this.submitForm).find(this.statusChange).on('change', function() { | |
204 | var status = self.getCommentStatus(); |
|
204 | var status = self.getCommentStatus(); | |
205 | if (status && !self.lineNo) { |
|
205 | if (status && !self.lineNo) { | |
206 | $(self.submitButton).prop('disabled', false); |
|
206 | $(self.submitButton).prop('disabled', false); | |
207 | } |
|
207 | } | |
208 | //todo, fix this name |
|
208 | //todo, fix this name | |
209 | var placeholderText = _gettext('Comment text will be set automatically based on currently selected status ({0}) ...').format(status); |
|
209 | var placeholderText = _gettext('Comment text will be set automatically based on currently selected status ({0}) ...').format(status); | |
210 | self.cm.setOption('placeholder', placeholderText); |
|
210 | self.cm.setOption('placeholder', placeholderText); | |
211 | }) |
|
211 | }) | |
212 | }; |
|
212 | }; | |
213 |
|
213 | |||
214 | // reset the comment form into it's original state |
|
214 | // reset the comment form into it's original state | |
215 | this.resetCommentFormState = function(content) { |
|
215 | this.resetCommentFormState = function(content) { | |
216 | content = content || ''; |
|
216 | content = content || ''; | |
217 |
|
217 | |||
218 | $(this.editContainer).show(); |
|
218 | $(this.editContainer).show(); | |
219 | $(this.editButton).hide(); |
|
219 | $(this.editButton).hide(); | |
220 |
|
220 | |||
221 | $(this.previewContainer).hide(); |
|
221 | $(this.previewContainer).hide(); | |
222 | $(this.previewButton).show(); |
|
222 | $(this.previewButton).show(); | |
223 |
|
223 | |||
224 | this.setActionButtonsDisabled(true); |
|
224 | this.setActionButtonsDisabled(true); | |
225 | self.cm.setValue(content); |
|
225 | self.cm.setValue(content); | |
226 | self.cm.setOption("readOnly", false); |
|
226 | self.cm.setOption("readOnly", false); | |
227 | }; |
|
227 | }; | |
228 |
|
228 | |||
229 | this.submitAjaxPOST = function(url, postData, successHandler, failHandler) { |
|
229 | this.submitAjaxPOST = function(url, postData, successHandler, failHandler) { | |
230 | failHandler = failHandler || function() {}; |
|
230 | failHandler = failHandler || function() {}; | |
231 | var postData = toQueryString(postData); |
|
231 | var postData = toQueryString(postData); | |
232 | var request = $.ajax({ |
|
232 | var request = $.ajax({ | |
233 | url: url, |
|
233 | url: url, | |
234 | type: 'POST', |
|
234 | type: 'POST', | |
235 | data: postData, |
|
235 | data: postData, | |
236 | headers: {'X-PARTIAL-XHR': true} |
|
236 | headers: {'X-PARTIAL-XHR': true} | |
237 | }) |
|
237 | }) | |
238 | .done(function(data) { |
|
238 | .done(function(data) { | |
239 | successHandler(data); |
|
239 | successHandler(data); | |
240 | }) |
|
240 | }) | |
241 | .fail(function(data, textStatus, errorThrown){ |
|
241 | .fail(function(data, textStatus, errorThrown){ | |
242 | alert( |
|
242 | alert( | |
243 | "Error while submitting comment.\n" + |
|
243 | "Error while submitting comment.\n" + | |
244 | "Error code {0} ({1}).".format(data.status, data.statusText)); |
|
244 | "Error code {0} ({1}).".format(data.status, data.statusText)); | |
245 | failHandler() |
|
245 | failHandler() | |
246 | }); |
|
246 | }); | |
247 | return request; |
|
247 | return request; | |
248 | }; |
|
248 | }; | |
249 |
|
249 | |||
250 | // overwrite a submitHandler, we need to do it for inline comments |
|
250 | // overwrite a submitHandler, we need to do it for inline comments | |
251 | this.setHandleFormSubmit = function(callback) { |
|
251 | this.setHandleFormSubmit = function(callback) { | |
252 | this.handleFormSubmit = callback; |
|
252 | this.handleFormSubmit = callback; | |
253 | }; |
|
253 | }; | |
254 |
|
254 | |||
255 | // default handler for for submit for main comments |
|
255 | // default handler for for submit for main comments | |
256 | this.handleFormSubmit = function() { |
|
256 | this.handleFormSubmit = function() { | |
257 | var text = self.cm.getValue(); |
|
257 | var text = self.cm.getValue(); | |
258 | var status = self.getCommentStatus(); |
|
258 | var status = self.getCommentStatus(); | |
259 |
|
259 | |||
260 | if (text === "" && !status) { |
|
260 | if (text === "" && !status) { | |
261 | return; |
|
261 | return; | |
262 | } |
|
262 | } | |
263 |
|
263 | |||
264 | var excludeCancelBtn = false; |
|
264 | var excludeCancelBtn = false; | |
265 | var submitEvent = true; |
|
265 | var submitEvent = true; | |
266 | self.setActionButtonsDisabled(true, excludeCancelBtn, submitEvent); |
|
266 | self.setActionButtonsDisabled(true, excludeCancelBtn, submitEvent); | |
267 | self.cm.setOption("readOnly", true); |
|
267 | self.cm.setOption("readOnly", true); | |
268 | var postData = { |
|
268 | var postData = { | |
269 | 'text': text, |
|
269 | 'text': text, | |
270 | 'changeset_status': status, |
|
270 | 'changeset_status': status, | |
271 | 'csrf_token': CSRF_TOKEN |
|
271 | 'csrf_token': CSRF_TOKEN | |
272 | }; |
|
272 | }; | |
273 |
|
273 | |||
274 | var submitSuccessCallback = function(o) { |
|
274 | var submitSuccessCallback = function(o) { | |
275 | if (status) { |
|
275 | if (status) { | |
276 | location.reload(true); |
|
276 | location.reload(true); | |
277 | } else { |
|
277 | } else { | |
278 | $('#injected_page_comments').append(o.rendered_text); |
|
278 | $('#injected_page_comments').append(o.rendered_text); | |
279 | self.resetCommentFormState(); |
|
279 | self.resetCommentFormState(); | |
280 | bindDeleteCommentButtons(); |
|
280 | bindDeleteCommentButtons(); | |
281 | timeagoActivate(); |
|
281 | timeagoActivate(); | |
282 | } |
|
282 | } | |
283 | }; |
|
283 | }; | |
284 | var submitFailCallback = function(){ |
|
284 | var submitFailCallback = function(){ | |
285 | self.resetCommentFormState(text) |
|
285 | self.resetCommentFormState(text) | |
286 | }; |
|
286 | }; | |
287 | self.submitAjaxPOST( |
|
287 | self.submitAjaxPOST( | |
288 | self.submitUrl, postData, submitSuccessCallback, submitFailCallback); |
|
288 | self.submitUrl, postData, submitSuccessCallback, submitFailCallback); | |
289 | }; |
|
289 | }; | |
290 |
|
290 | |||
291 | this.previewSuccessCallback = function(o) { |
|
291 | this.previewSuccessCallback = function(o) { | |
292 | $(self.previewBoxSelector).html(o); |
|
292 | $(self.previewBoxSelector).html(o); | |
293 | $(self.previewBoxSelector).removeClass('unloaded'); |
|
293 | $(self.previewBoxSelector).removeClass('unloaded'); | |
294 |
|
294 | |||
295 | // swap buttons |
|
295 | // swap buttons | |
296 | $(self.previewButton).hide(); |
|
296 | $(self.previewButton).hide(); | |
297 | $(self.editButton).show(); |
|
297 | $(self.editButton).show(); | |
298 |
|
298 | |||
299 | // unlock buttons |
|
299 | // unlock buttons | |
300 | self.setActionButtonsDisabled(false); |
|
300 | self.setActionButtonsDisabled(false); | |
301 | }; |
|
301 | }; | |
302 |
|
302 | |||
303 | this.setActionButtonsDisabled = function(state, excludeCancelBtn, submitEvent) { |
|
303 | this.setActionButtonsDisabled = function(state, excludeCancelBtn, submitEvent) { | |
304 | excludeCancelBtn = excludeCancelBtn || false; |
|
304 | excludeCancelBtn = excludeCancelBtn || false; | |
305 | submitEvent = submitEvent || false; |
|
305 | submitEvent = submitEvent || false; | |
306 |
|
306 | |||
307 | $(this.editButton).prop('disabled', state); |
|
307 | $(this.editButton).prop('disabled', state); | |
308 | $(this.previewButton).prop('disabled', state); |
|
308 | $(this.previewButton).prop('disabled', state); | |
309 |
|
309 | |||
310 | if (!excludeCancelBtn) { |
|
310 | if (!excludeCancelBtn) { | |
311 | $(this.cancelButton).prop('disabled', state); |
|
311 | $(this.cancelButton).prop('disabled', state); | |
312 | } |
|
312 | } | |
313 |
|
313 | |||
314 | var submitState = state; |
|
314 | var submitState = state; | |
315 | if (!submitEvent && this.getCommentStatus() && !this.lineNo) { |
|
315 | if (!submitEvent && this.getCommentStatus() && !this.lineNo) { | |
316 | // if the value of commit review status is set, we allow |
|
316 | // if the value of commit review status is set, we allow | |
317 | // submit button, but only on Main form, lineNo means inline |
|
317 | // submit button, but only on Main form, lineNo means inline | |
318 | submitState = false |
|
318 | submitState = false | |
319 | } |
|
319 | } | |
320 | $(this.submitButton).prop('disabled', submitState); |
|
320 | $(this.submitButton).prop('disabled', submitState); | |
321 | if (submitEvent) { |
|
321 | if (submitEvent) { | |
322 | $(this.submitButton).val(_gettext('Submitting...')); |
|
322 | $(this.submitButton).val(_gettext('Submitting...')); | |
323 | } else { |
|
323 | } else { | |
324 | $(this.submitButton).val(this.submitButtonText); |
|
324 | $(this.submitButton).val(this.submitButtonText); | |
325 | } |
|
325 | } | |
326 |
|
326 | |||
327 | }; |
|
327 | }; | |
328 |
|
328 | |||
329 | // lock preview/edit/submit buttons on load, but exclude cancel button |
|
329 | // lock preview/edit/submit buttons on load, but exclude cancel button | |
330 | var excludeCancelBtn = true; |
|
330 | var excludeCancelBtn = true; | |
331 | this.setActionButtonsDisabled(true, excludeCancelBtn); |
|
331 | this.setActionButtonsDisabled(true, excludeCancelBtn); | |
332 |
|
332 | |||
333 | // anonymous users don't have access to initialized CM instance |
|
333 | // anonymous users don't have access to initialized CM instance | |
334 | if (this.cm !== undefined){ |
|
334 | if (this.cm !== undefined){ | |
335 | this.cm.on('change', function(cMirror) { |
|
335 | this.cm.on('change', function(cMirror) { | |
336 | if (cMirror.getValue() === "") { |
|
336 | if (cMirror.getValue() === "") { | |
337 | self.setActionButtonsDisabled(true, excludeCancelBtn) |
|
337 | self.setActionButtonsDisabled(true, excludeCancelBtn) | |
338 | } else { |
|
338 | } else { | |
339 | self.setActionButtonsDisabled(false, excludeCancelBtn) |
|
339 | self.setActionButtonsDisabled(false, excludeCancelBtn) | |
340 | } |
|
340 | } | |
341 | }); |
|
341 | }); | |
342 | } |
|
342 | } | |
343 |
|
343 | |||
344 | $(this.editButton).on('click', function(e) { |
|
344 | $(this.editButton).on('click', function(e) { | |
345 | e.preventDefault(); |
|
345 | e.preventDefault(); | |
346 |
|
346 | |||
347 | $(self.previewButton).show(); |
|
347 | $(self.previewButton).show(); | |
348 | $(self.previewContainer).hide(); |
|
348 | $(self.previewContainer).hide(); | |
349 | $(self.editButton).hide(); |
|
349 | $(self.editButton).hide(); | |
350 | $(self.editContainer).show(); |
|
350 | $(self.editContainer).show(); | |
351 |
|
351 | |||
352 | }); |
|
352 | }); | |
353 |
|
353 | |||
354 | $(this.previewButton).on('click', function(e) { |
|
354 | $(this.previewButton).on('click', function(e) { | |
355 | e.preventDefault(); |
|
355 | e.preventDefault(); | |
356 | var text = self.cm.getValue(); |
|
356 | var text = self.cm.getValue(); | |
357 |
|
357 | |||
358 | if (text === "") { |
|
358 | if (text === "") { | |
359 | return; |
|
359 | return; | |
360 | } |
|
360 | } | |
361 |
|
361 | |||
362 | var postData = { |
|
362 | var postData = { | |
363 | 'text': text, |
|
363 | 'text': text, | |
364 | 'renderer': DEFAULT_RENDERER, |
|
364 | 'renderer': DEFAULT_RENDERER, | |
365 | 'csrf_token': CSRF_TOKEN |
|
365 | 'csrf_token': CSRF_TOKEN | |
366 | }; |
|
366 | }; | |
367 |
|
367 | |||
368 | // lock ALL buttons on preview |
|
368 | // lock ALL buttons on preview | |
369 | self.setActionButtonsDisabled(true); |
|
369 | self.setActionButtonsDisabled(true); | |
370 |
|
370 | |||
371 | $(self.previewBoxSelector).addClass('unloaded'); |
|
371 | $(self.previewBoxSelector).addClass('unloaded'); | |
372 | $(self.previewBoxSelector).html(_gettext('Loading ...')); |
|
372 | $(self.previewBoxSelector).html(_gettext('Loading ...')); | |
373 | $(self.editContainer).hide(); |
|
373 | $(self.editContainer).hide(); | |
374 | $(self.previewContainer).show(); |
|
374 | $(self.previewContainer).show(); | |
375 |
|
375 | |||
376 | // by default we reset state of comment preserving the text |
|
376 | // by default we reset state of comment preserving the text | |
377 | var previewFailCallback = function(){ |
|
377 | var previewFailCallback = function(){ | |
378 | self.resetCommentFormState(text) |
|
378 | self.resetCommentFormState(text) | |
379 | }; |
|
379 | }; | |
380 | self.submitAjaxPOST( |
|
380 | self.submitAjaxPOST( | |
381 | self.previewUrl, postData, self.previewSuccessCallback, previewFailCallback); |
|
381 | self.previewUrl, postData, self.previewSuccessCallback, previewFailCallback); | |
382 |
|
382 | |||
383 | }); |
|
383 | }); | |
384 |
|
384 | |||
385 | $(this.submitForm).submit(function(e) { |
|
385 | $(this.submitForm).submit(function(e) { | |
386 | e.preventDefault(); |
|
386 | e.preventDefault(); | |
387 | var allowedToSubmit = self.isAllowedToSubmit(); |
|
387 | var allowedToSubmit = self.isAllowedToSubmit(); | |
388 | if (!allowedToSubmit){ |
|
388 | if (!allowedToSubmit){ | |
389 | return false; |
|
389 | return false; | |
390 | } |
|
390 | } | |
391 | self.handleFormSubmit(); |
|
391 | self.handleFormSubmit(); | |
392 | }); |
|
392 | }); | |
393 |
|
393 | |||
394 | } |
|
394 | } | |
395 |
|
395 | |||
396 | return CommentForm; |
|
396 | return CommentForm; | |
397 | })(); |
|
397 | })(); | |
398 |
|
398 | |||
399 | var CommentsController = function() { /* comments controller */ |
|
399 | var CommentsController = function() { /* comments controller */ | |
400 | var self = this; |
|
400 | var self = this; | |
401 |
|
401 | |||
402 | this.cancelComment = function(node) { |
|
402 | this.cancelComment = function(node) { | |
403 | var $node = $(node); |
|
403 | var $node = $(node); | |
404 | var $td = $node.closest('td'); |
|
404 | var $td = $node.closest('td'); | |
405 | $node.closest('.comment-inline-form').removeClass('comment-inline-form-open'); |
|
405 | $node.closest('.comment-inline-form').removeClass('comment-inline-form-open'); | |
406 | return false; |
|
406 | return false; | |
407 | }; |
|
407 | }; | |
408 |
|
408 | |||
409 | this.getLineNumber = function(node) { |
|
409 | this.getLineNumber = function(node) { | |
410 | var $node = $(node); |
|
410 | var $node = $(node); | |
411 | return $node.closest('td').attr('data-line-number'); |
|
411 | return $node.closest('td').attr('data-line-number'); | |
412 | }; |
|
412 | }; | |
413 |
|
413 | |||
414 | this.scrollToComment = function(node, offset) { |
|
414 | this.scrollToComment = function(node, offset) { | |
415 | if (!node) { |
|
415 | if (!node) { | |
416 | node = $('.comment-selected'); |
|
416 | node = $('.comment-selected'); | |
417 | if (!node.length) { |
|
417 | if (!node.length) { | |
418 | node = $('comment-current') |
|
418 | node = $('comment-current') | |
419 | } |
|
419 | } | |
420 | } |
|
420 | } | |
421 | $comment = $(node).closest('.comment-current'); |
|
421 | $comment = $(node).closest('.comment-current'); | |
422 | $comments = $('.comment-current'); |
|
422 | $comments = $('.comment-current'); | |
423 |
|
423 | |||
424 | $('.comment-selected').removeClass('comment-selected'); |
|
424 | $('.comment-selected').removeClass('comment-selected'); | |
425 |
|
425 | |||
426 | var nextIdx = $('.comment-current').index($comment) + offset; |
|
426 | var nextIdx = $('.comment-current').index($comment) + offset; | |
427 | if (nextIdx >= $comments.length) { |
|
427 | if (nextIdx >= $comments.length) { | |
428 | nextIdx = 0; |
|
428 | nextIdx = 0; | |
429 | } |
|
429 | } | |
430 | var $next = $('.comment-current').eq(nextIdx); |
|
430 | var $next = $('.comment-current').eq(nextIdx); | |
431 | var $cb = $next.closest('.cb'); |
|
431 | var $cb = $next.closest('.cb'); | |
432 | $cb.removeClass('cb-collapsed'); |
|
432 | $cb.removeClass('cb-collapsed'); | |
433 |
|
433 | |||
434 | var $filediffCollapseState = $cb.closest('.filediff').prev(); |
|
434 | var $filediffCollapseState = $cb.closest('.filediff').prev(); | |
435 | $filediffCollapseState.prop('checked', false); |
|
435 | $filediffCollapseState.prop('checked', false); | |
436 | $next.addClass('comment-selected'); |
|
436 | $next.addClass('comment-selected'); | |
437 | scrollToElement($next); |
|
437 | scrollToElement($next); | |
438 | return false; |
|
438 | return false; | |
439 | }; |
|
439 | }; | |
440 |
|
440 | |||
441 | this.nextComment = function(node) { |
|
441 | this.nextComment = function(node) { | |
442 | return self.scrollToComment(node, 1); |
|
442 | return self.scrollToComment(node, 1); | |
443 | }; |
|
443 | }; | |
444 |
|
444 | |||
445 | this.prevComment = function(node) { |
|
445 | this.prevComment = function(node) { | |
446 | return self.scrollToComment(node, -1); |
|
446 | return self.scrollToComment(node, -1); | |
447 | }; |
|
447 | }; | |
448 |
|
448 | |||
449 | this.deleteComment = function(node) { |
|
449 | this.deleteComment = function(node) { | |
450 | if (!confirm(_gettext('Delete this comment?'))) { |
|
450 | if (!confirm(_gettext('Delete this comment?'))) { | |
451 | return false; |
|
451 | return false; | |
452 | } |
|
452 | } | |
453 | var $node = $(node); |
|
453 | var $node = $(node); | |
454 | var $td = $node.closest('td'); |
|
454 | var $td = $node.closest('td'); | |
455 | var $comment = $node.closest('.comment'); |
|
455 | var $comment = $node.closest('.comment'); | |
456 | var comment_id = $comment.attr('data-comment-id'); |
|
456 | var comment_id = $comment.attr('data-comment-id'); | |
457 | var url = AJAX_COMMENT_DELETE_URL.replace('__COMMENT_ID__', comment_id); |
|
457 | var url = AJAX_COMMENT_DELETE_URL.replace('__COMMENT_ID__', comment_id); | |
458 | var postData = { |
|
458 | var postData = { | |
459 | '_method': 'delete', |
|
459 | '_method': 'delete', | |
460 | 'csrf_token': CSRF_TOKEN |
|
460 | 'csrf_token': CSRF_TOKEN | |
461 | }; |
|
461 | }; | |
462 |
|
462 | |||
463 | $comment.addClass('comment-deleting'); |
|
463 | $comment.addClass('comment-deleting'); | |
464 | $comment.hide('fast'); |
|
464 | $comment.hide('fast'); | |
465 |
|
465 | |||
466 | var success = function(response) { |
|
466 | var success = function(response) { | |
467 | $comment.remove(); |
|
467 | $comment.remove(); | |
468 | return false; |
|
468 | return false; | |
469 | }; |
|
469 | }; | |
470 | var failure = function(data, textStatus, xhr) { |
|
470 | var failure = function(data, textStatus, xhr) { | |
471 | alert("error processing request: " + textStatus); |
|
471 | alert("error processing request: " + textStatus); | |
472 | $comment.show('fast'); |
|
472 | $comment.show('fast'); | |
473 | $comment.removeClass('comment-deleting'); |
|
473 | $comment.removeClass('comment-deleting'); | |
474 | return false; |
|
474 | return false; | |
475 | }; |
|
475 | }; | |
476 | ajaxPOST(url, postData, success, failure); |
|
476 | ajaxPOST(url, postData, success, failure); | |
477 | }; |
|
477 | }; | |
478 |
|
478 | |||
|
479 | this.toggleWideMode = function (node) { | |||
|
480 | if ($('#content').hasClass('wrapper')) { | |||
|
481 | $('#content').removeClass("wrapper"); | |||
|
482 | $('#content').addClass("wide-mode-wrapper"); | |||
|
483 | $(node).addClass('btn-success'); | |||
|
484 | } else { | |||
|
485 | $('#content').removeClass("wide-mode-wrapper"); | |||
|
486 | $('#content').addClass("wrapper"); | |||
|
487 | $(node).removeClass('btn-success'); | |||
|
488 | } | |||
|
489 | return false; | |||
|
490 | }; | |||
|
491 | ||||
479 | this.toggleComments = function(node, show) { |
|
492 | this.toggleComments = function(node, show) { | |
480 | var $filediff = $(node).closest('.filediff'); |
|
493 | var $filediff = $(node).closest('.filediff'); | |
481 | if (show === true) { |
|
494 | if (show === true) { | |
482 | $filediff.removeClass('hide-comments'); |
|
495 | $filediff.removeClass('hide-comments'); | |
483 | } else if (show === false) { |
|
496 | } else if (show === false) { | |
484 | $filediff.find('.hide-line-comments').removeClass('hide-line-comments'); |
|
497 | $filediff.find('.hide-line-comments').removeClass('hide-line-comments'); | |
485 | $filediff.addClass('hide-comments'); |
|
498 | $filediff.addClass('hide-comments'); | |
486 | } else { |
|
499 | } else { | |
487 | $filediff.find('.hide-line-comments').removeClass('hide-line-comments'); |
|
500 | $filediff.find('.hide-line-comments').removeClass('hide-line-comments'); | |
488 | $filediff.toggleClass('hide-comments'); |
|
501 | $filediff.toggleClass('hide-comments'); | |
489 | } |
|
502 | } | |
490 | return false; |
|
503 | return false; | |
491 | }; |
|
504 | }; | |
492 |
|
505 | |||
493 | this.toggleLineComments = function(node) { |
|
506 | this.toggleLineComments = function(node) { | |
494 | self.toggleComments(node, true); |
|
507 | self.toggleComments(node, true); | |
495 | var $node = $(node); |
|
508 | var $node = $(node); | |
496 | $node.closest('tr').toggleClass('hide-line-comments'); |
|
509 | $node.closest('tr').toggleClass('hide-line-comments'); | |
497 | }; |
|
510 | }; | |
498 |
|
511 | |||
499 | this.createComment = function(node) { |
|
512 | this.createComment = function(node) { | |
500 | var $node = $(node); |
|
513 | var $node = $(node); | |
501 | var $td = $node.closest('td'); |
|
514 | var $td = $node.closest('td'); | |
502 | var $form = $td.find('.comment-inline-form'); |
|
515 | var $form = $td.find('.comment-inline-form'); | |
503 |
|
516 | |||
504 | if (!$form.length) { |
|
517 | if (!$form.length) { | |
505 | var tmpl = $('#cb-comment-inline-form-template').html(); |
|
518 | var tmpl = $('#cb-comment-inline-form-template').html(); | |
506 | var $filediff = $node.closest('.filediff'); |
|
519 | var $filediff = $node.closest('.filediff'); | |
507 | $filediff.removeClass('hide-comments'); |
|
520 | $filediff.removeClass('hide-comments'); | |
508 | var f_path = $filediff.attr('data-f-path'); |
|
521 | var f_path = $filediff.attr('data-f-path'); | |
509 | var lineno = self.getLineNumber(node); |
|
522 | var lineno = self.getLineNumber(node); | |
510 | tmpl = tmpl.format(f_path, lineno); |
|
523 | tmpl = tmpl.format(f_path, lineno); | |
511 | $form = $(tmpl); |
|
524 | $form = $(tmpl); | |
512 |
|
525 | |||
513 | var $comments = $td.find('.inline-comments'); |
|
526 | var $comments = $td.find('.inline-comments'); | |
514 | if (!$comments.length) { |
|
527 | if (!$comments.length) { | |
515 | $comments = $( |
|
528 | $comments = $( | |
516 | $('#cb-comments-inline-container-template').html()); |
|
529 | $('#cb-comments-inline-container-template').html()); | |
517 | $td.append($comments); |
|
530 | $td.append($comments); | |
518 | } |
|
531 | } | |
519 |
|
532 | |||
520 | $td.find('.cb-comment-add-button').before($form); |
|
533 | $td.find('.cb-comment-add-button').before($form); | |
521 |
|
534 | |||
522 | var pullRequestId = templateContext.pull_request_data.pull_request_id; |
|
535 | var pullRequestId = templateContext.pull_request_data.pull_request_id; | |
523 | var commitId = templateContext.commit_data.commit_id; |
|
536 | var commitId = templateContext.commit_data.commit_id; | |
524 | var _form = $form[0]; |
|
537 | var _form = $form[0]; | |
525 | var commentForm = new CommentForm(_form, commitId, pullRequestId, lineno, false); |
|
538 | var commentForm = new CommentForm(_form, commitId, pullRequestId, lineno, false); | |
526 | var cm = commentForm.getCmInstance(); |
|
539 | var cm = commentForm.getCmInstance(); | |
527 |
|
540 | |||
528 | // set a CUSTOM submit handler for inline comments. |
|
541 | // set a CUSTOM submit handler for inline comments. | |
529 | commentForm.setHandleFormSubmit(function(o) { |
|
542 | commentForm.setHandleFormSubmit(function(o) { | |
530 | var text = commentForm.cm.getValue(); |
|
543 | var text = commentForm.cm.getValue(); | |
531 |
|
544 | |||
532 | if (text === "") { |
|
545 | if (text === "") { | |
533 | return; |
|
546 | return; | |
534 | } |
|
547 | } | |
535 |
|
548 | |||
536 | if (lineno === undefined) { |
|
549 | if (lineno === undefined) { | |
537 | alert('missing line !'); |
|
550 | alert('missing line !'); | |
538 | return; |
|
551 | return; | |
539 | } |
|
552 | } | |
540 | if (f_path === undefined) { |
|
553 | if (f_path === undefined) { | |
541 | alert('missing file path !'); |
|
554 | alert('missing file path !'); | |
542 | return; |
|
555 | return; | |
543 | } |
|
556 | } | |
544 |
|
557 | |||
545 | var excludeCancelBtn = false; |
|
558 | var excludeCancelBtn = false; | |
546 | var submitEvent = true; |
|
559 | var submitEvent = true; | |
547 | commentForm.setActionButtonsDisabled(true, excludeCancelBtn, submitEvent); |
|
560 | commentForm.setActionButtonsDisabled(true, excludeCancelBtn, submitEvent); | |
548 | commentForm.cm.setOption("readOnly", true); |
|
561 | commentForm.cm.setOption("readOnly", true); | |
549 | var postData = { |
|
562 | var postData = { | |
550 | 'text': text, |
|
563 | 'text': text, | |
551 | 'f_path': f_path, |
|
564 | 'f_path': f_path, | |
552 | 'line': lineno, |
|
565 | 'line': lineno, | |
553 | 'csrf_token': CSRF_TOKEN |
|
566 | 'csrf_token': CSRF_TOKEN | |
554 | }; |
|
567 | }; | |
555 | var submitSuccessCallback = function(json_data) { |
|
568 | var submitSuccessCallback = function(json_data) { | |
556 | $form.remove(); |
|
569 | $form.remove(); | |
557 | try { |
|
570 | try { | |
558 | var html = json_data.rendered_text; |
|
571 | var html = json_data.rendered_text; | |
559 | var lineno = json_data.line_no; |
|
572 | var lineno = json_data.line_no; | |
560 | var target_id = json_data.target_id; |
|
573 | var target_id = json_data.target_id; | |
561 |
|
574 | |||
562 | $comments.find('.cb-comment-add-button').before(html); |
|
575 | $comments.find('.cb-comment-add-button').before(html); | |
563 |
|
576 | |||
564 | } catch (e) { |
|
577 | } catch (e) { | |
565 | console.error(e); |
|
578 | console.error(e); | |
566 | } |
|
579 | } | |
567 |
|
580 | |||
568 | // re trigger the linkification of next/prev navigation |
|
581 | // re trigger the linkification of next/prev navigation | |
569 | linkifyComments($('.inline-comment-injected')); |
|
582 | linkifyComments($('.inline-comment-injected')); | |
570 | timeagoActivate(); |
|
583 | timeagoActivate(); | |
571 | bindDeleteCommentButtons(); |
|
584 | bindDeleteCommentButtons(); | |
572 | commentForm.setActionButtonsDisabled(false); |
|
585 | commentForm.setActionButtonsDisabled(false); | |
573 |
|
586 | |||
574 | }; |
|
587 | }; | |
575 | var submitFailCallback = function(){ |
|
588 | var submitFailCallback = function(){ | |
576 | commentForm.resetCommentFormState(text) |
|
589 | commentForm.resetCommentFormState(text) | |
577 | }; |
|
590 | }; | |
578 | commentForm.submitAjaxPOST( |
|
591 | commentForm.submitAjaxPOST( | |
579 | commentForm.submitUrl, postData, submitSuccessCallback, submitFailCallback); |
|
592 | commentForm.submitUrl, postData, submitSuccessCallback, submitFailCallback); | |
580 | }); |
|
593 | }); | |
581 |
|
594 | |||
582 | setTimeout(function() { |
|
595 | setTimeout(function() { | |
583 | // callbacks |
|
596 | // callbacks | |
584 | if (cm !== undefined) { |
|
597 | if (cm !== undefined) { | |
585 | cm.focus(); |
|
598 | cm.focus(); | |
586 | } |
|
599 | } | |
587 | }, 10); |
|
600 | }, 10); | |
588 |
|
601 | |||
589 | $.Topic('/ui/plugins/code/comment_form_built').prepareOrPublish({ |
|
602 | $.Topic('/ui/plugins/code/comment_form_built').prepareOrPublish({ | |
590 | form: _form, |
|
603 | form: _form, | |
591 | parent: $td[0], |
|
604 | parent: $td[0], | |
592 | lineno: lineno, |
|
605 | lineno: lineno, | |
593 | f_path: f_path} |
|
606 | f_path: f_path} | |
594 | ); |
|
607 | ); | |
595 | } |
|
608 | } | |
596 |
|
609 | |||
597 | $form.addClass('comment-inline-form-open'); |
|
610 | $form.addClass('comment-inline-form-open'); | |
598 | }; |
|
611 | }; | |
599 |
|
612 | |||
600 | this.renderInlineComments = function(file_comments) { |
|
613 | this.renderInlineComments = function(file_comments) { | |
601 | show_add_button = typeof show_add_button !== 'undefined' ? show_add_button : true; |
|
614 | show_add_button = typeof show_add_button !== 'undefined' ? show_add_button : true; | |
602 |
|
615 | |||
603 | for (var i = 0; i < file_comments.length; i++) { |
|
616 | for (var i = 0; i < file_comments.length; i++) { | |
604 | var box = file_comments[i]; |
|
617 | var box = file_comments[i]; | |
605 |
|
618 | |||
606 | var target_id = $(box).attr('target_id'); |
|
619 | var target_id = $(box).attr('target_id'); | |
607 |
|
620 | |||
608 | // actually comments with line numbers |
|
621 | // actually comments with line numbers | |
609 | var comments = box.children; |
|
622 | var comments = box.children; | |
610 |
|
623 | |||
611 | for (var j = 0; j < comments.length; j++) { |
|
624 | for (var j = 0; j < comments.length; j++) { | |
612 | var data = { |
|
625 | var data = { | |
613 | 'rendered_text': comments[j].outerHTML, |
|
626 | 'rendered_text': comments[j].outerHTML, | |
614 | 'line_no': $(comments[j]).attr('line'), |
|
627 | 'line_no': $(comments[j]).attr('line'), | |
615 | 'target_id': target_id |
|
628 | 'target_id': target_id | |
616 | }; |
|
629 | }; | |
617 | } |
|
630 | } | |
618 | } |
|
631 | } | |
619 |
|
632 | |||
620 | // since order of injection is random, we're now re-iterating |
|
633 | // since order of injection is random, we're now re-iterating | |
621 | // from correct order and filling in links |
|
634 | // from correct order and filling in links | |
622 | linkifyComments($('.inline-comment-injected')); |
|
635 | linkifyComments($('.inline-comment-injected')); | |
623 | bindDeleteCommentButtons(); |
|
636 | bindDeleteCommentButtons(); | |
624 | firefoxAnchorFix(); |
|
637 | firefoxAnchorFix(); | |
625 | }; |
|
638 | }; | |
626 |
|
639 | |||
627 | }; No newline at end of file |
|
640 | }; |
@@ -1,572 +1,577 b'' | |||||
1 | <%def name="diff_line_anchor(filename, line, type)"><% |
|
1 | <%def name="diff_line_anchor(filename, line, type)"><% | |
2 | return '%s_%s_%i' % (h.safeid(filename), type, line) |
|
2 | return '%s_%s_%i' % (h.safeid(filename), type, line) | |
3 | %></%def> |
|
3 | %></%def> | |
4 |
|
4 | |||
5 | <%def name="action_class(action)"><% |
|
5 | <%def name="action_class(action)"><% | |
6 | return { |
|
6 | return { | |
7 | '-': 'cb-deletion', |
|
7 | '-': 'cb-deletion', | |
8 | '+': 'cb-addition', |
|
8 | '+': 'cb-addition', | |
9 | ' ': 'cb-context', |
|
9 | ' ': 'cb-context', | |
10 | }.get(action, 'cb-empty') |
|
10 | }.get(action, 'cb-empty') | |
11 | %></%def> |
|
11 | %></%def> | |
12 |
|
12 | |||
13 | <%def name="op_class(op_id)"><% |
|
13 | <%def name="op_class(op_id)"><% | |
14 | return { |
|
14 | return { | |
15 | DEL_FILENODE: 'deletion', # file deleted |
|
15 | DEL_FILENODE: 'deletion', # file deleted | |
16 | BIN_FILENODE: 'warning' # binary diff hidden |
|
16 | BIN_FILENODE: 'warning' # binary diff hidden | |
17 | }.get(op_id, 'addition') |
|
17 | }.get(op_id, 'addition') | |
18 | %></%def> |
|
18 | %></%def> | |
19 |
|
19 | |||
20 | <%def name="link_for(**kw)"><% |
|
20 | <%def name="link_for(**kw)"><% | |
21 | new_args = request.GET.mixed() |
|
21 | new_args = request.GET.mixed() | |
22 | new_args.update(kw) |
|
22 | new_args.update(kw) | |
23 | return h.url('', **new_args) |
|
23 | return h.url('', **new_args) | |
24 | %></%def> |
|
24 | %></%def> | |
25 |
|
25 | |||
26 | <%def name="render_diffset(diffset, commit=None, |
|
26 | <%def name="render_diffset(diffset, commit=None, | |
27 |
|
27 | |||
28 | # collapse all file diff entries when there are more than this amount of files in the diff |
|
28 | # collapse all file diff entries when there are more than this amount of files in the diff | |
29 | collapse_when_files_over=20, |
|
29 | collapse_when_files_over=20, | |
30 |
|
30 | |||
31 | # collapse lines in the diff when more than this amount of lines changed in the file diff |
|
31 | # collapse lines in the diff when more than this amount of lines changed in the file diff | |
32 | lines_changed_limit=500, |
|
32 | lines_changed_limit=500, | |
33 |
|
33 | |||
34 | # add a ruler at to the output |
|
34 | # add a ruler at to the output | |
35 | ruler_at_chars=0, |
|
35 | ruler_at_chars=0, | |
36 |
|
36 | |||
37 | # show inline comments |
|
37 | # show inline comments | |
38 | use_comments=False, |
|
38 | use_comments=False, | |
39 |
|
39 | |||
40 | # disable new comments |
|
40 | # disable new comments | |
41 | disable_new_comments=False, |
|
41 | disable_new_comments=False, | |
42 |
|
42 | |||
43 | )"> |
|
43 | )"> | |
44 |
|
44 | |||
45 | %if use_comments: |
|
45 | %if use_comments: | |
46 | <div id="cb-comments-inline-container-template" class="js-template"> |
|
46 | <div id="cb-comments-inline-container-template" class="js-template"> | |
47 | ${inline_comments_container([])} |
|
47 | ${inline_comments_container([])} | |
48 | </div> |
|
48 | </div> | |
49 | <div class="js-template" id="cb-comment-inline-form-template"> |
|
49 | <div class="js-template" id="cb-comment-inline-form-template"> | |
50 | <div class="comment-inline-form ac"> |
|
50 | <div class="comment-inline-form ac"> | |
51 | %if c.rhodecode_user.username != h.DEFAULT_USER: |
|
51 | %if c.rhodecode_user.username != h.DEFAULT_USER: | |
52 | ${h.form('#', method='get')} |
|
52 | ${h.form('#', method='get')} | |
53 | <div id="edit-container_{1}" class="clearfix"> |
|
53 | <div id="edit-container_{1}" class="clearfix"> | |
54 | <div class="comment-title pull-left"> |
|
54 | <div class="comment-title pull-left"> | |
55 | ${_('Create a comment on line {1}.')} |
|
55 | ${_('Create a comment on line {1}.')} | |
56 | </div> |
|
56 | </div> | |
57 | <div class="comment-help pull-right"> |
|
57 | <div class="comment-help pull-right"> | |
58 | ${(_('Comments parsed using %s syntax with %s support.') % ( |
|
58 | ${(_('Comments parsed using %s syntax with %s support.') % ( | |
59 | ('<a href="%s">%s</a>' % (h.url('%s_help' % c.visual.default_renderer), c.visual.default_renderer.upper())), |
|
59 | ('<a href="%s">%s</a>' % (h.url('%s_help' % c.visual.default_renderer), c.visual.default_renderer.upper())), | |
60 | ('<span class="tooltip" title="%s">@mention</span>' % _('Use @username inside this text to send notification to this RhodeCode user')) |
|
60 | ('<span class="tooltip" title="%s">@mention</span>' % _('Use @username inside this text to send notification to this RhodeCode user')) | |
61 | ) |
|
61 | ) | |
62 | )|n |
|
62 | )|n | |
63 | } |
|
63 | } | |
64 | </div> |
|
64 | </div> | |
65 | <div style="clear: both"></div> |
|
65 | <div style="clear: both"></div> | |
66 | <textarea id="text_{1}" name="text" class="comment-block-ta ac-input"></textarea> |
|
66 | <textarea id="text_{1}" name="text" class="comment-block-ta ac-input"></textarea> | |
67 | </div> |
|
67 | </div> | |
68 | <div id="preview-container_{1}" class="clearfix" style="display: none;"> |
|
68 | <div id="preview-container_{1}" class="clearfix" style="display: none;"> | |
69 | <div class="comment-help"> |
|
69 | <div class="comment-help"> | |
70 | ${_('Comment preview')} |
|
70 | ${_('Comment preview')} | |
71 | </div> |
|
71 | </div> | |
72 | <div id="preview-box_{1}" class="preview-box"></div> |
|
72 | <div id="preview-box_{1}" class="preview-box"></div> | |
73 | </div> |
|
73 | </div> | |
74 | <div class="comment-footer"> |
|
74 | <div class="comment-footer"> | |
75 | <div class="action-buttons"> |
|
75 | <div class="action-buttons"> | |
76 | <input type="hidden" name="f_path" value="{0}"> |
|
76 | <input type="hidden" name="f_path" value="{0}"> | |
77 | <input type="hidden" name="line" value="{1}"> |
|
77 | <input type="hidden" name="line" value="{1}"> | |
78 | <button id="preview-btn_{1}" class="btn btn-secondary">${_('Preview')}</button> |
|
78 | <button id="preview-btn_{1}" class="btn btn-secondary">${_('Preview')}</button> | |
79 | <button id="edit-btn_{1}" class="btn btn-secondary" style="display: none;">${_('Edit')}</button> |
|
79 | <button id="edit-btn_{1}" class="btn btn-secondary" style="display: none;">${_('Edit')}</button> | |
80 | ${h.submit('save', _('Comment'), class_='btn btn-success save-inline-form')} |
|
80 | ${h.submit('save', _('Comment'), class_='btn btn-success save-inline-form')} | |
81 | </div> |
|
81 | </div> | |
82 | <div class="comment-button"> |
|
82 | <div class="comment-button"> | |
83 | <button type="button" class="cb-comment-cancel" onclick="return Rhodecode.comments.cancelComment(this);"> |
|
83 | <button type="button" class="cb-comment-cancel" onclick="return Rhodecode.comments.cancelComment(this);"> | |
84 | ${_('Cancel')} |
|
84 | ${_('Cancel')} | |
85 | </button> |
|
85 | </button> | |
86 | </div> |
|
86 | </div> | |
87 | ${h.end_form()} |
|
87 | ${h.end_form()} | |
88 | </div> |
|
88 | </div> | |
89 | %else: |
|
89 | %else: | |
90 | ${h.form('', class_='inline-form comment-form-login', method='get')} |
|
90 | ${h.form('', class_='inline-form comment-form-login', method='get')} | |
91 | <div class="pull-left"> |
|
91 | <div class="pull-left"> | |
92 | <div class="comment-help pull-right"> |
|
92 | <div class="comment-help pull-right"> | |
93 | ${_('You need to be logged in to comment.')} <a href="${h.route_path('login', _query={'came_from': h.url.current()})}">${_('Login now')}</a> |
|
93 | ${_('You need to be logged in to comment.')} <a href="${h.route_path('login', _query={'came_from': h.url.current()})}">${_('Login now')}</a> | |
94 | </div> |
|
94 | </div> | |
95 | </div> |
|
95 | </div> | |
96 | <div class="comment-button pull-right"> |
|
96 | <div class="comment-button pull-right"> | |
97 | <button type="button" class="cb-comment-cancel" onclick="return Rhodecode.comments.cancelComment(this);"> |
|
97 | <button type="button" class="cb-comment-cancel" onclick="return Rhodecode.comments.cancelComment(this);"> | |
98 | ${_('Cancel')} |
|
98 | ${_('Cancel')} | |
99 | </button> |
|
99 | </button> | |
100 | </div> |
|
100 | </div> | |
101 | <div class="clearfix"></div> |
|
101 | <div class="clearfix"></div> | |
102 | ${h.end_form()} |
|
102 | ${h.end_form()} | |
103 | %endif |
|
103 | %endif | |
104 | </div> |
|
104 | </div> | |
105 | </div> |
|
105 | </div> | |
106 |
|
106 | |||
107 | %endif |
|
107 | %endif | |
108 | <% |
|
108 | <% | |
109 | collapse_all = len(diffset.files) > collapse_when_files_over |
|
109 | collapse_all = len(diffset.files) > collapse_when_files_over | |
110 | %> |
|
110 | %> | |
111 |
|
111 | |||
112 | %if c.diffmode == 'sideside': |
|
112 | %if c.diffmode == 'sideside': | |
113 | <style> |
|
113 | <style> | |
114 | .wrapper { |
|
114 | .wrapper { | |
115 | max-width: 1600px !important; |
|
115 | max-width: 1600px !important; | |
116 | } |
|
116 | } | |
117 | </style> |
|
117 | </style> | |
118 | %endif |
|
118 | %endif | |
119 | %if ruler_at_chars: |
|
119 | %if ruler_at_chars: | |
120 | <style> |
|
120 | <style> | |
121 | .diff table.cb .cb-content:after { |
|
121 | .diff table.cb .cb-content:after { | |
122 | content: ""; |
|
122 | content: ""; | |
123 | border-left: 1px solid blue; |
|
123 | border-left: 1px solid blue; | |
124 | position: absolute; |
|
124 | position: absolute; | |
125 | top: 0; |
|
125 | top: 0; | |
126 | height: 18px; |
|
126 | height: 18px; | |
127 | opacity: .2; |
|
127 | opacity: .2; | |
128 | z-index: 10; |
|
128 | z-index: 10; | |
129 | ## +5 to account for diff action (+/-) |
|
129 | ## +5 to account for diff action (+/-) | |
130 | left: ${ruler_at_chars + 5}ch; |
|
130 | left: ${ruler_at_chars + 5}ch; | |
131 | </style> |
|
131 | </style> | |
132 | %endif |
|
132 | %endif | |
133 | <div class="diffset ${disable_new_comments and 'diffset-comments-disabled'}"> |
|
133 | <div class="diffset ${disable_new_comments and 'diffset-comments-disabled'}"> | |
134 | <div class="diffset-heading ${diffset.limited_diff and 'diffset-heading-warning' or ''}"> |
|
134 | <div class="diffset-heading ${diffset.limited_diff and 'diffset-heading-warning' or ''}"> | |
135 | %if commit: |
|
135 | %if commit: | |
136 | <div class="pull-right"> |
|
136 | <div class="pull-right"> | |
137 | <a class="btn tooltip" title="${_('Browse Files at revision {}').format(commit.raw_id)}" href="${h.url('files_home',repo_name=diffset.repo_name, revision=commit.raw_id, f_path='')}"> |
|
137 | <a class="btn tooltip" title="${_('Browse Files at revision {}').format(commit.raw_id)}" href="${h.url('files_home',repo_name=diffset.repo_name, revision=commit.raw_id, f_path='')}"> | |
138 | ${_('Browse Files')} |
|
138 | ${_('Browse Files')} | |
139 | </a> |
|
139 | </a> | |
140 | </div> |
|
140 | </div> | |
141 | %endif |
|
141 | %endif | |
142 | <h2 class="clearinner"> |
|
142 | <h2 class="clearinner"> | |
143 | %if commit: |
|
143 | %if commit: | |
144 | <a class="tooltip revision" title="${h.tooltip(commit.message)}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id)}">${'r%s:%s' % (commit.revision,h.short_id(commit.raw_id))}</a> - |
|
144 | <a class="tooltip revision" title="${h.tooltip(commit.message)}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id)}">${'r%s:%s' % (commit.revision,h.short_id(commit.raw_id))}</a> - | |
145 | ${h.age_component(commit.date)} - |
|
145 | ${h.age_component(commit.date)} - | |
146 | %endif |
|
146 | %endif | |
147 | %if diffset.limited_diff: |
|
147 | %if diffset.limited_diff: | |
148 | ${_('The requested commit is too big and content was truncated.')} |
|
148 | ${_('The requested commit is too big and content was truncated.')} | |
149 |
|
149 | |||
150 | ${ungettext('%(num)s file changed.', '%(num)s files changed.', diffset.changed_files) % {'num': diffset.changed_files}} |
|
150 | ${ungettext('%(num)s file changed.', '%(num)s files changed.', diffset.changed_files) % {'num': diffset.changed_files}} | |
151 | <a href="${link_for(fulldiff=1)}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a> |
|
151 | <a href="${link_for(fulldiff=1)}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a> | |
152 | %else: |
|
152 | %else: | |
153 | ${ungettext('%(num)s file changed: %(linesadd)s inserted, ''%(linesdel)s deleted', |
|
153 | ${ungettext('%(num)s file changed: %(linesadd)s inserted, ''%(linesdel)s deleted', | |
154 | '%(num)s files changed: %(linesadd)s inserted, %(linesdel)s deleted', diffset.changed_files) % {'num': diffset.changed_files, 'linesadd': diffset.lines_added, 'linesdel': diffset.lines_deleted}} |
|
154 | '%(num)s files changed: %(linesadd)s inserted, %(linesdel)s deleted', diffset.changed_files) % {'num': diffset.changed_files, 'linesadd': diffset.lines_added, 'linesdel': diffset.lines_deleted}} | |
155 | %endif |
|
155 | %endif | |
156 | </h2> |
|
156 | </h2> | |
157 | </div> |
|
157 | </div> | |
158 |
|
158 | |||
159 | %if not diffset.files: |
|
159 | %if not diffset.files: | |
160 | <p class="empty_data">${_('No files')}</p> |
|
160 | <p class="empty_data">${_('No files')}</p> | |
161 | %endif |
|
161 | %endif | |
162 |
|
162 | |||
163 | <div class="filediffs"> |
|
163 | <div class="filediffs"> | |
164 | %for i, filediff in enumerate(diffset.files): |
|
164 | %for i, filediff in enumerate(diffset.files): | |
165 | <% |
|
165 | <% | |
166 | lines_changed = filediff['patch']['stats']['added'] + filediff['patch']['stats']['deleted'] |
|
166 | lines_changed = filediff['patch']['stats']['added'] + filediff['patch']['stats']['deleted'] | |
167 | over_lines_changed_limit = lines_changed > lines_changed_limit |
|
167 | over_lines_changed_limit = lines_changed > lines_changed_limit | |
168 | %> |
|
168 | %> | |
169 | <input ${collapse_all and 'checked' or ''} class="filediff-collapse-state" id="filediff-collapse-${id(filediff)}" type="checkbox"> |
|
169 | <input ${collapse_all and 'checked' or ''} class="filediff-collapse-state" id="filediff-collapse-${id(filediff)}" type="checkbox"> | |
170 | <div |
|
170 | <div | |
171 | class="filediff" |
|
171 | class="filediff" | |
172 | data-f-path="${filediff['patch']['filename']}" |
|
172 | data-f-path="${filediff['patch']['filename']}" | |
173 | id="a_${h.FID('', filediff['patch']['filename'])}"> |
|
173 | id="a_${h.FID('', filediff['patch']['filename'])}"> | |
174 | <label for="filediff-collapse-${id(filediff)}" class="filediff-heading"> |
|
174 | <label for="filediff-collapse-${id(filediff)}" class="filediff-heading"> | |
175 | <div class="filediff-collapse-indicator"></div> |
|
175 | <div class="filediff-collapse-indicator"></div> | |
176 | ${diff_ops(filediff)} |
|
176 | ${diff_ops(filediff)} | |
177 | </label> |
|
177 | </label> | |
178 | ${diff_menu(filediff, use_comments=use_comments)} |
|
178 | ${diff_menu(filediff, use_comments=use_comments)} | |
179 | <table class="cb cb-diff-${c.diffmode} code-highlight ${over_lines_changed_limit and 'cb-collapsed' or ''}"> |
|
179 | <table class="cb cb-diff-${c.diffmode} code-highlight ${over_lines_changed_limit and 'cb-collapsed' or ''}"> | |
180 | %if not filediff.hunks: |
|
180 | %if not filediff.hunks: | |
181 | %for op_id, op_text in filediff['patch']['stats']['ops'].items(): |
|
181 | %for op_id, op_text in filediff['patch']['stats']['ops'].items(): | |
182 | <tr> |
|
182 | <tr> | |
183 | <td class="cb-text cb-${op_class(op_id)}" ${c.diffmode == 'unified' and 'colspan=3' or 'colspan=4'}> |
|
183 | <td class="cb-text cb-${op_class(op_id)}" ${c.diffmode == 'unified' and 'colspan=3' or 'colspan=4'}> | |
184 | %if op_id == DEL_FILENODE: |
|
184 | %if op_id == DEL_FILENODE: | |
185 | ${_('File was deleted')} |
|
185 | ${_('File was deleted')} | |
186 | %elif op_id == BIN_FILENODE: |
|
186 | %elif op_id == BIN_FILENODE: | |
187 | ${_('Binary file hidden')} |
|
187 | ${_('Binary file hidden')} | |
188 | %else: |
|
188 | %else: | |
189 | ${op_text} |
|
189 | ${op_text} | |
190 | %endif |
|
190 | %endif | |
191 | </td> |
|
191 | </td> | |
192 | </tr> |
|
192 | </tr> | |
193 | %endfor |
|
193 | %endfor | |
194 | %endif |
|
194 | %endif | |
195 | %if over_lines_changed_limit: |
|
195 | %if over_lines_changed_limit: | |
196 | <tr class="cb-warning cb-collapser"> |
|
196 | <tr class="cb-warning cb-collapser"> | |
197 | <td class="cb-text" ${c.diffmode == 'unified' and 'colspan=4' or 'colspan=6'}> |
|
197 | <td class="cb-text" ${c.diffmode == 'unified' and 'colspan=4' or 'colspan=6'}> | |
198 | ${_('This diff has been collapsed as it changes many lines, (%i lines changed)' % lines_changed)} |
|
198 | ${_('This diff has been collapsed as it changes many lines, (%i lines changed)' % lines_changed)} | |
199 | <a href="#" class="cb-expand" |
|
199 | <a href="#" class="cb-expand" | |
200 | onclick="$(this).closest('table').removeClass('cb-collapsed'); return false;">${_('Show them')} |
|
200 | onclick="$(this).closest('table').removeClass('cb-collapsed'); return false;">${_('Show them')} | |
201 | </a> |
|
201 | </a> | |
202 | <a href="#" class="cb-collapse" |
|
202 | <a href="#" class="cb-collapse" | |
203 | onclick="$(this).closest('table').addClass('cb-collapsed'); return false;">${_('Hide them')} |
|
203 | onclick="$(this).closest('table').addClass('cb-collapsed'); return false;">${_('Hide them')} | |
204 | </a> |
|
204 | </a> | |
205 | </td> |
|
205 | </td> | |
206 | </tr> |
|
206 | </tr> | |
207 | %endif |
|
207 | %endif | |
208 | %if filediff.patch['is_limited_diff']: |
|
208 | %if filediff.patch['is_limited_diff']: | |
209 | <tr class="cb-warning cb-collapser"> |
|
209 | <tr class="cb-warning cb-collapser"> | |
210 | <td class="cb-text" ${c.diffmode == 'unified' and 'colspan=4' or 'colspan=6'}> |
|
210 | <td class="cb-text" ${c.diffmode == 'unified' and 'colspan=4' or 'colspan=6'}> | |
211 | ${_('The requested commit is too big and content was truncated.')} <a href="${link_for(fulldiff=1)}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a> |
|
211 | ${_('The requested commit is too big and content was truncated.')} <a href="${link_for(fulldiff=1)}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a> | |
212 | </td> |
|
212 | </td> | |
213 | </tr> |
|
213 | </tr> | |
214 | %endif |
|
214 | %endif | |
215 | %for hunk in filediff.hunks: |
|
215 | %for hunk in filediff.hunks: | |
216 | <tr class="cb-hunk"> |
|
216 | <tr class="cb-hunk"> | |
217 | <td ${c.diffmode == 'unified' and 'colspan=3' or ''}> |
|
217 | <td ${c.diffmode == 'unified' and 'colspan=3' or ''}> | |
218 | ## TODO: dan: add ajax loading of more context here |
|
218 | ## TODO: dan: add ajax loading of more context here | |
219 | ## <a href="#"> |
|
219 | ## <a href="#"> | |
220 | <i class="icon-more"></i> |
|
220 | <i class="icon-more"></i> | |
221 | ## </a> |
|
221 | ## </a> | |
222 | </td> |
|
222 | </td> | |
223 | <td ${c.diffmode == 'sideside' and 'colspan=5' or ''}> |
|
223 | <td ${c.diffmode == 'sideside' and 'colspan=5' or ''}> | |
224 | @@ |
|
224 | @@ | |
225 | -${hunk.source_start},${hunk.source_length} |
|
225 | -${hunk.source_start},${hunk.source_length} | |
226 | +${hunk.target_start},${hunk.target_length} |
|
226 | +${hunk.target_start},${hunk.target_length} | |
227 | ${hunk.section_header} |
|
227 | ${hunk.section_header} | |
228 | </td> |
|
228 | </td> | |
229 | </tr> |
|
229 | </tr> | |
230 | %if c.diffmode == 'unified': |
|
230 | %if c.diffmode == 'unified': | |
231 | ${render_hunk_lines_unified(hunk, use_comments=use_comments)} |
|
231 | ${render_hunk_lines_unified(hunk, use_comments=use_comments)} | |
232 | %elif c.diffmode == 'sideside': |
|
232 | %elif c.diffmode == 'sideside': | |
233 | ${render_hunk_lines_sideside(hunk, use_comments=use_comments)} |
|
233 | ${render_hunk_lines_sideside(hunk, use_comments=use_comments)} | |
234 | %else: |
|
234 | %else: | |
235 | <tr class="cb-line"> |
|
235 | <tr class="cb-line"> | |
236 | <td>unknown diff mode</td> |
|
236 | <td>unknown diff mode</td> | |
237 | </tr> |
|
237 | </tr> | |
238 | %endif |
|
238 | %endif | |
239 | %endfor |
|
239 | %endfor | |
240 | </table> |
|
240 | </table> | |
241 | </div> |
|
241 | </div> | |
242 | %endfor |
|
242 | %endfor | |
243 | </div> |
|
243 | </div> | |
244 | </div> |
|
244 | </div> | |
245 | </%def> |
|
245 | </%def> | |
246 |
|
246 | |||
247 | <%def name="diff_ops(filediff)"> |
|
247 | <%def name="diff_ops(filediff)"> | |
248 | <% |
|
248 | <% | |
249 | stats = filediff['patch']['stats'] |
|
249 | stats = filediff['patch']['stats'] | |
250 | from rhodecode.lib.diffs import NEW_FILENODE, DEL_FILENODE, \ |
|
250 | from rhodecode.lib.diffs import NEW_FILENODE, DEL_FILENODE, \ | |
251 | MOD_FILENODE, RENAMED_FILENODE, CHMOD_FILENODE, BIN_FILENODE |
|
251 | MOD_FILENODE, RENAMED_FILENODE, CHMOD_FILENODE, BIN_FILENODE | |
252 | %> |
|
252 | %> | |
253 | <span class="pill"> |
|
253 | <span class="pill"> | |
254 | %if filediff.source_file_path and filediff.target_file_path: |
|
254 | %if filediff.source_file_path and filediff.target_file_path: | |
255 | %if filediff.source_file_path != filediff.target_file_path: # file was renamed |
|
255 | %if filediff.source_file_path != filediff.target_file_path: # file was renamed | |
256 | <strong>${filediff.target_file_path}</strong> β¬ <del>${filediff.source_file_path}</del> |
|
256 | <strong>${filediff.target_file_path}</strong> β¬ <del>${filediff.source_file_path}</del> | |
257 | %else: |
|
257 | %else: | |
258 | ## file was modified |
|
258 | ## file was modified | |
259 | <strong>${filediff.source_file_path}</strong> |
|
259 | <strong>${filediff.source_file_path}</strong> | |
260 | %endif |
|
260 | %endif | |
261 | %else: |
|
261 | %else: | |
262 | %if filediff.source_file_path: |
|
262 | %if filediff.source_file_path: | |
263 | ## file was deleted |
|
263 | ## file was deleted | |
264 | <strong>${filediff.source_file_path}</strong> |
|
264 | <strong>${filediff.source_file_path}</strong> | |
265 | %else: |
|
265 | %else: | |
266 | ## file was added |
|
266 | ## file was added | |
267 | <strong>${filediff.target_file_path}</strong> |
|
267 | <strong>${filediff.target_file_path}</strong> | |
268 | %endif |
|
268 | %endif | |
269 | %endif |
|
269 | %endif | |
270 | </span> |
|
270 | </span> | |
271 | <span class="pill-group" style="float: left"> |
|
271 | <span class="pill-group" style="float: left"> | |
272 | %if filediff.patch['is_limited_diff']: |
|
272 | %if filediff.patch['is_limited_diff']: | |
273 | <span class="pill tooltip" op="limited" title="The stats for this diff are not complete">limited diff</span> |
|
273 | <span class="pill tooltip" op="limited" title="The stats for this diff are not complete">limited diff</span> | |
274 | %endif |
|
274 | %endif | |
275 | %if RENAMED_FILENODE in stats['ops']: |
|
275 | %if RENAMED_FILENODE in stats['ops']: | |
276 | <span class="pill" op="renamed">renamed</span> |
|
276 | <span class="pill" op="renamed">renamed</span> | |
277 | %endif |
|
277 | %endif | |
278 |
|
278 | |||
279 | %if NEW_FILENODE in stats['ops']: |
|
279 | %if NEW_FILENODE in stats['ops']: | |
280 | <span class="pill" op="created">created</span> |
|
280 | <span class="pill" op="created">created</span> | |
281 | %if filediff['target_mode'].startswith('120'): |
|
281 | %if filediff['target_mode'].startswith('120'): | |
282 | <span class="pill" op="symlink">symlink</span> |
|
282 | <span class="pill" op="symlink">symlink</span> | |
283 | %else: |
|
283 | %else: | |
284 | <span class="pill" op="mode">${nice_mode(filediff['target_mode'])}</span> |
|
284 | <span class="pill" op="mode">${nice_mode(filediff['target_mode'])}</span> | |
285 | %endif |
|
285 | %endif | |
286 | %endif |
|
286 | %endif | |
287 |
|
287 | |||
288 | %if DEL_FILENODE in stats['ops']: |
|
288 | %if DEL_FILENODE in stats['ops']: | |
289 | <span class="pill" op="removed">removed</span> |
|
289 | <span class="pill" op="removed">removed</span> | |
290 | %endif |
|
290 | %endif | |
291 |
|
291 | |||
292 | %if CHMOD_FILENODE in stats['ops']: |
|
292 | %if CHMOD_FILENODE in stats['ops']: | |
293 | <span class="pill" op="mode"> |
|
293 | <span class="pill" op="mode"> | |
294 | ${nice_mode(filediff['source_mode'])} β‘ ${nice_mode(filediff['target_mode'])} |
|
294 | ${nice_mode(filediff['source_mode'])} β‘ ${nice_mode(filediff['target_mode'])} | |
295 | </span> |
|
295 | </span> | |
296 | %endif |
|
296 | %endif | |
297 | </span> |
|
297 | </span> | |
298 |
|
298 | |||
299 | <a class="pill filediff-anchor" href="#a_${h.FID('', filediff.patch['filename'])}">ΒΆ</a> |
|
299 | <a class="pill filediff-anchor" href="#a_${h.FID('', filediff.patch['filename'])}">ΒΆ</a> | |
300 |
|
300 | |||
301 | <span class="pill-group" style="float: right"> |
|
301 | <span class="pill-group" style="float: right"> | |
302 | %if BIN_FILENODE in stats['ops']: |
|
302 | %if BIN_FILENODE in stats['ops']: | |
303 | <span class="pill" op="binary">binary</span> |
|
303 | <span class="pill" op="binary">binary</span> | |
304 | %if MOD_FILENODE in stats['ops']: |
|
304 | %if MOD_FILENODE in stats['ops']: | |
305 | <span class="pill" op="modified">modified</span> |
|
305 | <span class="pill" op="modified">modified</span> | |
306 | %endif |
|
306 | %endif | |
307 | %endif |
|
307 | %endif | |
308 | %if stats['added']: |
|
308 | %if stats['added']: | |
309 | <span class="pill" op="added">+${stats['added']}</span> |
|
309 | <span class="pill" op="added">+${stats['added']}</span> | |
310 | %endif |
|
310 | %endif | |
311 | %if stats['deleted']: |
|
311 | %if stats['deleted']: | |
312 | <span class="pill" op="deleted">-${stats['deleted']}</span> |
|
312 | <span class="pill" op="deleted">-${stats['deleted']}</span> | |
313 | %endif |
|
313 | %endif | |
314 | </span> |
|
314 | </span> | |
315 |
|
315 | |||
316 | </%def> |
|
316 | </%def> | |
317 |
|
317 | |||
318 | <%def name="nice_mode(filemode)"> |
|
318 | <%def name="nice_mode(filemode)"> | |
319 | ${filemode.startswith('100') and filemode[3:] or filemode} |
|
319 | ${filemode.startswith('100') and filemode[3:] or filemode} | |
320 | </%def> |
|
320 | </%def> | |
321 |
|
321 | |||
322 | <%def name="diff_menu(filediff, use_comments=False)"> |
|
322 | <%def name="diff_menu(filediff, use_comments=False)"> | |
323 | <div class="filediff-menu"> |
|
323 | <div class="filediff-menu"> | |
324 | %if filediff.diffset.source_ref: |
|
324 | %if filediff.diffset.source_ref: | |
325 | %if filediff.patch['operation'] in ['D', 'M']: |
|
325 | %if filediff.patch['operation'] in ['D', 'M']: | |
326 | <a |
|
326 | <a | |
327 | class="tooltip" |
|
327 | class="tooltip" | |
328 | href="${h.url('files_home',repo_name=filediff.diffset.repo_name,f_path=filediff.source_file_path,revision=filediff.diffset.source_ref)}" |
|
328 | href="${h.url('files_home',repo_name=filediff.diffset.repo_name,f_path=filediff.source_file_path,revision=filediff.diffset.source_ref)}" | |
329 | title="${h.tooltip(_('Show file at commit: %(commit_id)s') % {'commit_id': filediff.diffset.source_ref[:12]})}" |
|
329 | title="${h.tooltip(_('Show file at commit: %(commit_id)s') % {'commit_id': filediff.diffset.source_ref[:12]})}" | |
330 | > |
|
330 | > | |
331 | ${_('Show file before')} |
|
331 | ${_('Show file before')} | |
332 | </a> |
|
332 | </a> | |
333 | %else: |
|
333 | %else: | |
334 | <span |
|
334 | <span | |
335 | class="tooltip" |
|
335 | class="tooltip" | |
336 | title="${h.tooltip(_('File no longer present at commit: %(commit_id)s') % {'commit_id': filediff.diffset.source_ref[:12]})}" |
|
336 | title="${h.tooltip(_('File no longer present at commit: %(commit_id)s') % {'commit_id': filediff.diffset.source_ref[:12]})}" | |
337 | > |
|
337 | > | |
338 | ${_('Show file before')} |
|
338 | ${_('Show file before')} | |
339 | </span> |
|
339 | </span> | |
340 | %endif |
|
340 | %endif | |
341 | %if filediff.patch['operation'] in ['A', 'M']: |
|
341 | %if filediff.patch['operation'] in ['A', 'M']: | |
342 | <a |
|
342 | <a | |
343 | class="tooltip" |
|
343 | class="tooltip" | |
344 | href="${h.url('files_home',repo_name=filediff.diffset.repo_name,f_path=filediff.target_file_path,revision=filediff.diffset.target_ref)}" |
|
344 | href="${h.url('files_home',repo_name=filediff.diffset.repo_name,f_path=filediff.target_file_path,revision=filediff.diffset.target_ref)}" | |
345 | title="${h.tooltip(_('Show file at commit: %(commit_id)s') % {'commit_id': filediff.diffset.target_ref[:12]})}" |
|
345 | title="${h.tooltip(_('Show file at commit: %(commit_id)s') % {'commit_id': filediff.diffset.target_ref[:12]})}" | |
346 | > |
|
346 | > | |
347 | ${_('Show file after')} |
|
347 | ${_('Show file after')} | |
348 | </a> |
|
348 | </a> | |
349 | %else: |
|
349 | %else: | |
350 | <span |
|
350 | <span | |
351 | class="tooltip" |
|
351 | class="tooltip" | |
352 | title="${h.tooltip(_('File no longer present at commit: %(commit_id)s') % {'commit_id': filediff.diffset.target_ref[:12]})}" |
|
352 | title="${h.tooltip(_('File no longer present at commit: %(commit_id)s') % {'commit_id': filediff.diffset.target_ref[:12]})}" | |
353 | > |
|
353 | > | |
354 | ${_('Show file after')} |
|
354 | ${_('Show file after')} | |
355 | </span> |
|
355 | </span> | |
356 | %endif |
|
356 | %endif | |
357 | <a |
|
357 | <a | |
358 | class="tooltip" |
|
358 | class="tooltip" | |
359 | title="${h.tooltip(_('Raw diff'))}" |
|
359 | title="${h.tooltip(_('Raw diff'))}" | |
360 | href="${h.url('files_diff_home',repo_name=filediff.diffset.repo_name,f_path=filediff.target_file_path,diff2=filediff.diffset.target_ref,diff1=filediff.diffset.source_ref,diff='raw')}" |
|
360 | href="${h.url('files_diff_home',repo_name=filediff.diffset.repo_name,f_path=filediff.target_file_path,diff2=filediff.diffset.target_ref,diff1=filediff.diffset.source_ref,diff='raw')}" | |
361 | > |
|
361 | > | |
362 | ${_('Raw diff')} |
|
362 | ${_('Raw diff')} | |
363 | </a> |
|
363 | </a> | |
364 | <a |
|
364 | <a | |
365 | class="tooltip" |
|
365 | class="tooltip" | |
366 | title="${h.tooltip(_('Download diff'))}" |
|
366 | title="${h.tooltip(_('Download diff'))}" | |
367 | href="${h.url('files_diff_home',repo_name=filediff.diffset.repo_name,f_path=filediff.target_file_path,diff2=filediff.diffset.target_ref,diff1=filediff.diffset.source_ref,diff='download')}" |
|
367 | href="${h.url('files_diff_home',repo_name=filediff.diffset.repo_name,f_path=filediff.target_file_path,diff2=filediff.diffset.target_ref,diff1=filediff.diffset.source_ref,diff='download')}" | |
368 | > |
|
368 | > | |
369 | ${_('Download diff')} |
|
369 | ${_('Download diff')} | |
370 | </a> |
|
370 | </a> | |
371 |
|
371 | |||
372 | ## TODO: dan: refactor ignorews_url and context_url into the diff renderer same as diffmode=unified/sideside. Also use ajax to load more context (by clicking hunks) |
|
372 | ## TODO: dan: refactor ignorews_url and context_url into the diff renderer same as diffmode=unified/sideside. Also use ajax to load more context (by clicking hunks) | |
373 | %if hasattr(c, 'ignorews_url'): |
|
373 | %if hasattr(c, 'ignorews_url'): | |
374 | ${c.ignorews_url(request.GET, h.FID('', filediff['patch']['filename']))} |
|
374 | ${c.ignorews_url(request.GET, h.FID('', filediff['patch']['filename']))} | |
375 | %endif |
|
375 | %endif | |
376 | %if hasattr(c, 'context_url'): |
|
376 | %if hasattr(c, 'context_url'): | |
377 | ${c.context_url(request.GET, h.FID('', filediff['patch']['filename']))} |
|
377 | ${c.context_url(request.GET, h.FID('', filediff['patch']['filename']))} | |
378 | %endif |
|
378 | %endif | |
379 |
|
379 | |||
380 |
|
380 | |||
381 | %if use_comments: |
|
381 | %if use_comments: | |
382 | <a href="#" onclick="return Rhodecode.comments.toggleComments(this);"> |
|
382 | <a href="#" onclick="return Rhodecode.comments.toggleComments(this);"> | |
383 | <span class="show-comment-button">${_('Show comments')}</span><span class="hide-comment-button">${_('Hide comments')}</span> |
|
383 | <span class="show-comment-button">${_('Show comments')}</span><span class="hide-comment-button">${_('Hide comments')}</span> | |
384 | </a> |
|
384 | </a> | |
385 | %endif |
|
385 | %endif | |
386 | %endif |
|
386 | %endif | |
387 | </div> |
|
387 | </div> | |
388 | </%def> |
|
388 | </%def> | |
389 |
|
389 | |||
390 |
|
390 | |||
391 | <%namespace name="commentblock" file="/changeset/changeset_file_comment.html"/> |
|
391 | <%namespace name="commentblock" file="/changeset/changeset_file_comment.html"/> | |
392 | <%def name="inline_comments_container(comments)"> |
|
392 | <%def name="inline_comments_container(comments)"> | |
393 | <div class="inline-comments"> |
|
393 | <div class="inline-comments"> | |
394 | %for comment in comments: |
|
394 | %for comment in comments: | |
395 | ${commentblock.comment_block(comment, inline=True)} |
|
395 | ${commentblock.comment_block(comment, inline=True)} | |
396 | %endfor |
|
396 | %endfor | |
397 |
|
397 | |||
398 | <span onclick="return Rhodecode.comments.createComment(this)" |
|
398 | <span onclick="return Rhodecode.comments.createComment(this)" | |
399 | class="btn btn-secondary cb-comment-add-button ${'comment-outdated' if comments and comments[-1].outdated else ''}" |
|
399 | class="btn btn-secondary cb-comment-add-button ${'comment-outdated' if comments and comments[-1].outdated else ''}" | |
400 | style="${'display: none;' if comments and comments[-1].outdated else ''}"> |
|
400 | style="${'display: none;' if comments and comments[-1].outdated else ''}"> | |
401 | ${_('Add another comment')} |
|
401 | ${_('Add another comment')} | |
402 | </span> |
|
402 | </span> | |
403 |
|
403 | |||
404 | </div> |
|
404 | </div> | |
405 | </%def> |
|
405 | </%def> | |
406 |
|
406 | |||
407 |
|
407 | |||
408 | <%def name="render_hunk_lines_sideside(hunk, use_comments=False)"> |
|
408 | <%def name="render_hunk_lines_sideside(hunk, use_comments=False)"> | |
409 | %for i, line in enumerate(hunk.sideside): |
|
409 | %for i, line in enumerate(hunk.sideside): | |
410 | <% |
|
410 | <% | |
411 | old_line_anchor, new_line_anchor = None, None |
|
411 | old_line_anchor, new_line_anchor = None, None | |
412 | if line.original.lineno: |
|
412 | if line.original.lineno: | |
413 | old_line_anchor = diff_line_anchor(hunk.filediff.source_file_path, line.original.lineno, 'o') |
|
413 | old_line_anchor = diff_line_anchor(hunk.filediff.source_file_path, line.original.lineno, 'o') | |
414 | if line.modified.lineno: |
|
414 | if line.modified.lineno: | |
415 | new_line_anchor = diff_line_anchor(hunk.filediff.target_file_path, line.modified.lineno, 'n') |
|
415 | new_line_anchor = diff_line_anchor(hunk.filediff.target_file_path, line.modified.lineno, 'n') | |
416 | %> |
|
416 | %> | |
417 | <tr class="cb-line"> |
|
417 | <tr class="cb-line"> | |
418 | <td class="cb-data ${action_class(line.original.action)}" |
|
418 | <td class="cb-data ${action_class(line.original.action)}" | |
419 | data-line-number="${line.original.lineno}" |
|
419 | data-line-number="${line.original.lineno}" | |
420 | > |
|
420 | > | |
421 | <div> |
|
421 | <div> | |
422 | %if line.original.comments: |
|
422 | %if line.original.comments: | |
423 | <i class="icon-comment" onclick="return Rhodecode.comments.toggleLineComments(this)"></i> |
|
423 | <i class="icon-comment" onclick="return Rhodecode.comments.toggleLineComments(this)"></i> | |
424 | %endif |
|
424 | %endif | |
425 | </div> |
|
425 | </div> | |
426 | </td> |
|
426 | </td> | |
427 | <td class="cb-lineno ${action_class(line.original.action)}" |
|
427 | <td class="cb-lineno ${action_class(line.original.action)}" | |
428 | data-line-number="${line.original.lineno}" |
|
428 | data-line-number="${line.original.lineno}" | |
429 | %if old_line_anchor: |
|
429 | %if old_line_anchor: | |
430 | id="${old_line_anchor}" |
|
430 | id="${old_line_anchor}" | |
431 | %endif |
|
431 | %endif | |
432 | > |
|
432 | > | |
433 | %if line.original.lineno: |
|
433 | %if line.original.lineno: | |
434 | <a name="${old_line_anchor}" href="#${old_line_anchor}">${line.original.lineno}</a> |
|
434 | <a name="${old_line_anchor}" href="#${old_line_anchor}">${line.original.lineno}</a> | |
435 | %endif |
|
435 | %endif | |
436 | </td> |
|
436 | </td> | |
437 | <td class="cb-content ${action_class(line.original.action)}" |
|
437 | <td class="cb-content ${action_class(line.original.action)}" | |
438 | data-line-number="o${line.original.lineno}" |
|
438 | data-line-number="o${line.original.lineno}" | |
439 | > |
|
439 | > | |
440 | %if use_comments and line.original.lineno: |
|
440 | %if use_comments and line.original.lineno: | |
441 | ${render_add_comment_button()} |
|
441 | ${render_add_comment_button()} | |
442 | %endif |
|
442 | %endif | |
443 | <span class="cb-code">${line.original.action} ${line.original.content or '' | n}</span> |
|
443 | <span class="cb-code">${line.original.action} ${line.original.content or '' | n}</span> | |
444 | %if use_comments and line.original.lineno and line.original.comments: |
|
444 | %if use_comments and line.original.lineno and line.original.comments: | |
445 | ${inline_comments_container(line.original.comments)} |
|
445 | ${inline_comments_container(line.original.comments)} | |
446 | %endif |
|
446 | %endif | |
447 | </td> |
|
447 | </td> | |
448 | <td class="cb-data ${action_class(line.modified.action)}" |
|
448 | <td class="cb-data ${action_class(line.modified.action)}" | |
449 | data-line-number="${line.modified.lineno}" |
|
449 | data-line-number="${line.modified.lineno}" | |
450 | > |
|
450 | > | |
451 | <div> |
|
451 | <div> | |
452 | %if line.modified.comments: |
|
452 | %if line.modified.comments: | |
453 | <i class="icon-comment" onclick="return Rhodecode.comments.toggleLineComments(this)"></i> |
|
453 | <i class="icon-comment" onclick="return Rhodecode.comments.toggleLineComments(this)"></i> | |
454 | %endif |
|
454 | %endif | |
455 | </div> |
|
455 | </div> | |
456 | </td> |
|
456 | </td> | |
457 | <td class="cb-lineno ${action_class(line.modified.action)}" |
|
457 | <td class="cb-lineno ${action_class(line.modified.action)}" | |
458 | data-line-number="${line.modified.lineno}" |
|
458 | data-line-number="${line.modified.lineno}" | |
459 | %if new_line_anchor: |
|
459 | %if new_line_anchor: | |
460 | id="${new_line_anchor}" |
|
460 | id="${new_line_anchor}" | |
461 | %endif |
|
461 | %endif | |
462 | > |
|
462 | > | |
463 | %if line.modified.lineno: |
|
463 | %if line.modified.lineno: | |
464 | <a name="${new_line_anchor}" href="#${new_line_anchor}">${line.modified.lineno}</a> |
|
464 | <a name="${new_line_anchor}" href="#${new_line_anchor}">${line.modified.lineno}</a> | |
465 | %endif |
|
465 | %endif | |
466 | </td> |
|
466 | </td> | |
467 | <td class="cb-content ${action_class(line.modified.action)}" |
|
467 | <td class="cb-content ${action_class(line.modified.action)}" | |
468 | data-line-number="n${line.modified.lineno}" |
|
468 | data-line-number="n${line.modified.lineno}" | |
469 | > |
|
469 | > | |
470 | %if use_comments and line.modified.lineno: |
|
470 | %if use_comments and line.modified.lineno: | |
471 | ${render_add_comment_button()} |
|
471 | ${render_add_comment_button()} | |
472 | %endif |
|
472 | %endif | |
473 | <span class="cb-code">${line.modified.action} ${line.modified.content or '' | n}</span> |
|
473 | <span class="cb-code">${line.modified.action} ${line.modified.content or '' | n}</span> | |
474 | %if use_comments and line.modified.lineno and line.modified.comments: |
|
474 | %if use_comments and line.modified.lineno and line.modified.comments: | |
475 | ${inline_comments_container(line.modified.comments)} |
|
475 | ${inline_comments_container(line.modified.comments)} | |
476 | %endif |
|
476 | %endif | |
477 | </td> |
|
477 | </td> | |
478 | </tr> |
|
478 | </tr> | |
479 | %endfor |
|
479 | %endfor | |
480 | </%def> |
|
480 | </%def> | |
481 |
|
481 | |||
482 |
|
482 | |||
483 | <%def name="render_hunk_lines_unified(hunk, use_comments=False)"> |
|
483 | <%def name="render_hunk_lines_unified(hunk, use_comments=False)"> | |
484 | %for old_line_no, new_line_no, action, content, comments in hunk.unified: |
|
484 | %for old_line_no, new_line_no, action, content, comments in hunk.unified: | |
485 | <% |
|
485 | <% | |
486 | old_line_anchor, new_line_anchor = None, None |
|
486 | old_line_anchor, new_line_anchor = None, None | |
487 | if old_line_no: |
|
487 | if old_line_no: | |
488 | old_line_anchor = diff_line_anchor(hunk.filediff.source_file_path, old_line_no, 'o') |
|
488 | old_line_anchor = diff_line_anchor(hunk.filediff.source_file_path, old_line_no, 'o') | |
489 | if new_line_no: |
|
489 | if new_line_no: | |
490 | new_line_anchor = diff_line_anchor(hunk.filediff.target_file_path, new_line_no, 'n') |
|
490 | new_line_anchor = diff_line_anchor(hunk.filediff.target_file_path, new_line_no, 'n') | |
491 | %> |
|
491 | %> | |
492 | <tr class="cb-line"> |
|
492 | <tr class="cb-line"> | |
493 | <td class="cb-data ${action_class(action)}"> |
|
493 | <td class="cb-data ${action_class(action)}"> | |
494 | <div> |
|
494 | <div> | |
495 | %if comments: |
|
495 | %if comments: | |
496 | <i class="icon-comment" onclick="return Rhodecode.comments.toggleLineComments(this)"></i> |
|
496 | <i class="icon-comment" onclick="return Rhodecode.comments.toggleLineComments(this)"></i> | |
497 | %endif |
|
497 | %endif | |
498 | </div> |
|
498 | </div> | |
499 | </td> |
|
499 | </td> | |
500 | <td class="cb-lineno ${action_class(action)}" |
|
500 | <td class="cb-lineno ${action_class(action)}" | |
501 | data-line-number="${old_line_no}" |
|
501 | data-line-number="${old_line_no}" | |
502 | %if old_line_anchor: |
|
502 | %if old_line_anchor: | |
503 | id="${old_line_anchor}" |
|
503 | id="${old_line_anchor}" | |
504 | %endif |
|
504 | %endif | |
505 | > |
|
505 | > | |
506 | %if old_line_anchor: |
|
506 | %if old_line_anchor: | |
507 | <a name="${old_line_anchor}" href="#${old_line_anchor}">${old_line_no}</a> |
|
507 | <a name="${old_line_anchor}" href="#${old_line_anchor}">${old_line_no}</a> | |
508 | %endif |
|
508 | %endif | |
509 | </td> |
|
509 | </td> | |
510 | <td class="cb-lineno ${action_class(action)}" |
|
510 | <td class="cb-lineno ${action_class(action)}" | |
511 | data-line-number="${new_line_no}" |
|
511 | data-line-number="${new_line_no}" | |
512 | %if new_line_anchor: |
|
512 | %if new_line_anchor: | |
513 | id="${new_line_anchor}" |
|
513 | id="${new_line_anchor}" | |
514 | %endif |
|
514 | %endif | |
515 | > |
|
515 | > | |
516 | %if new_line_anchor: |
|
516 | %if new_line_anchor: | |
517 | <a name="${new_line_anchor}" href="#${new_line_anchor}">${new_line_no}</a> |
|
517 | <a name="${new_line_anchor}" href="#${new_line_anchor}">${new_line_no}</a> | |
518 | %endif |
|
518 | %endif | |
519 | </td> |
|
519 | </td> | |
520 | <td class="cb-content ${action_class(action)}" |
|
520 | <td class="cb-content ${action_class(action)}" | |
521 | data-line-number="${new_line_no and 'n' or 'o'}${new_line_no or old_line_no}" |
|
521 | data-line-number="${new_line_no and 'n' or 'o'}${new_line_no or old_line_no}" | |
522 | > |
|
522 | > | |
523 | %if use_comments: |
|
523 | %if use_comments: | |
524 | ${render_add_comment_button()} |
|
524 | ${render_add_comment_button()} | |
525 | %endif |
|
525 | %endif | |
526 | <span class="cb-code">${action} ${content or '' | n}</span> |
|
526 | <span class="cb-code">${action} ${content or '' | n}</span> | |
527 | %if use_comments and comments: |
|
527 | %if use_comments and comments: | |
528 | ${inline_comments_container(comments)} |
|
528 | ${inline_comments_container(comments)} | |
529 | %endif |
|
529 | %endif | |
530 | </td> |
|
530 | </td> | |
531 | </tr> |
|
531 | </tr> | |
532 | %endfor |
|
532 | %endfor | |
533 | </%def> |
|
533 | </%def> | |
534 |
|
534 | |||
535 | <%def name="render_add_comment_button()"> |
|
535 | <%def name="render_add_comment_button()"> | |
536 | <button |
|
536 | <button | |
537 | class="btn btn-small btn-primary cb-comment-box-opener" |
|
537 | class="btn btn-small btn-primary cb-comment-box-opener" | |
538 | onclick="return Rhodecode.comments.createComment(this)" |
|
538 | onclick="return Rhodecode.comments.createComment(this)" | |
539 | ><span>+</span></button> |
|
539 | ><span>+</span></button> | |
540 | </%def> |
|
540 | </%def> | |
541 |
|
541 | |||
542 | <%def name="render_diffset_menu()"> |
|
542 | <%def name="render_diffset_menu()"> | |
|
543 | ||||
543 | <div class="diffset-menu clearinner"> |
|
544 | <div class="diffset-menu clearinner"> | |
544 | <div class="pull-right"> |
|
545 | <div class="pull-right"> | |
545 | <div class="btn-group"> |
|
546 | <div class="btn-group"> | |
546 | <a |
|
547 | <a | |
547 | class="btn ${c.diffmode == 'sideside' and 'btn-primary'} tooltip" |
|
548 | class="btn ${c.diffmode == 'sideside' and 'btn-primary'} tooltip" | |
548 | title="${_('View side by side')}" |
|
549 | title="${_('View side by side')}" | |
549 | href="${h.url_replace(diffmode='sideside')}"> |
|
550 | href="${h.url_replace(diffmode='sideside')}"> | |
550 | <span>${_('Side by Side')}</span> |
|
551 | <span>${_('Side by Side')}</span> | |
551 | </a> |
|
552 | </a> | |
552 | <a |
|
553 | <a | |
553 | class="btn ${c.diffmode == 'unified' and 'btn-primary'} tooltip" |
|
554 | class="btn ${c.diffmode == 'unified' and 'btn-primary'} tooltip" | |
554 | title="${_('View unified')}" href="${h.url_replace(diffmode='unified')}"> |
|
555 | title="${_('View unified')}" href="${h.url_replace(diffmode='unified')}"> | |
555 | <span>${_('Unified')}</span> |
|
556 | <span>${_('Unified')}</span> | |
556 | </a> |
|
557 | </a> | |
557 | </div> |
|
558 | </div> | |
558 | </div> |
|
559 | </div> | |
559 | <div class="pull-left"> |
|
560 | <div class="pull-left"> | |
560 | <div class="btn-group"> |
|
561 | <div class="btn-group"> | |
561 | <a |
|
562 | <a | |
562 | class="btn" |
|
563 | class="btn" | |
563 | href="#" |
|
564 | href="#" | |
564 | onclick="$('input[class=filediff-collapse-state]').prop('checked', false); return false">${_('Expand All')}</a> |
|
565 | onclick="$('input[class=filediff-collapse-state]').prop('checked', false); return false">${_('Expand All')}</a> | |
565 | <a |
|
566 | <a | |
566 | class="btn" |
|
567 | class="btn" | |
567 | href="#" |
|
568 | href="#" | |
568 | onclick="$('input[class=filediff-collapse-state]').prop('checked', true); return false">${_('Collapse All')}</a> |
|
569 | onclick="$('input[class=filediff-collapse-state]').prop('checked', true); return false">${_('Collapse All')}</a> | |
|
570 | <a | |||
|
571 | class="btn" | |||
|
572 | href="#" | |||
|
573 | onclick="return Rhodecode.comments.toggleWideMode(this)">${_('Wide Mode')}</a> | |||
569 | </div> |
|
574 | </div> | |
570 | </div> |
|
575 | </div> | |
571 | </div> |
|
576 | </div> | |
572 | </%def> |
|
577 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now