Show More
@@ -1,545 +1,545 b'' | |||
|
1 | 1 | // |
|
2 | 2 | // Typography |
|
3 | 3 | // modified from Bootstrap |
|
4 | 4 | // -------------------------------------------------- |
|
5 | 5 | |
|
6 | 6 | // Base |
|
7 | 7 | body { |
|
8 | 8 | font-size: @basefontsize; |
|
9 | 9 | font-family: @text-light; |
|
10 | 10 | letter-spacing: .02em; |
|
11 | 11 | color: @grey2; |
|
12 | 12 | } |
|
13 | 13 | |
|
14 | 14 | #content, label{ |
|
15 | 15 | font-size: @basefontsize; |
|
16 | 16 | } |
|
17 | 17 | |
|
18 | 18 | label { |
|
19 | 19 | color: @grey2; |
|
20 | 20 | } |
|
21 | 21 | |
|
22 | 22 | ::selection { background: @rchighlightblue; } |
|
23 | 23 | |
|
24 | 24 | // Headings |
|
25 | 25 | // ------------------------- |
|
26 | 26 | |
|
27 | 27 | h1, h2, h3, h4, h5, h6, |
|
28 | 28 | .h1, .h2, .h3, .h4, .h5, .h6 { |
|
29 | 29 | margin: 0 0 @textmargin 0; |
|
30 | 30 | padding: 0; |
|
31 | 31 | line-height: 1.8em; |
|
32 | 32 | color: @text-color; |
|
33 | 33 | a { |
|
34 | 34 | color: @rcblue; |
|
35 | 35 | } |
|
36 | 36 | } |
|
37 | 37 | |
|
38 | 38 | h1, .h1 { font-size: 1.54em; font-family: @text-bold; } |
|
39 | 39 | h2, .h2 { font-size: 1.23em; font-family: @text-semibold; } |
|
40 | 40 | h3, .h3 { font-size: 1.23em; font-family: @text-regular; } |
|
41 | 41 | h4, .h4 { font-size: 1em; font-family: @text-bold; } |
|
42 | 42 | h5, .h5 { font-size: 1em; font-family: @text-bold-italic; } |
|
43 | 43 | h6, .h6 { font-size: 1em; font-family: @text-bold-italic; } |
|
44 | 44 | |
|
45 | 45 | // Breadcrumbs |
|
46 | 46 | .breadcrumbs { |
|
47 | 47 | &:extend(h1); |
|
48 | 48 | margin: 0; |
|
49 | 49 | } |
|
50 | 50 | |
|
51 | 51 | .breadcrumbs_light { |
|
52 | 52 | float:left; |
|
53 | 53 | font-size: 1.3em; |
|
54 | 54 | line-height: 38px; |
|
55 | 55 | } |
|
56 | 56 | |
|
57 | 57 | // Body text |
|
58 | 58 | // ------------------------- |
|
59 | 59 | |
|
60 | 60 | p { |
|
61 | 61 | margin: 0 0 @textmargin 0; |
|
62 | 62 | padding: 0; |
|
63 | 63 | line-height: 2em; |
|
64 | 64 | } |
|
65 | 65 | |
|
66 | 66 | .lead { |
|
67 | 67 | margin-bottom: @textmargin; |
|
68 | 68 | font-weight: 300; |
|
69 | 69 | line-height: 1.4; |
|
70 | 70 | |
|
71 | 71 | @media (min-width: @screen-sm-min) { |
|
72 | 72 | font-size: (@basefontsize * 1.5); |
|
73 | 73 | } |
|
74 | 74 | } |
|
75 | 75 | |
|
76 | 76 | a, |
|
77 | 77 | .link { |
|
78 | 78 | color: @rcblue; |
|
79 | 79 | text-decoration: none; |
|
80 | 80 | outline: none; |
|
81 | 81 | cursor: pointer; |
|
82 | 82 | |
|
83 | 83 | &:focus { |
|
84 | 84 | outline: none; |
|
85 | 85 | } |
|
86 | 86 | |
|
87 | 87 | &:hover { |
|
88 | 88 | color: @rcdarkblue; |
|
89 | 89 | } |
|
90 | 90 | } |
|
91 | 91 | |
|
92 | 92 | img { |
|
93 | 93 | border: none; |
|
94 | 94 | outline: none; |
|
95 | 95 | } |
|
96 | 96 | |
|
97 | 97 | strong { |
|
98 | 98 | font-family: @text-bold; |
|
99 | 99 | } |
|
100 | 100 | |
|
101 | 101 | em { |
|
102 | 102 | font-family: @text-italic; |
|
103 | 103 | } |
|
104 | 104 | |
|
105 | 105 | strong em, |
|
106 | 106 | em strong { |
|
107 | 107 | font-family: @text-bold-italic; |
|
108 | 108 | } |
|
109 | 109 | |
|
110 | 110 | //TODO: lisa: b and i are depreciated, but we are still using them in places. |
|
111 | 111 | // Should probably make some decision whether to keep or lose these. |
|
112 | 112 | b { |
|
113 | 113 | |
|
114 | 114 | } |
|
115 | 115 | |
|
116 | 116 | i { |
|
117 | 117 | font-style: normal; |
|
118 | 118 | } |
|
119 | 119 | |
|
120 | 120 | label { |
|
121 | 121 | color: @text-color; |
|
122 | 122 | |
|
123 | 123 | input[type="checkbox"] { |
|
124 | 124 | margin-right: 1em; |
|
125 | 125 | } |
|
126 | 126 | input[type="radio"] { |
|
127 | 127 | margin-right: 1em; |
|
128 | 128 | } |
|
129 | 129 | } |
|
130 | 130 | |
|
131 | 131 | code, |
|
132 | 132 | .code { |
|
133 | 133 | font-size: .95em; |
|
134 | font-family: "Lucida Console", Monaco, monospace; | |
|
134 | font-family: @text-code; | |
|
135 | 135 | color: @grey3; |
|
136 | 136 | |
|
137 | 137 | a { |
|
138 | 138 | color: lighten(@rcblue,10%) |
|
139 | 139 | } |
|
140 | 140 | } |
|
141 | 141 | |
|
142 | 142 | pre { |
|
143 | 143 | margin: 0; |
|
144 | 144 | padding: 0; |
|
145 | 145 | border: 0; |
|
146 | 146 | outline: 0; |
|
147 | 147 | font-size: @basefontsize*.95; |
|
148 | 148 | line-height: 1.4em; |
|
149 | font-family: "Lucida Console", Monaco, monospace; | |
|
149 | font-family: @text-code; | |
|
150 | 150 | color: @grey3; |
|
151 | 151 | } |
|
152 | 152 | |
|
153 | 153 | // Emphasis & misc |
|
154 | 154 | // ------------------------- |
|
155 | 155 | |
|
156 | 156 | small, |
|
157 | 157 | .small { |
|
158 | 158 | font-size: 75%; |
|
159 | 159 | font-weight: normal; |
|
160 | 160 | line-height: 1em; |
|
161 | 161 | } |
|
162 | 162 | |
|
163 | 163 | mark, |
|
164 | 164 | .mark { |
|
165 | 165 | background-color: @rclightblue; |
|
166 | 166 | padding: .2em; |
|
167 | 167 | } |
|
168 | 168 | |
|
169 | 169 | // Alignment |
|
170 | 170 | .text-left { text-align: left; } |
|
171 | 171 | .text-right { text-align: right; } |
|
172 | 172 | .text-center { text-align: center; } |
|
173 | 173 | .text-justify { text-align: justify; } |
|
174 | 174 | .text-nowrap { white-space: nowrap; } |
|
175 | 175 | |
|
176 | 176 | // Transformation |
|
177 | 177 | .text-lowercase { text-transform: lowercase; } |
|
178 | 178 | .text-uppercase { text-transform: uppercase; } |
|
179 | 179 | .text-capitalize { text-transform: capitalize; } |
|
180 | 180 | |
|
181 | 181 | // Contextual colors |
|
182 | 182 | .text-muted { |
|
183 | 183 | color: @grey4; |
|
184 | 184 | } |
|
185 | 185 | .text-primary { |
|
186 | 186 | color: @rcblue; |
|
187 | 187 | } |
|
188 | 188 | .text-success { |
|
189 | 189 | color: @alert1; |
|
190 | 190 | } |
|
191 | 191 | .text-info { |
|
192 | 192 | color: @alert4; |
|
193 | 193 | } |
|
194 | 194 | .text-warning { |
|
195 | 195 | color: @alert3; |
|
196 | 196 | } |
|
197 | 197 | .text-danger { |
|
198 | 198 | color: @alert2; |
|
199 | 199 | } |
|
200 | 200 | |
|
201 | 201 | // Contextual backgrounds |
|
202 | 202 | .bg-primary { |
|
203 | 203 | background-color: white; |
|
204 | 204 | } |
|
205 | 205 | .bg-success { |
|
206 | 206 | background-color: @alert1; |
|
207 | 207 | } |
|
208 | 208 | .bg-info { |
|
209 | 209 | background-color: @alert4; |
|
210 | 210 | } |
|
211 | 211 | .bg-warning { |
|
212 | 212 | background-color: @alert3; |
|
213 | 213 | } |
|
214 | 214 | .bg-danger { |
|
215 | 215 | background-color: @alert2; |
|
216 | 216 | } |
|
217 | 217 | |
|
218 | 218 | |
|
219 | 219 | // Page header |
|
220 | 220 | // ------------------------- |
|
221 | 221 | |
|
222 | 222 | .page-header { |
|
223 | 223 | margin: @pagepadding 0 @textmargin; |
|
224 | 224 | border-bottom: @border-thickness solid @grey5; |
|
225 | 225 | } |
|
226 | 226 | |
|
227 | 227 | .title { |
|
228 | 228 | clear: both; |
|
229 | 229 | float: left; |
|
230 | 230 | width: 100%; |
|
231 | 231 | margin: @pagepadding 0 @pagepadding; |
|
232 | 232 | |
|
233 | 233 | .breadcrumbs{ |
|
234 | 234 | float: left; |
|
235 | 235 | clear: both; |
|
236 | 236 | width: 700px; |
|
237 | 237 | margin: 0; |
|
238 | 238 | |
|
239 | 239 | .q_filter_box { |
|
240 | 240 | margin-right: @padding; |
|
241 | 241 | } |
|
242 | 242 | } |
|
243 | 243 | |
|
244 | 244 | h1 a { |
|
245 | 245 | color: @rcblue; |
|
246 | 246 | } |
|
247 | 247 | |
|
248 | 248 | input{ |
|
249 | 249 | margin-right: @padding; |
|
250 | 250 | } |
|
251 | 251 | |
|
252 | 252 | h5, .h5 { |
|
253 | 253 | color: @grey1; |
|
254 | 254 | margin-bottom: @space; |
|
255 | 255 | |
|
256 | 256 | span { |
|
257 | 257 | display: inline-block; |
|
258 | 258 | } |
|
259 | 259 | } |
|
260 | 260 | |
|
261 | 261 | p { |
|
262 | 262 | margin-bottom: 0; |
|
263 | 263 | } |
|
264 | 264 | |
|
265 | 265 | .links { |
|
266 | 266 | float: right; |
|
267 | 267 | display: inline; |
|
268 | 268 | margin: 0; |
|
269 | 269 | padding-left: 0; |
|
270 | 270 | list-style: none; |
|
271 | 271 | text-align: right; |
|
272 | 272 | |
|
273 | 273 | li:before { content: none; } |
|
274 | 274 | li { float: right; } |
|
275 | 275 | a { |
|
276 | 276 | display: inline-block; |
|
277 | 277 | margin-left: @textmargin/2; |
|
278 | 278 | } |
|
279 | 279 | } |
|
280 | 280 | |
|
281 | 281 | .title-content { |
|
282 | 282 | float: left; |
|
283 | 283 | margin: 0; |
|
284 | 284 | padding: 0; |
|
285 | 285 | |
|
286 | 286 | & + .breadcrumbs { |
|
287 | 287 | margin-top: @padding; |
|
288 | 288 | } |
|
289 | 289 | |
|
290 | 290 | & + .links { |
|
291 | 291 | margin-top: -@button-padding; |
|
292 | 292 | |
|
293 | 293 | & + .breadcrumbs { |
|
294 | 294 | margin-top: @padding; |
|
295 | 295 | } |
|
296 | 296 | } |
|
297 | 297 | } |
|
298 | 298 | |
|
299 | 299 | .title-main { |
|
300 | 300 | font-size: @repo-title-fontsize; |
|
301 | 301 | } |
|
302 | 302 | |
|
303 | 303 | .title-description { |
|
304 | 304 | margin-top: .5em; |
|
305 | 305 | } |
|
306 | 306 | |
|
307 | 307 | .q_filter_box { |
|
308 | 308 | width: 200px; |
|
309 | 309 | } |
|
310 | 310 | |
|
311 | 311 | } |
|
312 | 312 | |
|
313 | 313 | #readme .title { |
|
314 | 314 | text-transform: none; |
|
315 | 315 | } |
|
316 | 316 | |
|
317 | 317 | // Lists |
|
318 | 318 | // ------------------------- |
|
319 | 319 | |
|
320 | 320 | // Unordered and Ordered lists |
|
321 | 321 | ul, |
|
322 | 322 | ol { |
|
323 | 323 | margin-top: 0; |
|
324 | 324 | margin-bottom: @textmargin; |
|
325 | 325 | ul, |
|
326 | 326 | ol { |
|
327 | 327 | margin-bottom: 0; |
|
328 | 328 | } |
|
329 | 329 | } |
|
330 | 330 | |
|
331 | 331 | li { |
|
332 | 332 | line-height: 2em; |
|
333 | 333 | } |
|
334 | 334 | |
|
335 | 335 | ul li { |
|
336 | 336 | position: relative; |
|
337 | 337 | display: block; |
|
338 | 338 | list-style-type: none; |
|
339 | 339 | |
|
340 | 340 | &:before { |
|
341 | 341 | content: "\2014\00A0"; |
|
342 | 342 | position: absolute; |
|
343 | 343 | top: 0; |
|
344 | 344 | left: -1.25em; |
|
345 | 345 | } |
|
346 | 346 | |
|
347 | 347 | p:first-child { |
|
348 | 348 | display:inline; |
|
349 | 349 | } |
|
350 | 350 | } |
|
351 | 351 | |
|
352 | 352 | // List options |
|
353 | 353 | |
|
354 | 354 | // Unstyled keeps list items block level, just removes default browser padding and list-style |
|
355 | 355 | .list-unstyled { |
|
356 | 356 | padding-left: 0; |
|
357 | 357 | list-style: none; |
|
358 | 358 | li:before { content: none; } |
|
359 | 359 | } |
|
360 | 360 | |
|
361 | 361 | // Inline turns list items into inline-block |
|
362 | 362 | .list-inline { |
|
363 | 363 | .list-unstyled(); |
|
364 | 364 | margin-left: -5px; |
|
365 | 365 | |
|
366 | 366 | > li { |
|
367 | 367 | display: inline-block; |
|
368 | 368 | padding-left: 5px; |
|
369 | 369 | padding-right: 5px; |
|
370 | 370 | } |
|
371 | 371 | } |
|
372 | 372 | |
|
373 | 373 | // Description Lists |
|
374 | 374 | |
|
375 | 375 | dl { |
|
376 | 376 | margin-top: 0; // Remove browser default |
|
377 | 377 | margin-bottom: @textmargin; |
|
378 | 378 | } |
|
379 | 379 | |
|
380 | 380 | dt, |
|
381 | 381 | dd { |
|
382 | 382 | line-height: 1.4em; |
|
383 | 383 | } |
|
384 | 384 | |
|
385 | 385 | dt { |
|
386 | 386 | margin: @textmargin 0 0 0; |
|
387 | 387 | font-family: @text-bold; |
|
388 | 388 | } |
|
389 | 389 | |
|
390 | 390 | dd { |
|
391 | 391 | margin-left: 0; // Undo browser default |
|
392 | 392 | } |
|
393 | 393 | |
|
394 | 394 | // Horizontal description lists |
|
395 | 395 | // Defaults to being stacked without any of the below styles applied, until the |
|
396 | 396 | // grid breakpoint is reached (default of ~768px). |
|
397 | 397 | // These are used in forms as well; see style guide. |
|
398 | 398 | // TODO: lisa: These should really not be used in forms. |
|
399 | 399 | |
|
400 | 400 | .dl-horizontal { |
|
401 | 401 | |
|
402 | 402 | overflow: hidden; |
|
403 | 403 | margin-bottom: @space; |
|
404 | 404 | |
|
405 | 405 | dt, dd { |
|
406 | 406 | float: left; |
|
407 | 407 | margin: 5px 0 5px 0; |
|
408 | 408 | } |
|
409 | 409 | |
|
410 | 410 | dt { |
|
411 | 411 | clear: left; |
|
412 | 412 | width: @label-width - @form-vertical-margin; |
|
413 | 413 | } |
|
414 | 414 | |
|
415 | 415 | dd { |
|
416 | 416 | &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present |
|
417 | 417 | margin-left: @form-vertical-margin; |
|
418 | 418 | max-width: @form-max-width - (@label-width - @form-vertical-margin) - @form-vertical-margin; |
|
419 | 419 | } |
|
420 | 420 | |
|
421 | 421 | pre { |
|
422 | 422 | margin: 0; |
|
423 | 423 | } |
|
424 | 424 | |
|
425 | 425 | &.settings { |
|
426 | 426 | dt { |
|
427 | 427 | text-align: left; |
|
428 | 428 | } |
|
429 | 429 | } |
|
430 | 430 | |
|
431 | 431 | @media (min-width: 768px) { |
|
432 | 432 | dt { |
|
433 | 433 | float: left; |
|
434 | 434 | width: 180px; |
|
435 | 435 | clear: left; |
|
436 | 436 | text-align: right; |
|
437 | 437 | } |
|
438 | 438 | dd { |
|
439 | 439 | margin-left: 20px; |
|
440 | 440 | } |
|
441 | 441 | } |
|
442 | 442 | } |
|
443 | 443 | |
|
444 | 444 | |
|
445 | 445 | // Misc |
|
446 | 446 | // ------------------------- |
|
447 | 447 | |
|
448 | 448 | // Abbreviations and acronyms |
|
449 | 449 | abbr[title], |
|
450 | 450 | abbr[data-original-title] { |
|
451 | 451 | cursor: help; |
|
452 | 452 | border-bottom: @border-thickness dotted @grey4; |
|
453 | 453 | } |
|
454 | 454 | .initialism { |
|
455 | 455 | font-size: 90%; |
|
456 | 456 | text-transform: uppercase; |
|
457 | 457 | } |
|
458 | 458 | |
|
459 | 459 | // Blockquotes |
|
460 | 460 | blockquote { |
|
461 | 461 | padding: 1em 2em; |
|
462 | 462 | margin: 0 0 2em; |
|
463 | 463 | font-size: @basefontsize; |
|
464 | 464 | border-left: 2px solid @grey6; |
|
465 | 465 | |
|
466 | 466 | p, |
|
467 | 467 | ul, |
|
468 | 468 | ol { |
|
469 | 469 | &:last-child { |
|
470 | 470 | margin-bottom: 0; |
|
471 | 471 | } |
|
472 | 472 | } |
|
473 | 473 | |
|
474 | 474 | footer, |
|
475 | 475 | small, |
|
476 | 476 | .small { |
|
477 | 477 | display: block; |
|
478 | 478 | font-size: 80%; |
|
479 | 479 | |
|
480 | 480 | &:before { |
|
481 | 481 | content: '\2014 \00A0'; // em dash, nbsp |
|
482 | 482 | } |
|
483 | 483 | } |
|
484 | 484 | } |
|
485 | 485 | |
|
486 | 486 | // Opposite alignment of blockquote |
|
487 | 487 | // |
|
488 | 488 | .blockquote-reverse, |
|
489 | 489 | blockquote.pull-right { |
|
490 | 490 | padding-right: 15px; |
|
491 | 491 | padding-left: 0; |
|
492 | 492 | border-right: 5px solid @grey6; |
|
493 | 493 | border-left: 0; |
|
494 | 494 | text-align: right; |
|
495 | 495 | |
|
496 | 496 | // Account for citation |
|
497 | 497 | footer, |
|
498 | 498 | small, |
|
499 | 499 | .small { |
|
500 | 500 | &:before { content: ''; } |
|
501 | 501 | &:after { |
|
502 | 502 | content: '\00A0 \2014'; // nbsp, em dash |
|
503 | 503 | } |
|
504 | 504 | } |
|
505 | 505 | } |
|
506 | 506 | |
|
507 | 507 | // Addresses |
|
508 | 508 | address { |
|
509 | 509 | margin-bottom: 2em; |
|
510 | 510 | font-style: normal; |
|
511 | 511 | line-height: 1.8em; |
|
512 | 512 | } |
|
513 | 513 | |
|
514 | 514 | .error-message { |
|
515 | 515 | display: block; |
|
516 | 516 | margin: @padding/3 0; |
|
517 | 517 | color: @alert2; |
|
518 | 518 | } |
|
519 | 519 | |
|
520 | 520 | .issue-tracker-link { |
|
521 | 521 | color: @rcblue; |
|
522 | 522 | } |
|
523 | 523 | |
|
524 | 524 | .info_text{ |
|
525 | 525 | font-size: @basefontsize; |
|
526 | 526 | color: @grey4; |
|
527 | 527 | font-family: @text-regular; |
|
528 | 528 | } |
|
529 | 529 | |
|
530 | 530 | // help block text |
|
531 | 531 | .help-block { |
|
532 | 532 | display: block; |
|
533 | 533 | margin: 0 0 @padding; |
|
534 | 534 | color: @grey4; |
|
535 | 535 | font-family: @text-light; |
|
536 | 536 | &.pre-formatting { |
|
537 | 537 | white-space: pre; |
|
538 | 538 | } |
|
539 | 539 | } |
|
540 | 540 | |
|
541 | 541 | .error-message { |
|
542 | 542 | display: block; |
|
543 | 543 | margin: @padding/3 0; |
|
544 | 544 | color: @alert2; |
|
545 | 545 | } |
@@ -1,137 +1,138 b'' | |||
|
1 | 1 | // variables for use in all RhodeCode products |
|
2 | 2 | |
|
3 | 3 | // FONTS |
|
4 | 4 | //Primary Colors (brand) |
|
5 | 5 | @rcblue: #427cc9; //RhodeCode blue |
|
6 | 6 | @rcdarkblue: #305b91; //RhodeCode dark blue |
|
7 | 7 | @rclightblue: lighten(@rcblue, 30%); |
|
8 | 8 | @rchighlightblue: lighten(@rcblue, 35%); |
|
9 | 9 | |
|
10 | 10 | // Secondary Colors (greyscale) |
|
11 | 11 | @grey1: #202020; //midnight |
|
12 | 12 | @grey2: #323232; //charcoal |
|
13 | 13 | @grey3: #666666; //tungsten |
|
14 | 14 | @grey4: #979797; //light grey |
|
15 | 15 | @grey5: #dbd9da; //greyish |
|
16 | 16 | @grey6: #eeeeee; //silver |
|
17 | 17 | @grey7: #f9f9f9; //light silver |
|
18 | 18 | |
|
19 | 19 | // special for navigation |
|
20 | 20 | @nav-grey: #CDCCCD; |
|
21 | 21 | |
|
22 | 22 | @grey5-alpha: rgba(219, 217, 218, 0.3); |
|
23 | 23 | |
|
24 | 24 | // Tertiary Colors |
|
25 | 25 | @color1: #879938; //olive green |
|
26 | 26 | @color2: #fcc93a; //bright yellow |
|
27 | 27 | @color3: #ff9e07; //orange-yellow |
|
28 | 28 | @color4: #fc663a; //bright orange |
|
29 | 29 | @color5: #d63d44; //signal red |
|
30 | 30 | @color6: #99287c; //violet |
|
31 | 31 | @color7: #682668; //dark purple |
|
32 | 32 | @color8: #194f8e; //dark blue |
|
33 | 33 | |
|
34 | 34 | // Alert Colors (bright) |
|
35 | 35 | @alert1: #0ac878; //bright green |
|
36 | 36 | @alert2: #e85e4d; //soft red |
|
37 | 37 | @alert3: #ffc854; //corn yellow |
|
38 | 38 | @alert4: #84a5d2; //light blue |
|
39 | 39 | |
|
40 | 40 | // Alert Inner Colors |
|
41 | 41 | @alert1-inner: #daf7eb; //bright green |
|
42 | 42 | @alert2-inner: #fbdfdb; //soft red |
|
43 | 43 | @alert3-inner: #fff4dd; //corn yellow |
|
44 | 44 | @alert4-inner: #e6edf6; //light blue |
|
45 | 45 | |
|
46 | 46 | // Highlight color for lines and colors |
|
47 | 47 | @comment-highlight-color: #ffd887; |
|
48 | 48 | |
|
49 | 49 | // FONTS |
|
50 | 50 | @basefontsize: 13px; |
|
51 | 51 | @navigation-fontsize: 14px; |
|
52 | 52 | @journal-fontsize: @basefontsize+7px; |
|
53 | 53 | @text-color: @grey2; |
|
54 | 54 | @repo-title-fontsize: 18px; |
|
55 | 55 | |
|
56 | 56 | @text-regular: "proximanovaregular","Proxima Nova Regular", "Proxima Nova", sans-serif; |
|
57 | 57 | @text-italic: "proximanovaitalic","Proxima Nova Italic", "Proxima Nova", sans-serif; |
|
58 | 58 | @text-bold: "proximanovabold","Proxima Nova Bold", "Proxima Nova", sans-serif; |
|
59 | 59 | @text-semibold: "proximanovasemibold","Proxima Nova Semibold", "Proxima Nova", sans-serif; |
|
60 | 60 | @text-bold-italic: "proximanovabolditalic","Proxima Nova Bold Italic", "Proxima Nova", sans-serif; |
|
61 | @text-code: "Lucida Console", Menlo, Monaco, monospace; | |
|
61 | 62 | @text-light: @text-regular; |
|
62 | 63 | @text-light-italic: @text-italic; |
|
63 | 64 | // Used for .close buttons |
|
64 | 65 | @text-bootstrap: "Helvetica Neue", Helvetica, Arial, sans-serif; |
|
65 | 66 | |
|
66 | 67 | @panel-title: @basefontsize; |
|
67 | 68 | @panel-footer: @basefontsize; |
|
68 | 69 | |
|
69 | 70 | // BORDERS |
|
70 | 71 | @border-thickness: 1px; |
|
71 | 72 | @border-thickness-buttons: 1px; |
|
72 | 73 | @border-thickness-tags: 1px; |
|
73 | 74 | @border-radius: 2px; |
|
74 | 75 | @border-default-color: @grey5; |
|
75 | 76 | @border-highlight-color: @grey4; |
|
76 | 77 | |
|
77 | 78 | // SPACING |
|
78 | 79 | @contentpadding: 15px; //padding on left and right of pages |
|
79 | 80 | @pagepadding: 40px; //padding on top and bottom of pages |
|
80 | 81 | @menupadding: 12px; //padding for sidebar and content |
|
81 | 82 | @sidebarpadding: 15px; //spacing between sections |
|
82 | 83 | @space: 40px; //spacing between sections |
|
83 | 84 | @padding: 15px; //padding inside modules |
|
84 | 85 | @textmargin: 20px; //spacing below headers |
|
85 | 86 | @header-padding: 20px; |
|
86 | 87 | @panel-padding: @padding; |
|
87 | 88 | @gravatar-size: 16px; // height/width of gravatar w/o border |
|
88 | 89 | |
|
89 | 90 | // ADMIN |
|
90 | 91 | @form-max-width: 750px; |
|
91 | 92 | |
|
92 | 93 | // FORMS (new) |
|
93 | 94 | @border-thickness-inputs: 1px; |
|
94 | 95 | @input-padding: @button-padding; //needs to match button padding |
|
95 | 96 | // TODO: johbo: Needed for working computation of paddings around labels etc. |
|
96 | 97 | // Expected to be replaced once we are done with the form refactoring. |
|
97 | 98 | @input-padding-px: 12px; |
|
98 | 99 | @legend-width: 220px; |
|
99 | 100 | @form-vertical-margin: 20px; |
|
100 | 101 | @form-check-width: 20px; |
|
101 | 102 | @form-radio-width: 10px; |
|
102 | 103 | @form-textcolor: @grey3; |
|
103 | 104 | |
|
104 | 105 | // FORMS |
|
105 | 106 | @label-width: 220px; |
|
106 | 107 | //TODO: lisa: Eventually we don't need both of these; remove |
|
107 | 108 | // label-width when legend-width is no longer used |
|
108 | 109 | |
|
109 | 110 | @input-border-thickness: @border-thickness; |
|
110 | 111 | @medium-inline-input-width: 115px; |
|
111 | 112 | @input-description-minwidth: 300px; |
|
112 | 113 | @label2-width: 200px; |
|
113 | 114 | @checkboxes-width: 420px; |
|
114 | 115 | @label-summary-minwidth: 80px; |
|
115 | 116 | @search-form-width: 400px; |
|
116 | 117 | @fields-input-m: 400px; |
|
117 | 118 | @fields-input-l: 800px; |
|
118 | 119 | |
|
119 | 120 | // BUTTONS |
|
120 | 121 | @button-padding: .9em; |
|
121 | 122 | |
|
122 | 123 | // DEFAULT WIDTHS |
|
123 | 124 | @wrapper-maxwidth: 1200px; |
|
124 | 125 | @sidebar-width: 145px; |
|
125 | 126 | @sidebar-all-width: @sidebar-width + 2 * @sidebarpadding; |
|
126 | 127 | @sidebar-small-width: 100px; |
|
127 | 128 | @sidebar-small-all-width: @sidebar-small-width + 2 * @sidebarpadding; |
|
128 | 129 | @texteditor-width: 660px; |
|
129 | 130 | @maincontent-maxwidth: 940px; |
|
130 | 131 | @pullrequest-width: 1025px; |
|
131 | 132 | @summary-menu-stats-width: 200px; |
|
132 | 133 | |
|
133 | 134 | // SCREEN WIDTHS |
|
134 | 135 | @screen-sm-min: 320px; |
|
135 | 136 | |
|
136 | 137 | // For Bootstrap |
|
137 | 138 | @panel-border-radius: @border-radius; |
@@ -1,352 +1,354 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | <%inherit file="/base/base.mako"/> |
|
4 | 4 | <%namespace name="diff_block" file="/changeset/diff_block.mako"/> |
|
5 | 5 | |
|
6 | 6 | <%def name="title()"> |
|
7 | 7 | ${_('%s Commit') % c.repo_name} - ${h.show_id(c.commit)} |
|
8 | 8 | %if c.rhodecode_name: |
|
9 | 9 | · ${h.branding(c.rhodecode_name)} |
|
10 | 10 | %endif |
|
11 | 11 | </%def> |
|
12 | 12 | |
|
13 | 13 | <%def name="menu_bar_nav()"> |
|
14 | 14 | ${self.menu_items(active='repositories')} |
|
15 | 15 | </%def> |
|
16 | 16 | |
|
17 | 17 | <%def name="menu_bar_subnav()"> |
|
18 | 18 | ${self.repo_menu(active='changelog')} |
|
19 | 19 | </%def> |
|
20 | 20 | |
|
21 | 21 | <%def name="main()"> |
|
22 | 22 | <script> |
|
23 | 23 | // TODO: marcink switch this to pyroutes |
|
24 | 24 | AJAX_COMMENT_DELETE_URL = "${h.route_path('repo_commit_comment_delete',repo_name=c.repo_name,commit_id=c.commit.raw_id,comment_id='__COMMENT_ID__')}"; |
|
25 | 25 | templateContext.commit_data.commit_id = "${c.commit.raw_id}"; |
|
26 | 26 | </script> |
|
27 | 27 | <div class="box"> |
|
28 | 28 | <div class="title"> |
|
29 | 29 | ${self.repo_page_title(c.rhodecode_db_repo)} |
|
30 | 30 | </div> |
|
31 | 31 | |
|
32 | 32 | <div id="changeset_compare_view_content" class="summary changeset"> |
|
33 | 33 | <div class="summary-detail"> |
|
34 | 34 | <div class="summary-detail-header"> |
|
35 |
< |
|
|
36 |
<h4> |
|
|
37 | <code> | |
|
35 | <div class="breadcrumbs files_location"> | |
|
36 | <h4> | |
|
37 | ${_('Commit')} | |
|
38 | ||
|
39 | <code> | |
|
38 | 40 | ${h.show_id(c.commit)} |
|
39 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.commit.raw_id}" title="${_('Copy the full commit id')}"></i> | |
|
40 | % if hasattr(c.commit, 'phase'): | |
|
41 | <span class="tag phase-${c.commit.phase} tooltip" title="${_('Commit phase')}">${c.commit.phase}</span> | |
|
42 | % endif | |
|
41 | </code> | |
|
42 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.commit.raw_id}" title="${_('Copy the full commit id')}"></i> | |
|
43 | % if hasattr(c.commit, 'phase'): | |
|
44 | <span class="tag phase-${c.commit.phase} tooltip" title="${_('Commit phase')}">${c.commit.phase}</span> | |
|
45 | % endif | |
|
43 | 46 | |
|
44 |
|
|
|
45 |
|
|
|
46 |
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
|
|
|
47 | ## obsolete commits | |
|
48 | % if hasattr(c.commit, 'obsolete'): | |
|
49 | % if c.commit.obsolete: | |
|
50 | <span class="tag obsolete-${c.commit.obsolete} tooltip" title="${_('Evolve State')}">${_('obsolete')}</span> | |
|
51 | % endif | |
|
52 | % endif | |
|
50 | 53 | |
|
51 |
|
|
|
52 |
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
|
|
|
56 |
|
|
|
54 | ## hidden commits | |
|
55 | % if hasattr(c.commit, 'hidden'): | |
|
56 | % if c.commit.hidden: | |
|
57 | <span class="tag hidden-${c.commit.hidden} tooltip" title="${_('Evolve State')}">${_('hidden')}</span> | |
|
58 | % endif | |
|
59 | % endif | |
|
60 | </h4> | |
|
57 | 61 | |
|
58 |
|
|
|
59 | </h4> | |
|
60 | </span> | |
|
62 | </div> | |
|
61 | 63 | <div class="pull-right"> |
|
62 | 64 | <span id="parent_link"> |
|
63 | 65 | <a href="#parentCommit" title="${_('Parent Commit')}">${_('Parent')}</a> |
|
64 | 66 | </span> |
|
65 | 67 | | |
|
66 | 68 | <span id="child_link"> |
|
67 | 69 | <a href="#childCommit" title="${_('Child Commit')}">${_('Child')}</a> |
|
68 | 70 | </span> |
|
69 | 71 | </div> |
|
70 | 72 | </div> |
|
71 | 73 | |
|
72 | 74 | <div class="fieldset"> |
|
73 | 75 | <div class="left-label"> |
|
74 | 76 | ${_('Description')}: |
|
75 | 77 | </div> |
|
76 | 78 | <div class="right-content"> |
|
77 | 79 | <div id="trimmed_message_box" class="commit">${h.urlify_commit_message(c.commit.message,c.repo_name)}</div> |
|
78 | 80 | <div id="message_expand" style="display:none;"> |
|
79 | 81 | ${_('Expand')} |
|
80 | 82 | </div> |
|
81 | 83 | </div> |
|
82 | 84 | </div> |
|
83 | 85 | |
|
84 | 86 | %if c.statuses: |
|
85 | 87 | <div class="fieldset"> |
|
86 | 88 | <div class="left-label"> |
|
87 | 89 | ${_('Commit status')}: |
|
88 | 90 | </div> |
|
89 | 91 | <div class="right-content"> |
|
90 | 92 | <div class="changeset-status-ico"> |
|
91 | 93 | <div class="${'flag_status %s' % c.statuses[0]} pull-left"></div> |
|
92 | 94 | </div> |
|
93 | 95 | <div title="${_('Commit status')}" class="changeset-status-lbl">[${h.commit_status_lbl(c.statuses[0])}]</div> |
|
94 | 96 | </div> |
|
95 | 97 | </div> |
|
96 | 98 | %endif |
|
97 | 99 | |
|
98 | 100 | <div class="fieldset"> |
|
99 | 101 | <div class="left-label"> |
|
100 | 102 | ${_('References')}: |
|
101 | 103 | </div> |
|
102 | 104 | <div class="right-content"> |
|
103 | 105 | <div class="tags"> |
|
104 | 106 | |
|
105 | 107 | %if c.commit.merge: |
|
106 | 108 | <span class="mergetag tag"> |
|
107 | 109 | <i class="icon-merge"></i>${_('merge')} |
|
108 | 110 | </span> |
|
109 | 111 | %endif |
|
110 | 112 | |
|
111 | 113 | %if h.is_hg(c.rhodecode_repo): |
|
112 | 114 | %for book in c.commit.bookmarks: |
|
113 | 115 | <span class="booktag tag" title="${h.tooltip(_('Bookmark %s') % book)}"> |
|
114 | 116 | <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=c.commit.raw_id,_query=dict(at=book))}"><i class="icon-bookmark"></i>${h.shorter(book)}</a> |
|
115 | 117 | </span> |
|
116 | 118 | %endfor |
|
117 | 119 | %endif |
|
118 | 120 | |
|
119 | 121 | %for tag in c.commit.tags: |
|
120 | 122 | <span class="tagtag tag" title="${h.tooltip(_('Tag %s') % tag)}"> |
|
121 | 123 | <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=c.commit.raw_id,_query=dict(at=tag))}"><i class="icon-tag"></i>${tag}</a> |
|
122 | 124 | </span> |
|
123 | 125 | %endfor |
|
124 | 126 | |
|
125 | 127 | %if c.commit.branch: |
|
126 | 128 | <span class="branchtag tag" title="${h.tooltip(_('Branch %s') % c.commit.branch)}"> |
|
127 | 129 | <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=c.commit.raw_id,_query=dict(at=c.commit.branch))}"><i class="icon-code-fork"></i>${h.shorter(c.commit.branch)}</a> |
|
128 | 130 | </span> |
|
129 | 131 | %endif |
|
130 | 132 | </div> |
|
131 | 133 | </div> |
|
132 | 134 | </div> |
|
133 | 135 | |
|
134 | 136 | <div class="fieldset"> |
|
135 | 137 | <div class="left-label"> |
|
136 | 138 | ${_('Diff options')}: |
|
137 | 139 | </div> |
|
138 | 140 | <div class="right-content"> |
|
139 | 141 | <div class="diff-actions"> |
|
140 | 142 | <a href="${h.route_path('repo_commit_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id)}" class="tooltip" title="${h.tooltip(_('Raw diff'))}"> |
|
141 | 143 | ${_('Raw Diff')} |
|
142 | 144 | </a> |
|
143 | 145 | | |
|
144 | 146 | <a href="${h.route_path('repo_commit_patch',repo_name=c.repo_name,commit_id=c.commit.raw_id)}" class="tooltip" title="${h.tooltip(_('Patch diff'))}"> |
|
145 | 147 | ${_('Patch Diff')} |
|
146 | 148 | </a> |
|
147 | 149 | | |
|
148 | 150 | <a href="${h.route_path('repo_commit_download',repo_name=c.repo_name,commit_id=c.commit.raw_id,_query=dict(diff='download'))}" class="tooltip" title="${h.tooltip(_('Download diff'))}"> |
|
149 | 151 | ${_('Download Diff')} |
|
150 | 152 | </a> |
|
151 | 153 | | |
|
152 | 154 | ${c.ignorews_url(request)} |
|
153 | 155 | | |
|
154 | 156 | ${c.context_url(request)} |
|
155 | 157 | </div> |
|
156 | 158 | </div> |
|
157 | 159 | </div> |
|
158 | 160 | |
|
159 | 161 | <div class="fieldset"> |
|
160 | 162 | <div class="left-label"> |
|
161 | 163 | ${_('Comments')}: |
|
162 | 164 | </div> |
|
163 | 165 | <div class="right-content"> |
|
164 | 166 | <div class="comments-number"> |
|
165 | 167 | %if c.comments: |
|
166 | 168 | <a href="#comments">${_ungettext("%d Commit comment", "%d Commit comments", len(c.comments)) % len(c.comments)}</a>, |
|
167 | 169 | %else: |
|
168 | 170 | ${_ungettext("%d Commit comment", "%d Commit comments", len(c.comments)) % len(c.comments)} |
|
169 | 171 | %endif |
|
170 | 172 | %if c.inline_cnt: |
|
171 | 173 | <a href="#" onclick="return Rhodecode.comments.nextComment();" id="inline-comments-counter">${_ungettext("%d Inline Comment", "%d Inline Comments", c.inline_cnt) % c.inline_cnt}</a> |
|
172 | 174 | %else: |
|
173 | 175 | ${_ungettext("%d Inline Comment", "%d Inline Comments", c.inline_cnt) % c.inline_cnt} |
|
174 | 176 | %endif |
|
175 | 177 | </div> |
|
176 | 178 | </div> |
|
177 | 179 | </div> |
|
178 | 180 | |
|
179 | 181 | <div class="fieldset"> |
|
180 | 182 | <div class="left-label"> |
|
181 | 183 | ${_('Unresolved TODOs')}: |
|
182 | 184 | </div> |
|
183 | 185 | <div class="right-content"> |
|
184 | 186 | <div class="comments-number"> |
|
185 | 187 | % if c.unresolved_comments: |
|
186 | 188 | % for co in c.unresolved_comments: |
|
187 | 189 | <a class="permalink" href="#comment-${co.comment_id}" onclick="Rhodecode.comments.scrollToComment($('#comment-${co.comment_id}'))"> #${co.comment_id}</a>${'' if loop.last else ','} |
|
188 | 190 | % endfor |
|
189 | 191 | % else: |
|
190 | 192 | ${_('There are no unresolved TODOs')} |
|
191 | 193 | % endif |
|
192 | 194 | </div> |
|
193 | 195 | </div> |
|
194 | 196 | </div> |
|
195 | 197 | |
|
196 | 198 | </div> <!-- end summary-detail --> |
|
197 | 199 | |
|
198 | 200 | <div id="commit-stats" class="sidebar-right"> |
|
199 | 201 | <div class="summary-detail-header"> |
|
200 | 202 | <h4 class="item"> |
|
201 | 203 | ${_('Author')} |
|
202 | 204 | </h4> |
|
203 | 205 | </div> |
|
204 | 206 | <div class="sidebar-right-content"> |
|
205 | 207 | ${self.gravatar_with_user(c.commit.author)} |
|
206 | 208 | <div class="user-inline-data">- ${h.age_component(c.commit.date)}</div> |
|
207 | 209 | </div> |
|
208 | 210 | </div><!-- end sidebar --> |
|
209 | 211 | </div> <!-- end summary --> |
|
210 | 212 | <div class="cs_files"> |
|
211 | 213 | <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/> |
|
212 | 214 | ${cbdiffs.render_diffset_menu()} |
|
213 | 215 | ${cbdiffs.render_diffset( |
|
214 | 216 | c.changes[c.commit.raw_id], commit=c.commit, use_comments=True)} |
|
215 | 217 | </div> |
|
216 | 218 | |
|
217 | 219 | ## template for inline comment form |
|
218 | 220 | <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/> |
|
219 | 221 | |
|
220 | 222 | ## render comments |
|
221 | 223 | ${comment.generate_comments(c.comments)} |
|
222 | 224 | |
|
223 | 225 | ## main comment form and it status |
|
224 | 226 | ${comment.comments(h.route_path('repo_commit_comment_create', repo_name=c.repo_name, commit_id=c.commit.raw_id), |
|
225 | 227 | h.commit_status(c.rhodecode_db_repo, c.commit.raw_id))} |
|
226 | 228 | </div> |
|
227 | 229 | |
|
228 | 230 | ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS |
|
229 | 231 | <script type="text/javascript"> |
|
230 | 232 | |
|
231 | 233 | $(document).ready(function() { |
|
232 | 234 | |
|
233 | 235 | var boxmax = parseInt($('#trimmed_message_box').css('max-height'), 10); |
|
234 | 236 | if($('#trimmed_message_box').height() === boxmax){ |
|
235 | 237 | $('#message_expand').show(); |
|
236 | 238 | } |
|
237 | 239 | |
|
238 | 240 | $('#message_expand').on('click', function(e){ |
|
239 | 241 | $('#trimmed_message_box').css('max-height', 'none'); |
|
240 | 242 | $(this).hide(); |
|
241 | 243 | }); |
|
242 | 244 | |
|
243 | 245 | $('.show-inline-comments').on('click', function(e){ |
|
244 | 246 | var boxid = $(this).attr('data-comment-id'); |
|
245 | 247 | var button = $(this); |
|
246 | 248 | |
|
247 | 249 | if(button.hasClass("comments-visible")) { |
|
248 | 250 | $('#{0} .inline-comments'.format(boxid)).each(function(index){ |
|
249 | 251 | $(this).hide(); |
|
250 | 252 | }); |
|
251 | 253 | button.removeClass("comments-visible"); |
|
252 | 254 | } else { |
|
253 | 255 | $('#{0} .inline-comments'.format(boxid)).each(function(index){ |
|
254 | 256 | $(this).show(); |
|
255 | 257 | }); |
|
256 | 258 | button.addClass("comments-visible"); |
|
257 | 259 | } |
|
258 | 260 | }); |
|
259 | 261 | |
|
260 | 262 | |
|
261 | 263 | // next links |
|
262 | 264 | $('#child_link').on('click', function(e){ |
|
263 | 265 | // fetch via ajax what is going to be the next link, if we have |
|
264 | 266 | // >1 links show them to user to choose |
|
265 | 267 | if(!$('#child_link').hasClass('disabled')){ |
|
266 | 268 | $.ajax({ |
|
267 | 269 | url: '${h.route_path('repo_commit_children',repo_name=c.repo_name, commit_id=c.commit.raw_id)}', |
|
268 | 270 | success: function(data) { |
|
269 | 271 | if(data.results.length === 0){ |
|
270 | 272 | $('#child_link').html("${_('No Child Commits')}").addClass('disabled'); |
|
271 | 273 | } |
|
272 | 274 | if(data.results.length === 1){ |
|
273 | 275 | var commit = data.results[0]; |
|
274 | 276 | window.location = pyroutes.url('repo_commit', {'repo_name': '${c.repo_name}','commit_id': commit.raw_id}); |
|
275 | 277 | } |
|
276 | 278 | else if(data.results.length === 2){ |
|
277 | 279 | $('#child_link').addClass('disabled'); |
|
278 | 280 | $('#child_link').addClass('double'); |
|
279 | 281 | var _html = ''; |
|
280 | 282 | _html +='<a title="__title__" href="__url__">__rev__</a> ' |
|
281 | 283 | .replace('__rev__','r{0}:{1}'.format(data.results[0].revision, data.results[0].raw_id.substr(0,6))) |
|
282 | 284 | .replace('__title__', data.results[0].message) |
|
283 | 285 | .replace('__url__', pyroutes.url('repo_commit', {'repo_name': '${c.repo_name}','commit_id': data.results[0].raw_id})); |
|
284 | 286 | _html +=' | '; |
|
285 | 287 | _html +='<a title="__title__" href="__url__">__rev__</a> ' |
|
286 | 288 | .replace('__rev__','r{0}:{1}'.format(data.results[1].revision, data.results[1].raw_id.substr(0,6))) |
|
287 | 289 | .replace('__title__', data.results[1].message) |
|
288 | 290 | .replace('__url__', pyroutes.url('repo_commit', {'repo_name': '${c.repo_name}','commit_id': data.results[1].raw_id})); |
|
289 | 291 | $('#child_link').html(_html); |
|
290 | 292 | } |
|
291 | 293 | } |
|
292 | 294 | }); |
|
293 | 295 | e.preventDefault(); |
|
294 | 296 | } |
|
295 | 297 | }); |
|
296 | 298 | |
|
297 | 299 | // prev links |
|
298 | 300 | $('#parent_link').on('click', function(e){ |
|
299 | 301 | // fetch via ajax what is going to be the next link, if we have |
|
300 | 302 | // >1 links show them to user to choose |
|
301 | 303 | if(!$('#parent_link').hasClass('disabled')){ |
|
302 | 304 | $.ajax({ |
|
303 | 305 | url: '${h.route_path("repo_commit_parents",repo_name=c.repo_name, commit_id=c.commit.raw_id)}', |
|
304 | 306 | success: function(data) { |
|
305 | 307 | if(data.results.length === 0){ |
|
306 | 308 | $('#parent_link').html('${_('No Parent Commits')}').addClass('disabled'); |
|
307 | 309 | } |
|
308 | 310 | if(data.results.length === 1){ |
|
309 | 311 | var commit = data.results[0]; |
|
310 | 312 | window.location = pyroutes.url('repo_commit', {'repo_name': '${c.repo_name}','commit_id': commit.raw_id}); |
|
311 | 313 | } |
|
312 | 314 | else if(data.results.length === 2){ |
|
313 | 315 | $('#parent_link').addClass('disabled'); |
|
314 | 316 | $('#parent_link').addClass('double'); |
|
315 | 317 | var _html = ''; |
|
316 | 318 | _html +='<a title="__title__" href="__url__">Parent __rev__</a>' |
|
317 | 319 | .replace('__rev__','r{0}:{1}'.format(data.results[0].revision, data.results[0].raw_id.substr(0,6))) |
|
318 | 320 | .replace('__title__', data.results[0].message) |
|
319 | 321 | .replace('__url__', pyroutes.url('repo_commit', {'repo_name': '${c.repo_name}','commit_id': data.results[0].raw_id})); |
|
320 | 322 | _html +=' | '; |
|
321 | 323 | _html +='<a title="__title__" href="__url__">Parent __rev__</a>' |
|
322 | 324 | .replace('__rev__','r{0}:{1}'.format(data.results[1].revision, data.results[1].raw_id.substr(0,6))) |
|
323 | 325 | .replace('__title__', data.results[1].message) |
|
324 | 326 | .replace('__url__', pyroutes.url('repo_commit', {'repo_name': '${c.repo_name}','commit_id': data.results[1].raw_id})); |
|
325 | 327 | $('#parent_link').html(_html); |
|
326 | 328 | } |
|
327 | 329 | } |
|
328 | 330 | }); |
|
329 | 331 | e.preventDefault(); |
|
330 | 332 | } |
|
331 | 333 | }); |
|
332 | 334 | |
|
333 | 335 | if (location.hash) { |
|
334 | 336 | var result = splitDelimitedHash(location.hash); |
|
335 | 337 | var line = $('html').find(result.loc); |
|
336 | 338 | if (line.length > 0){ |
|
337 | 339 | offsetScroll(line, 70); |
|
338 | 340 | } |
|
339 | 341 | } |
|
340 | 342 | |
|
341 | 343 | // browse tree @ revision |
|
342 | 344 | $('#files_link').on('click', function(e){ |
|
343 | 345 | window.location = '${h.route_path('repo_files:default_path',repo_name=c.repo_name, commit_id=c.commit.raw_id)}'; |
|
344 | 346 | e.preventDefault(); |
|
345 | 347 | }); |
|
346 | 348 | |
|
347 | 349 | // inject comments into their proper positions |
|
348 | 350 | var file_comments = $('.inline-comment-placeholder'); |
|
349 | 351 | }) |
|
350 | 352 | </script> |
|
351 | 353 | |
|
352 | 354 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now