##// END OF EJS Templates
diffs: small ui fixes
milka -
r4590:e8a65b0c stable
parent child Browse files
Show More
@@ -1,3239 +1,3238 b''
1 1 //Primary CSS
2 2
3 3 //--- IMPORTS ------------------//
4 4
5 5 @import 'helpers';
6 6 @import 'mixins';
7 7 @import 'rcicons';
8 8 @import 'variables';
9 9 @import 'bootstrap-variables';
10 10 @import 'form-bootstrap';
11 11 @import 'codemirror';
12 12 @import 'legacy_code_styles';
13 13 @import 'readme-box';
14 14 @import 'progress-bar';
15 15
16 16 @import 'type';
17 17 @import 'alerts';
18 18 @import 'buttons';
19 19 @import 'tags';
20 20 @import 'code-block';
21 21 @import 'examples';
22 22 @import 'login';
23 23 @import 'main-content';
24 24 @import 'select2';
25 25 @import 'comments';
26 26 @import 'panels-bootstrap';
27 27 @import 'panels';
28 28 @import 'deform';
29 29 @import 'tooltips';
30 30 @import 'sweetalert2';
31 31
32 32
33 33 //--- BASE ------------------//
34 34 .noscript-error {
35 35 top: 0;
36 36 left: 0;
37 37 width: 100%;
38 38 z-index: 101;
39 39 text-align: center;
40 40 font-size: 120%;
41 41 color: white;
42 42 background-color: @alert2;
43 43 padding: 5px 0 5px 0;
44 44 font-weight: @text-semibold-weight;
45 45 font-family: @text-semibold;
46 46 }
47 47
48 48 html {
49 49 display: table;
50 50 height: 100%;
51 51 width: 100%;
52 52 }
53 53
54 54 body {
55 55 display: table-cell;
56 56 width: 100%;
57 57 }
58 58
59 59 //--- LAYOUT ------------------//
60 60
61 61 .hidden{
62 62 display: none !important;
63 63 }
64 64
65 65 .box{
66 66 float: left;
67 67 width: 100%;
68 68 }
69 69
70 70 .browser-header {
71 71 clear: both;
72 72 }
73 73 .main {
74 74 clear: both;
75 75 padding:0 0 @pagepadding;
76 76 height: auto;
77 77
78 78 &:after { //clearfix
79 79 content:"";
80 80 clear:both;
81 81 width:100%;
82 82 display:block;
83 83 }
84 84 }
85 85
86 86 .flex-container {
87 87 display: flex;
88 88 justify-content: space-between;
89 89 }
90 90
91 91 .action-link{
92 92 margin-left: @padding;
93 93 padding-left: @padding;
94 94 border-left: @border-thickness solid @border-default-color;
95 95 }
96 96
97 97 .cursor-pointer {
98 98 cursor: pointer;
99 99 }
100 100
101 101 input + .action-link, .action-link.first{
102 102 border-left: none;
103 103 }
104 104
105 105 .link-disabled {
106 106 color: @grey4;
107 107 cursor: default;
108 108 }
109 109
110 110 .action-link.last{
111 111 margin-right: @padding;
112 112 padding-right: @padding;
113 113 }
114 114
115 115 .action-link.active,
116 116 .action-link.active a{
117 117 color: @grey4;
118 118 }
119 119
120 120 .action-link.disabled {
121 121 color: @grey4;
122 122 cursor: inherit;
123 123 }
124 124
125 125 .grey-link-action {
126 126 cursor: pointer;
127 127 &:hover {
128 128 color: @grey2;
129 129 }
130 130 color: @grey4;
131 131 }
132 132
133 133 .clipboard-action {
134 134 cursor: pointer;
135 135 margin-left: 5px;
136 136
137 137 &:not(.no-grey) {
138 138
139 139 &:hover {
140 140 color: @grey2;
141 141 }
142 142 color: @grey4;
143 143 }
144 144 }
145 145
146 146 ul.simple-list{
147 147 list-style: none;
148 148 margin: 0;
149 149 padding: 0;
150 150 }
151 151
152 152 .main-content {
153 153 padding-bottom: @pagepadding;
154 154 }
155 155
156 156 .wide-mode-wrapper {
157 157 max-width:4000px !important;
158 158 }
159 159
160 160 .wrapper {
161 161 position: relative;
162 162 max-width: @wrapper-maxwidth;
163 163 margin: 0 auto;
164 164 }
165 165
166 166 #content {
167 167 clear: both;
168 168 padding: 0 @contentpadding;
169 169 }
170 170
171 171 .advanced-settings-fields{
172 172 input{
173 173 margin-left: @textmargin;
174 174 margin-right: @padding/2;
175 175 }
176 176 }
177 177
178 178 .cs_files_title {
179 179 margin: @pagepadding 0 0;
180 180 }
181 181
182 182 input.inline[type="file"] {
183 183 display: inline;
184 184 }
185 185
186 186 .error_page {
187 187 margin: 10% auto;
188 188
189 189 h1 {
190 190 color: @grey2;
191 191 }
192 192
193 193 .alert {
194 194 margin: @padding 0;
195 195 }
196 196
197 197 .error-branding {
198 198 color: @grey4;
199 199 font-weight: @text-semibold-weight;
200 200 font-family: @text-semibold;
201 201 }
202 202
203 203 .error_message {
204 204 font-family: @text-regular;
205 205 }
206 206
207 207 .sidebar {
208 208 min-height: 275px;
209 209 margin: 0;
210 210 padding: 0 0 @sidebarpadding @sidebarpadding;
211 211 border: none;
212 212 }
213 213
214 214 .main-content {
215 215 position: relative;
216 216 margin: 0 @sidebarpadding @sidebarpadding;
217 217 padding: 0 0 0 @sidebarpadding;
218 218 border-left: @border-thickness solid @grey5;
219 219
220 220 @media (max-width:767px) {
221 221 clear: both;
222 222 width: 100%;
223 223 margin: 0;
224 224 border: none;
225 225 }
226 226 }
227 227
228 228 .inner-column {
229 229 float: left;
230 230 width: 29.75%;
231 231 min-height: 150px;
232 232 margin: @sidebarpadding 2% 0 0;
233 233 padding: 0 2% 0 0;
234 234 border-right: @border-thickness solid @grey5;
235 235
236 236 @media (max-width:767px) {
237 237 clear: both;
238 238 width: 100%;
239 239 border: none;
240 240 }
241 241
242 242 ul {
243 243 padding-left: 1.25em;
244 244 }
245 245
246 246 &:last-child {
247 247 margin: @sidebarpadding 0 0;
248 248 border: none;
249 249 }
250 250
251 251 h4 {
252 252 margin: 0 0 @padding;
253 253 font-weight: @text-semibold-weight;
254 254 font-family: @text-semibold;
255 255 }
256 256 }
257 257 }
258 258 .error-page-logo {
259 259 width: 130px;
260 260 height: 160px;
261 261 }
262 262
263 263 // HEADER
264 264 .header {
265 265
266 266 min-height: 49px;
267 267 min-width: 1024px;
268 268
269 269 position: relative;
270 270 vertical-align: bottom;
271 271 padding: 0 @header-padding;
272 272 background-color: @grey1;
273 273 color: @grey5;
274 274
275 275 .title {
276 276 overflow: visible;
277 277 }
278 278
279 279 &:before,
280 280 &:after {
281 281 content: "";
282 282 clear: both;
283 283 width: 100%;
284 284 }
285 285
286 286 // TODO: johbo: Avoids breaking "Repositories" chooser
287 287 .select2-container .select2-choice .select2-arrow {
288 288 display: none;
289 289 }
290 290 }
291 291
292 292 #header-inner {
293 293 &.title {
294 294 margin: 0;
295 295 }
296 296 &:before,
297 297 &:after {
298 298 content: "";
299 299 clear: both;
300 300 }
301 301 }
302 302
303 303 // Gists
304 304 #files_data {
305 305 clear: both; //for firefox
306 306 padding-top: 10px;
307 307 }
308 308
309 309 #gistid {
310 310 margin-right: @padding;
311 311 }
312 312
313 313 // Global Settings Editor
314 314 .textarea.editor {
315 315 float: left;
316 316 position: relative;
317 317 max-width: @texteditor-width;
318 318
319 319 select {
320 320 position: absolute;
321 321 top:10px;
322 322 right:0;
323 323 }
324 324
325 325 .CodeMirror {
326 326 margin: 0;
327 327 }
328 328
329 329 .help-block {
330 330 margin: 0 0 @padding;
331 331 padding:.5em;
332 332 background-color: @grey6;
333 333 &.pre-formatting {
334 334 white-space: pre;
335 335 }
336 336 }
337 337 }
338 338
339 339 ul.auth_plugins {
340 340 margin: @padding 0 @padding @legend-width;
341 341 padding: 0;
342 342
343 343 li {
344 344 margin-bottom: @padding;
345 345 line-height: 1em;
346 346 list-style-type: none;
347 347
348 348 .auth_buttons .btn {
349 349 margin-right: @padding;
350 350 }
351 351
352 352 }
353 353 }
354 354
355 355
356 356 // My Account PR list
357 357
358 358 #show_closed {
359 359 margin: 0 1em 0 0;
360 360 }
361 361
362 362 #pull_request_list_table {
363 363 .closed {
364 364 background-color: @grey6;
365 365 }
366 366
367 367 .state-creating,
368 368 .state-updating,
369 369 .state-merging
370 370 {
371 371 background-color: @grey6;
372 372 }
373 373
374 374 .log-container .truncate {
375 375 height: 2.75em;
376 376 white-space: pre-line;
377 377 }
378 378 table.rctable .user {
379 379 padding-left: 0;
380 380 }
381 381 .td-status {
382 382 padding: 0 0px 0px 10px;
383 383 width: 15px;
384 384 }
385 385 table.rctable {
386 386 td.td-description,
387 387 .rc-user {
388 388 min-width: auto;
389 389 }
390 390 }
391 391 }
392 392
393 393 // Pull Requests
394 394
395 395 .pullrequests_section_head {
396 396 display: block;
397 397 clear: both;
398 398 margin: @padding 0;
399 399 font-weight: @text-bold-weight;
400 400 font-family: @text-bold;
401 401 }
402 402
403 403 .pr-commit-flow {
404 404 position: relative;
405 405 font-weight: 600;
406 406
407 407 .tag {
408 408 display: inline-block;
409 409 margin: 0 1em .5em 0;
410 410 }
411 411
412 412 .clone-url {
413 413 display: inline-block;
414 414 margin: 0 0 .5em 0;
415 415 padding: 0;
416 416 line-height: 1.2em;
417 417 }
418 418 }
419 419
420 420 .pr-mergeinfo {
421 421 min-width: 95% !important;
422 422 padding: 0 !important;
423 423 border: 0;
424 424 }
425 425 .pr-mergeinfo-copy {
426 426 padding: 0 0;
427 427 }
428 428
429 429 .pr-pullinfo {
430 430 min-width: 95% !important;
431 431 padding: 0 !important;
432 432 border: 0;
433 433 }
434 434 .pr-pullinfo-copy {
435 435 padding: 0 0;
436 436 }
437 437
438 438 .pr-title-input {
439 439 width: 100%;
440 440 font-size: 18px;
441 441 margin: 0 0 4px 0;
442 442 padding: 0;
443 443 line-height: 1.7em;
444 444 color: @text-color;
445 445 letter-spacing: .02em;
446 446 font-weight: @text-bold-weight;
447 447 font-family: @text-bold;
448 448
449 449 &:hover {
450 450 box-shadow: none;
451 451 }
452 452 }
453 453
454 454 #pr-title {
455 455 input {
456 456 border: 1px transparent;
457 457 color: black;
458 458 opacity: 1;
459 459 background: #fff;
460 460 font-size: 18px;
461 461 }
462 462 }
463 463
464 464 .pr-title-closed-tag {
465 465 font-size: 16px;
466 466 }
467 467
468 468 #pr-desc {
469 469 padding: 10px 0;
470 470
471 471 .markdown-block {
472 472 padding: 0;
473 473 margin-bottom: -30px;
474 474 }
475 475 }
476 476
477 477 #pullrequest_title {
478 478 width: 100%;
479 479 box-sizing: border-box;
480 480 }
481 481
482 482 #pr_open_message {
483 483 border: @border-thickness solid #fff;
484 484 border-radius: @border-radius;
485 485 text-align: left;
486 486 overflow: hidden;
487 487 white-space: pre-line;
488 488 padding-top: 5px
489 489 }
490 490
491 491 #add_reviewer {
492 492 padding-top: 10px;
493 493 }
494 494
495 495 #add_reviewer_input,
496 496 #add_observer_input {
497 497 padding-top: 10px
498 498 }
499 499
500 500 .pr-details-title-author-pref {
501 501 padding-right: 10px
502 502 }
503 503
504 504 .label-pr-detail {
505 505 display: table-cell;
506 506 width: 120px;
507 507 padding-top: 7.5px;
508 508 padding-bottom: 7.5px;
509 509 padding-right: 7.5px;
510 510 }
511 511
512 512 .source-details ul {
513 513 padding: 10px 16px;
514 514 }
515 515
516 516 .source-details-action {
517 517 color: @grey4;
518 518 font-size: 11px
519 519 }
520 520
521 521 .pr-submit-button {
522 522 float: right;
523 523 margin: 0 0 0 5px;
524 524 }
525 525
526 526 .pr-spacing-container {
527 527 padding: 20px;
528 528 clear: both
529 529 }
530 530
531 531 #pr-description-input {
532 532 margin-bottom: 0;
533 533 }
534 534
535 535 .pr-description-label {
536 536 vertical-align: top;
537 537 }
538 538
539 539 #open_edit_pullrequest {
540 540 padding: 0;
541 541 }
542 542
543 543 #close_edit_pullrequest {
544 544
545 545 }
546 546
547 547 #delete_pullrequest {
548 548 clear: inherit;
549 549
550 550 form {
551 551 display: inline;
552 552 }
553 553
554 554 }
555 555
556 556 .perms_section_head {
557 557 min-width: 625px;
558 558
559 559 h2 {
560 560 margin-bottom: 0;
561 561 }
562 562
563 563 .label-checkbox {
564 564 float: left;
565 565 }
566 566
567 567 &.field {
568 568 margin: @space 0 @padding;
569 569 }
570 570
571 571 &:first-child.field {
572 572 margin-top: 0;
573 573
574 574 .label {
575 575 margin-top: 0;
576 576 padding-top: 0;
577 577 }
578 578
579 579 .radios {
580 580 padding-top: 0;
581 581 }
582 582 }
583 583
584 584 .radios {
585 585 position: relative;
586 586 width: 505px;
587 587 }
588 588 }
589 589
590 590 //--- MODULES ------------------//
591 591
592 592
593 593 // Server Announcement
594 594 #server-announcement {
595 595 width: 95%;
596 596 margin: @padding auto;
597 597 padding: @padding;
598 598 border-width: 2px;
599 599 border-style: solid;
600 600 .border-radius(2px);
601 601 font-weight: @text-bold-weight;
602 602 font-family: @text-bold;
603 603
604 604 &.info { border-color: @alert4; background-color: @alert4-inner; }
605 605 &.warning { border-color: @alert3; background-color: @alert3-inner; }
606 606 &.error { border-color: @alert2; background-color: @alert2-inner; }
607 607 &.success { border-color: @alert1; background-color: @alert1-inner; }
608 608 &.neutral { border-color: @grey3; background-color: @grey6; }
609 609 }
610 610
611 611 // Fixed Sidebar Column
612 612 .sidebar-col-wrapper {
613 613 padding-left: @sidebar-all-width;
614 614
615 615 .sidebar {
616 616 width: @sidebar-width;
617 617 margin-left: -@sidebar-all-width;
618 618 }
619 619 }
620 620
621 621 .sidebar-col-wrapper.scw-small {
622 622 padding-left: @sidebar-small-all-width;
623 623
624 624 .sidebar {
625 625 width: @sidebar-small-width;
626 626 margin-left: -@sidebar-small-all-width;
627 627 }
628 628 }
629 629
630 630
631 631 // FOOTER
632 632 #footer {
633 633 padding: 0;
634 634 text-align: center;
635 635 vertical-align: middle;
636 636 color: @grey2;
637 637 font-size: 11px;
638 638
639 639 p {
640 640 margin: 0;
641 641 padding: 1em;
642 642 line-height: 1em;
643 643 }
644 644
645 645 .server-instance { //server instance
646 646 display: none;
647 647 }
648 648
649 649 .title {
650 650 float: none;
651 651 margin: 0 auto;
652 652 }
653 653 }
654 654
655 655 button.close {
656 656 padding: 0;
657 657 cursor: pointer;
658 658 background: transparent;
659 659 border: 0;
660 660 .box-shadow(none);
661 661 -webkit-appearance: none;
662 662 }
663 663
664 664 .close {
665 665 float: right;
666 666 font-size: 21px;
667 667 font-family: @text-bootstrap;
668 668 line-height: 1em;
669 669 font-weight: bold;
670 670 color: @grey2;
671 671
672 672 &:hover,
673 673 &:focus {
674 674 color: @grey1;
675 675 text-decoration: none;
676 676 cursor: pointer;
677 677 }
678 678 }
679 679
680 680 // GRID
681 681 .sorting,
682 682 .sorting_desc,
683 683 .sorting_asc {
684 684 cursor: pointer;
685 685 }
686 686 .sorting_desc:after {
687 687 content: "\00A0\25B2";
688 688 font-size: .75em;
689 689 }
690 690 .sorting_asc:after {
691 691 content: "\00A0\25BC";
692 692 font-size: .68em;
693 693 }
694 694
695 695
696 696 .user_auth_tokens {
697 697
698 698 &.truncate {
699 699 white-space: nowrap;
700 700 overflow: hidden;
701 701 text-overflow: ellipsis;
702 702 }
703 703
704 704 .fields .field .input {
705 705 margin: 0;
706 706 }
707 707
708 708 input#description {
709 709 width: 100px;
710 710 margin: 0;
711 711 }
712 712
713 713 .drop-menu {
714 714 // TODO: johbo: Remove this, should work out of the box when
715 715 // having multiple inputs inline
716 716 margin: 0 0 0 5px;
717 717 }
718 718 }
719 719 #user_list_table {
720 720 .closed {
721 721 background-color: @grey6;
722 722 }
723 723 }
724 724
725 725
726 726 input, textarea {
727 727 &.disabled {
728 728 opacity: .5;
729 729 }
730 730
731 731 &:hover {
732 732 border-color: @grey3;
733 733 box-shadow: @button-shadow;
734 734 }
735 735
736 736 &:focus {
737 737 border-color: @rcblue;
738 738 box-shadow: @button-shadow;
739 739 }
740 740 }
741 741
742 742 // remove extra padding in firefox
743 743 input::-moz-focus-inner { border:0; padding:0 }
744 744
745 745 .adjacent input {
746 746 margin-bottom: @padding;
747 747 }
748 748
749 749 .permissions_boxes {
750 750 display: block;
751 751 }
752 752
753 753 //FORMS
754 754
755 755 .medium-inline,
756 756 input#description.medium-inline {
757 757 display: inline;
758 758 width: @medium-inline-input-width;
759 759 min-width: 100px;
760 760 }
761 761
762 762 select {
763 763 //reset
764 764 -webkit-appearance: none;
765 765 -moz-appearance: none;
766 766
767 767 display: inline-block;
768 768 height: 28px;
769 769 width: auto;
770 770 margin: 0 @padding @padding 0;
771 771 padding: 0 18px 0 8px;
772 772 line-height:1em;
773 773 font-size: @basefontsize;
774 774 border: @border-thickness solid @grey5;
775 775 border-radius: @border-radius;
776 776 background:white url("../images/dt-arrow-dn.png") no-repeat 100% 50%;
777 777 color: @grey4;
778 778 box-shadow: @button-shadow;
779 779
780 780 &:after {
781 781 content: "\00A0\25BE";
782 782 }
783 783
784 784 &:focus, &:hover {
785 785 outline: none;
786 786 border-color: @grey4;
787 787 color: @rcdarkblue;
788 788 }
789 789 }
790 790
791 791 option {
792 792 &:focus {
793 793 outline: none;
794 794 }
795 795 }
796 796
797 797 input,
798 798 textarea {
799 799 padding: @input-padding;
800 800 border: @input-border-thickness solid @border-highlight-color;
801 801 .border-radius (@border-radius);
802 802 font-family: @text-light;
803 803 font-size: @basefontsize;
804 804
805 805 &.input-sm {
806 806 padding: 5px;
807 807 }
808 808
809 809 &#description {
810 810 min-width: @input-description-minwidth;
811 811 min-height: 1em;
812 812 padding: 10px;
813 813 }
814 814 }
815 815
816 816 .field-sm {
817 817 input,
818 818 textarea {
819 819 padding: 5px;
820 820 }
821 821 }
822 822
823 823 textarea {
824 824 display: block;
825 825 clear: both;
826 826 width: 100%;
827 827 min-height: 100px;
828 828 margin-bottom: @padding;
829 829 .box-sizing(border-box);
830 830 overflow: auto;
831 831 }
832 832
833 833 label {
834 834 font-family: @text-light;
835 835 }
836 836
837 837 // GRAVATARS
838 838 // centers gravatar on username to the right
839 839
840 840 .gravatar {
841 841 display: inline;
842 842 min-width: 16px;
843 843 min-height: 16px;
844 844 margin: -5px 0;
845 845 padding: 0;
846 846 line-height: 1em;
847 847 box-sizing: content-box;
848 848 border-radius: 50%;
849 849
850 850 &.gravatar-large {
851 851 margin: -0.5em .25em -0.5em 0;
852 852 }
853 853
854 854 & + .user {
855 855 display: inline;
856 856 margin: 0;
857 857 padding: 0 0 0 .17em;
858 858 line-height: 1em;
859 859 }
860 860
861 861 & + .no-margin {
862 862 margin: 0
863 863 }
864 864
865 865 }
866 866
867 867 .user-inline-data {
868 868 display: inline-block;
869 869 float: left;
870 870 padding-left: .5em;
871 871 line-height: 1.3em;
872 872 }
873 873
874 874 .rc-user { // gravatar + user wrapper
875 875 float: left;
876 876 position: relative;
877 877 min-width: 100px;
878 878 max-width: 200px;
879 879 min-height: (@gravatar-size + @border-thickness * 2); // account for border
880 880 display: block;
881 881 padding: 0 0 0 (@gravatar-size + @basefontsize/4);
882 882
883 883
884 884 .gravatar {
885 885 display: block;
886 886 position: absolute;
887 887 top: 0;
888 888 left: 0;
889 889 min-width: @gravatar-size;
890 890 min-height: @gravatar-size;
891 891 margin: 0;
892 892 }
893 893
894 894 .user {
895 895 display: block;
896 896 max-width: 175px;
897 897 padding-top: 2px;
898 898 overflow: hidden;
899 899 text-overflow: ellipsis;
900 900 }
901 901 }
902 902
903 903 .gist-gravatar,
904 904 .journal_container {
905 905 .gravatar-large {
906 906 margin: 0 .5em -10px 0;
907 907 }
908 908 }
909 909
910 910 .gist-type-fields {
911 911 line-height: 30px;
912 912 height: 30px;
913 913
914 914 .gist-type-fields-wrapper {
915 915 vertical-align: middle;
916 916 display: inline-block;
917 917 line-height: 25px;
918 918 }
919 919 }
920 920
921 921 // ADMIN SETTINGS
922 922
923 923 // Tag Patterns
924 924 .tag_patterns {
925 925 .tag_input {
926 926 margin-bottom: @padding;
927 927 }
928 928 }
929 929
930 930 .locked_input {
931 931 position: relative;
932 932
933 933 input {
934 934 display: inline;
935 935 margin: 3px 5px 0px 0px;
936 936 }
937 937
938 938 br {
939 939 display: none;
940 940 }
941 941
942 942 .error-message {
943 943 float: left;
944 944 width: 100%;
945 945 }
946 946
947 947 .lock_input_button {
948 948 display: inline;
949 949 }
950 950
951 951 .help-block {
952 952 clear: both;
953 953 }
954 954 }
955 955
956 956 // Notifications
957 957
958 958 .notifications_buttons {
959 959 margin: 0 0 @space 0;
960 960 padding: 0;
961 961
962 962 .btn {
963 963 display: inline-block;
964 964 }
965 965 }
966 966
967 967 .notification-list {
968 968
969 969 div {
970 970 vertical-align: middle;
971 971 }
972 972
973 973 .container {
974 974 display: block;
975 975 margin: 0 0 @padding 0;
976 976 }
977 977
978 978 .delete-notifications {
979 979 margin-left: @padding;
980 980 text-align: right;
981 981 cursor: pointer;
982 982 }
983 983
984 984 .read-notifications {
985 985 margin-left: @padding/2;
986 986 text-align: right;
987 987 width: 35px;
988 988 cursor: pointer;
989 989 }
990 990
991 991 .icon-minus-sign {
992 992 color: @alert2;
993 993 }
994 994
995 995 .icon-ok-sign {
996 996 color: @alert1;
997 997 }
998 998 }
999 999
1000 1000 .user_settings {
1001 1001 float: left;
1002 1002 clear: both;
1003 1003 display: block;
1004 1004 width: 100%;
1005 1005
1006 1006 .gravatar_box {
1007 1007 margin-bottom: @padding;
1008 1008
1009 1009 &:after {
1010 1010 content: " ";
1011 1011 clear: both;
1012 1012 width: 100%;
1013 1013 }
1014 1014 }
1015 1015
1016 1016 .fields .field {
1017 1017 clear: both;
1018 1018 }
1019 1019 }
1020 1020
1021 1021 .advanced_settings {
1022 1022 margin-bottom: @space;
1023 1023
1024 1024 .help-block {
1025 1025 margin-left: 0;
1026 1026 }
1027 1027
1028 1028 button + .help-block {
1029 1029 margin-top: @padding;
1030 1030 }
1031 1031 }
1032 1032
1033 1033 // admin settings radio buttons and labels
1034 1034 .label-2 {
1035 1035 float: left;
1036 1036 width: @label2-width;
1037 1037
1038 1038 label {
1039 1039 color: @grey1;
1040 1040 }
1041 1041 }
1042 1042 .checkboxes {
1043 1043 float: left;
1044 1044 width: @checkboxes-width;
1045 1045 margin-bottom: @padding;
1046 1046
1047 1047 .checkbox {
1048 1048 width: 100%;
1049 1049
1050 1050 label {
1051 1051 margin: 0;
1052 1052 padding: 0;
1053 1053 }
1054 1054 }
1055 1055
1056 1056 .checkbox + .checkbox {
1057 1057 display: inline-block;
1058 1058 }
1059 1059
1060 1060 label {
1061 1061 margin-right: 1em;
1062 1062 }
1063 1063 }
1064 1064
1065 1065 // CHANGELOG
1066 1066 .container_header {
1067 1067 float: left;
1068 1068 display: block;
1069 1069 width: 100%;
1070 1070 margin: @padding 0 @padding;
1071 1071
1072 1072 #filter_changelog {
1073 1073 float: left;
1074 1074 margin-right: @padding;
1075 1075 }
1076 1076
1077 1077 .breadcrumbs_light {
1078 1078 display: inline-block;
1079 1079 }
1080 1080 }
1081 1081
1082 1082 .info_box {
1083 1083 float: right;
1084 1084 }
1085 1085
1086 1086
1087 1087
1088 1088 #graph_content{
1089 1089
1090 1090 // adjust for table headers so that graph renders properly
1091 1091 // #graph_nodes padding - table cell padding
1092 1092 padding-top: (@space - (@basefontsize * 2.4));
1093 1093
1094 1094 &.graph_full_width {
1095 1095 width: 100%;
1096 1096 max-width: 100%;
1097 1097 }
1098 1098 }
1099 1099
1100 1100 #graph {
1101 1101
1102 1102 .pagination-left {
1103 1103 float: left;
1104 1104 clear: both;
1105 1105 }
1106 1106
1107 1107 .log-container {
1108 1108 max-width: 345px;
1109 1109
1110 1110 .message{
1111 1111 max-width: 340px;
1112 1112 }
1113 1113 }
1114 1114
1115 1115 .graph-col-wrapper {
1116 1116
1117 1117 #graph_nodes {
1118 1118 width: 100px;
1119 1119 position: absolute;
1120 1120 left: 70px;
1121 1121 z-index: -1;
1122 1122 }
1123 1123 }
1124 1124
1125 1125 .load-more-commits {
1126 1126 text-align: center;
1127 1127 }
1128 1128 .load-more-commits:hover {
1129 1129 background-color: @grey7;
1130 1130 }
1131 1131 .load-more-commits {
1132 1132 a {
1133 1133 display: block;
1134 1134 }
1135 1135 }
1136 1136 }
1137 1137
1138 1138 .obsolete-toggle {
1139 1139 line-height: 30px;
1140 1140 margin-left: -15px;
1141 1141 }
1142 1142
1143 1143 #rev_range_action {
1144 1144 margin-bottom: -8px;
1145 1145 }
1146 1146
1147 1147 #filter_changelog {
1148 1148 float: left;
1149 1149 }
1150 1150
1151 1151
1152 1152 //--- THEME ------------------//
1153 1153
1154 1154 #logo {
1155 1155 float: left;
1156 1156 margin: 9px 0 0 0;
1157 1157
1158 1158 .header {
1159 1159 background-color: transparent;
1160 1160 }
1161 1161
1162 1162 a {
1163 1163 display: inline-block;
1164 1164 }
1165 1165
1166 1166 img {
1167 1167 height:30px;
1168 1168 }
1169 1169 }
1170 1170
1171 1171 .logo-wrapper {
1172 1172 float:left;
1173 1173 }
1174 1174
1175 1175 .branding {
1176 1176 float: left;
1177 1177 padding: 9px 2px;
1178 1178 line-height: 1em;
1179 1179 font-size: @navigation-fontsize;
1180 1180
1181 1181 a {
1182 1182 color: @grey5
1183 1183 }
1184 1184
1185 1185 // 1024px or smaller
1186 1186 @media screen and (max-width: 1180px) {
1187 1187 display: none;
1188 1188 }
1189 1189
1190 1190 }
1191 1191
1192 1192 img {
1193 1193 border: none;
1194 1194 outline: none;
1195 1195 }
1196 1196 user-profile-header
1197 1197 label {
1198 1198
1199 1199 input[type="checkbox"] {
1200 1200 margin-right: 1em;
1201 1201 }
1202 1202 input[type="radio"] {
1203 1203 margin-right: 1em;
1204 1204 }
1205 1205 }
1206 1206
1207 1207 .review-status {
1208 1208 &.under_review {
1209 1209 color: @alert3;
1210 1210 }
1211 1211 &.approved {
1212 1212 color: @alert1;
1213 1213 }
1214 1214 &.rejected,
1215 1215 &.forced_closed{
1216 1216 color: @alert2;
1217 1217 }
1218 1218 &.not_reviewed {
1219 1219 color: @grey5;
1220 1220 }
1221 1221 }
1222 1222
1223 1223 .review-status-under_review {
1224 1224 color: @alert3;
1225 1225 }
1226 1226 .status-tag-under_review {
1227 1227 border-color: @alert3;
1228 1228 }
1229 1229
1230 1230 .review-status-approved {
1231 1231 color: @alert1;
1232 1232 }
1233 1233 .status-tag-approved {
1234 1234 border-color: @alert1;
1235 1235 }
1236 1236
1237 1237 .review-status-rejected,
1238 1238 .review-status-forced_closed {
1239 1239 color: @alert2;
1240 1240 }
1241 1241 .status-tag-rejected,
1242 1242 .status-tag-forced_closed {
1243 1243 border-color: @alert2;
1244 1244 }
1245 1245
1246 1246 .review-status-not_reviewed {
1247 1247 color: @grey5;
1248 1248 }
1249 1249 .status-tag-not_reviewed {
1250 1250 border-color: @grey5;
1251 1251 }
1252 1252
1253 1253 .test_pattern_preview {
1254 1254 margin: @space 0;
1255 1255
1256 1256 p {
1257 1257 margin-bottom: 0;
1258 1258 border-bottom: @border-thickness solid @border-default-color;
1259 1259 color: @grey3;
1260 1260 }
1261 1261
1262 1262 .btn {
1263 1263 margin-bottom: @padding;
1264 1264 }
1265 1265 }
1266 1266 #test_pattern_result {
1267 1267 display: none;
1268 1268 &:extend(pre);
1269 1269 padding: .9em;
1270 1270 color: @grey3;
1271 1271 background-color: @grey7;
1272 1272 border-right: @border-thickness solid @border-default-color;
1273 1273 border-bottom: @border-thickness solid @border-default-color;
1274 1274 border-left: @border-thickness solid @border-default-color;
1275 1275 }
1276 1276
1277 1277 #repo_vcs_settings {
1278 1278 #inherit_overlay_vcs_default {
1279 1279 display: none;
1280 1280 }
1281 1281 #inherit_overlay_vcs_custom {
1282 1282 display: custom;
1283 1283 }
1284 1284 &.inherited {
1285 1285 #inherit_overlay_vcs_default {
1286 1286 display: block;
1287 1287 }
1288 1288 #inherit_overlay_vcs_custom {
1289 1289 display: none;
1290 1290 }
1291 1291 }
1292 1292 }
1293 1293
1294 1294 .issue-tracker-link {
1295 1295 color: @rcblue;
1296 1296 }
1297 1297
1298 1298 // Issue Tracker Table Show/Hide
1299 1299 #repo_issue_tracker {
1300 1300 #inherit_overlay {
1301 1301 display: none;
1302 1302 }
1303 1303 #custom_overlay {
1304 1304 display: custom;
1305 1305 }
1306 1306 &.inherited {
1307 1307 #inherit_overlay {
1308 1308 display: block;
1309 1309 }
1310 1310 #custom_overlay {
1311 1311 display: none;
1312 1312 }
1313 1313 }
1314 1314 }
1315 1315 table.issuetracker {
1316 1316 &.readonly {
1317 1317 tr, td {
1318 1318 color: @grey3;
1319 1319 }
1320 1320 }
1321 1321 .edit {
1322 1322 display: none;
1323 1323 }
1324 1324 .editopen {
1325 1325 .edit {
1326 1326 display: inline;
1327 1327 }
1328 1328 .entry {
1329 1329 display: none;
1330 1330 }
1331 1331 }
1332 1332 tr td.td-action {
1333 1333 min-width: 117px;
1334 1334 }
1335 1335 td input {
1336 1336 max-width: none;
1337 1337 min-width: 30px;
1338 1338 width: 80%;
1339 1339 }
1340 1340 .issuetracker_pref input {
1341 1341 width: 40%;
1342 1342 }
1343 1343 input.edit_issuetracker_update {
1344 1344 margin-right: 0;
1345 1345 width: auto;
1346 1346 }
1347 1347 }
1348 1348
1349 1349 table.integrations {
1350 1350 .td-icon {
1351 1351 width: 20px;
1352 1352 .integration-icon {
1353 1353 height: 20px;
1354 1354 width: 20px;
1355 1355 }
1356 1356 }
1357 1357 }
1358 1358
1359 1359 .integrations {
1360 1360 a.integration-box {
1361 1361 color: @text-color;
1362 1362 &:hover {
1363 1363 .panel {
1364 1364 background: #fbfbfb;
1365 1365 }
1366 1366 }
1367 1367 .integration-icon {
1368 1368 width: 30px;
1369 1369 height: 30px;
1370 1370 margin-right: 20px;
1371 1371 float: left;
1372 1372 }
1373 1373
1374 1374 .panel-body {
1375 1375 padding: 10px;
1376 1376 }
1377 1377 .panel {
1378 1378 margin-bottom: 10px;
1379 1379 }
1380 1380 h2 {
1381 1381 display: inline-block;
1382 1382 margin: 0;
1383 1383 min-width: 140px;
1384 1384 }
1385 1385 }
1386 1386 a.integration-box.dummy-integration {
1387 1387 color: @grey4
1388 1388 }
1389 1389 }
1390 1390
1391 1391 //Permissions Settings
1392 1392 #add_perm {
1393 1393 margin: 0 0 @padding;
1394 1394 cursor: pointer;
1395 1395 }
1396 1396
1397 1397 .perm_ac {
1398 1398 input {
1399 1399 width: 95%;
1400 1400 }
1401 1401 }
1402 1402
1403 1403 .autocomplete-suggestions {
1404 1404 width: auto !important; // overrides autocomplete.js
1405 1405 min-width: 278px;
1406 1406 margin: 0;
1407 1407 border: @border-thickness solid @grey5;
1408 1408 border-radius: @border-radius;
1409 1409 color: @grey2;
1410 1410 background-color: white;
1411 1411 }
1412 1412
1413 1413 .autocomplete-qfilter-suggestions {
1414 1414 width: auto !important; // overrides autocomplete.js
1415 1415 max-height: 100% !important;
1416 1416 min-width: 376px;
1417 1417 margin: 0;
1418 1418 border: @border-thickness solid @grey5;
1419 1419 color: @grey2;
1420 1420 background-color: white;
1421 1421 }
1422 1422
1423 1423 .autocomplete-selected {
1424 1424 background: #F0F0F0;
1425 1425 }
1426 1426
1427 1427 .ac-container-wrap {
1428 1428 margin: 0;
1429 1429 padding: 8px;
1430 1430 border-bottom: @border-thickness solid @grey5;
1431 1431 list-style-type: none;
1432 1432 cursor: pointer;
1433 1433
1434 1434 &:hover {
1435 1435 background-color: @grey7;
1436 1436 }
1437 1437
1438 1438 img {
1439 1439 height: @gravatar-size;
1440 1440 width: @gravatar-size;
1441 1441 margin-right: 1em;
1442 1442 }
1443 1443
1444 1444 strong {
1445 1445 font-weight: normal;
1446 1446 }
1447 1447 }
1448 1448
1449 1449 // Settings Dropdown
1450 1450 .user-menu .container {
1451 1451 padding: 0 4px;
1452 1452 margin: 0;
1453 1453 }
1454 1454
1455 1455 .user-menu .gravatar {
1456 1456 cursor: pointer;
1457 1457 }
1458 1458
1459 1459 .codeblock {
1460 1460 margin-bottom: @padding;
1461 1461 clear: both;
1462 1462
1463 1463 .stats {
1464 1464 overflow: hidden;
1465 1465 }
1466 1466
1467 1467 .message{
1468 1468 textarea{
1469 1469 margin: 0;
1470 1470 }
1471 1471 }
1472 1472
1473 1473 .code-header {
1474 1474 .stats {
1475 1475 line-height: 2em;
1476 1476
1477 1477 .revision_id {
1478 1478 margin-left: 0;
1479 1479 }
1480 1480 .buttons {
1481 1481 padding-right: 0;
1482 1482 }
1483 1483 }
1484 1484
1485 1485 .item{
1486 1486 margin-right: 0.5em;
1487 1487 }
1488 1488 }
1489 1489
1490 1490 #editor_container {
1491 1491 position: relative;
1492 1492 margin: @padding 10px;
1493 1493 }
1494 1494 }
1495 1495
1496 1496 #file_history_container {
1497 1497 display: none;
1498 1498 }
1499 1499
1500 1500 .file-history-inner {
1501 1501 margin-bottom: 10px;
1502 1502 }
1503 1503
1504 1504 // Pull Requests
1505 1505 .summary-details {
1506 1506 width: 100%;
1507 1507 }
1508 1508 .pr-summary {
1509 1509 border-bottom: @border-thickness solid @grey5;
1510 1510 margin-bottom: @space;
1511 1511 }
1512 1512
1513 1513 .reviewers {
1514 1514 width: 98%;
1515 1515 }
1516 1516
1517 1517 .reviewers ul li {
1518 1518 position: relative;
1519 1519 width: 100%;
1520 1520 padding-bottom: 8px;
1521 1521 list-style-type: none;
1522 1522 }
1523 1523
1524 1524 .reviewer_entry {
1525 1525 min-height: 55px;
1526 1526 }
1527 1527
1528 1528 .reviewer_reason {
1529 1529 padding-left: 20px;
1530 1530 line-height: 1.5em;
1531 1531 }
1532 1532 .reviewer_status {
1533 1533 display: inline-block;
1534 1534 width: 20px;
1535 1535 min-width: 20px;
1536 1536 height: 1.2em;
1537 1537 line-height: 1em;
1538 1538 }
1539 1539
1540 1540 .reviewer_name {
1541 1541 display: inline-block;
1542 1542 max-width: 83%;
1543 padding-right: 20px;
1544 1543 vertical-align: middle;
1545 1544 line-height: 1;
1546 1545
1547 1546 .rc-user {
1548 1547 min-width: 0;
1549 1548 margin: -2px 1em 0 0;
1550 1549 }
1551 1550
1552 1551 .reviewer {
1553 1552 float: left;
1554 1553 }
1555 1554 }
1556 1555
1557 1556 .reviewer_member_mandatory {
1558 1557 width: 16px;
1559 1558 font-size: 11px;
1560 1559 margin: 0;
1561 1560 padding: 0;
1562 1561 color: black;
1563 1562 opacity: 0.4;
1564 1563 }
1565 1564
1566 1565 .reviewer_member_mandatory_remove,
1567 1566 .reviewer_member_remove {
1568 1567 width: 16px;
1569 1568 padding: 0;
1570 1569 color: black;
1571 1570 cursor: pointer;
1572 1571 }
1573 1572
1574 1573 .reviewer_member_mandatory_remove {
1575 1574 color: @grey4;
1576 1575 }
1577 1576
1578 1577 .reviewer_member_status {
1579 1578 margin-top: 5px;
1580 1579 }
1581 1580 .pr-summary #summary{
1582 1581 width: 100%;
1583 1582 }
1584 1583 .pr-summary .action_button:hover {
1585 1584 border: 0;
1586 1585 cursor: pointer;
1587 1586 }
1588 1587 .pr-details-title {
1589 1588 height: 20px;
1590 1589 line-height: 16px;
1591 1590
1592 1591 padding-bottom: 4px;
1593 1592 border-bottom: @border-thickness solid @grey5;
1594 1593
1595 1594 .action_button.disabled {
1596 1595 color: @grey4;
1597 1596 cursor: inherit;
1598 1597 }
1599 1598 .action_button {
1600 1599 color: @rcblue;
1601 1600 }
1602 1601 }
1603 1602 .pr-details-content {
1604 1603 margin-top: @textmargin - 5;
1605 1604 margin-bottom: @textmargin - 5;
1606 1605 }
1607 1606
1608 1607 .pr-reviewer-rules {
1609 1608 padding: 10px 0px 20px 0px;
1610 1609 }
1611 1610
1612 1611 .todo-resolved {
1613 1612 text-decoration: line-through;
1614 1613 }
1615 1614
1616 1615 .todo-table, .comments-table {
1617 1616 width: 100%;
1618 1617
1619 1618 td {
1620 1619 padding: 5px 0px;
1621 1620 }
1622 1621
1623 1622 .td-todo-number {
1624 1623 text-align: left;
1625 1624 white-space: nowrap;
1626 1625 width: 1%;
1627 1626 padding-right: 2px;
1628 1627 }
1629 1628
1630 1629 .td-todo-gravatar {
1631 1630 width: 5%;
1632 1631
1633 1632 img {
1634 1633 margin: -3px 0;
1635 1634 }
1636 1635 }
1637 1636
1638 1637 }
1639 1638
1640 1639 .todo-comment-text-wrapper {
1641 1640 display: inline-grid;
1642 1641 }
1643 1642
1644 1643 .todo-comment-text {
1645 1644 margin-left: 5px;
1646 1645 white-space: nowrap;
1647 1646 overflow: hidden;
1648 1647 text-overflow: ellipsis;
1649 1648 }
1650 1649
1651 1650 table.group_members {
1652 1651 width: 100%
1653 1652 }
1654 1653
1655 1654 .group_members {
1656 1655 margin-top: 0;
1657 1656 padding: 0;
1658 1657
1659 1658 img {
1660 1659 height: @gravatar-size;
1661 1660 width: @gravatar-size;
1662 1661 margin-right: .5em;
1663 1662 margin-left: 3px;
1664 1663 }
1665 1664
1666 1665 .to-delete {
1667 1666 .user {
1668 1667 text-decoration: line-through;
1669 1668 }
1670 1669 }
1671 1670 }
1672 1671
1673 1672 .compare_view_commits_title {
1674 1673 .disabled {
1675 1674 cursor: inherit;
1676 1675 &:hover{
1677 1676 background-color: inherit;
1678 1677 color: inherit;
1679 1678 }
1680 1679 }
1681 1680 }
1682 1681
1683 1682 .subtitle-compare {
1684 1683 margin: -15px 0px 0px 0px;
1685 1684 }
1686 1685
1687 1686 // new entry in group_members
1688 1687 .td-author-new-entry {
1689 1688 background-color: rgba(red(@alert1), green(@alert1), blue(@alert1), 0.3);
1690 1689 }
1691 1690
1692 1691 .usergroup_member_remove {
1693 1692 width: 16px;
1694 1693 margin-bottom: 10px;
1695 1694 padding: 0;
1696 1695 color: black !important;
1697 1696 cursor: pointer;
1698 1697 }
1699 1698
1700 1699 .reviewer_ac .ac-input {
1701 1700 width: 98%;
1702 1701 margin-bottom: 1em;
1703 1702 }
1704 1703
1705 1704 .observer_ac .ac-input {
1706 1705 width: 98%;
1707 1706 margin-bottom: 1em;
1708 1707 }
1709 1708
1710 1709 .rule-table {
1711 1710 width: 100%;
1712 1711 }
1713 1712
1714 1713 .rule-table td {
1715 1714
1716 1715 }
1717 1716
1718 1717 .rule-table .td-role {
1719 1718 width: 100px
1720 1719 }
1721 1720
1722 1721 .rule-table .td-mandatory {
1723 1722 width: 100px
1724 1723 }
1725 1724
1726 1725 .rule-table .td-group-votes {
1727 1726 width: 150px
1728 1727 }
1729 1728
1730 1729 .compare_view_commits tr{
1731 1730 height: 20px;
1732 1731 }
1733 1732 .compare_view_commits td {
1734 1733 vertical-align: top;
1735 1734 padding-top: 10px;
1736 1735 }
1737 1736 .compare_view_commits .author {
1738 1737 margin-left: 5px;
1739 1738 }
1740 1739
1741 1740 .compare_view_commits {
1742 1741 .color-a {
1743 1742 color: @alert1;
1744 1743 }
1745 1744
1746 1745 .color-c {
1747 1746 color: @color3;
1748 1747 }
1749 1748
1750 1749 .color-r {
1751 1750 color: @color5;
1752 1751 }
1753 1752
1754 1753 .color-a-bg {
1755 1754 background-color: @alert1;
1756 1755 }
1757 1756
1758 1757 .color-c-bg {
1759 1758 background-color: @alert3;
1760 1759 }
1761 1760
1762 1761 .color-r-bg {
1763 1762 background-color: @alert2;
1764 1763 }
1765 1764
1766 1765 .color-a-border {
1767 1766 border: 1px solid @alert1;
1768 1767 }
1769 1768
1770 1769 .color-c-border {
1771 1770 border: 1px solid @alert3;
1772 1771 }
1773 1772
1774 1773 .color-r-border {
1775 1774 border: 1px solid @alert2;
1776 1775 }
1777 1776
1778 1777 .commit-change-indicator {
1779 1778 width: 15px;
1780 1779 height: 15px;
1781 1780 position: relative;
1782 1781 left: 15px;
1783 1782 }
1784 1783
1785 1784 .commit-change-content {
1786 1785 text-align: center;
1787 1786 vertical-align: middle;
1788 1787 line-height: 15px;
1789 1788 }
1790 1789 }
1791 1790
1792 1791 .compare_view_filepath {
1793 1792 color: @grey1;
1794 1793 }
1795 1794
1796 1795 .show_more {
1797 1796 display: inline-block;
1798 1797 width: 0;
1799 1798 height: 0;
1800 1799 vertical-align: middle;
1801 1800 content: "";
1802 1801 border: 4px solid;
1803 1802 border-right-color: transparent;
1804 1803 border-bottom-color: transparent;
1805 1804 border-left-color: transparent;
1806 1805 font-size: 0;
1807 1806 }
1808 1807
1809 1808 .journal_more .show_more {
1810 1809 display: inline;
1811 1810
1812 1811 &:after {
1813 1812 content: none;
1814 1813 }
1815 1814 }
1816 1815
1817 1816 .compare_view_commits .collapse_commit:after {
1818 1817 cursor: pointer;
1819 1818 content: "\00A0\25B4";
1820 1819 margin-left: -3px;
1821 1820 font-size: 17px;
1822 1821 color: @grey4;
1823 1822 }
1824 1823
1825 1824 .diff_links {
1826 1825 margin-left: 8px;
1827 1826 }
1828 1827
1829 1828 #pull_request_overview {
1830 1829 div.ancestor {
1831 1830 margin: -33px 0;
1832 1831 }
1833 1832 }
1834 1833
1835 1834 div.ancestor {
1836 1835
1837 1836 }
1838 1837
1839 1838 .cs_icon_td input[type="checkbox"] {
1840 1839 display: none;
1841 1840 }
1842 1841
1843 1842 .cs_icon_td .expand_file_icon:after {
1844 1843 cursor: pointer;
1845 1844 content: "\00A0\25B6";
1846 1845 font-size: 12px;
1847 1846 color: @grey4;
1848 1847 }
1849 1848
1850 1849 .cs_icon_td .collapse_file_icon:after {
1851 1850 cursor: pointer;
1852 1851 content: "\00A0\25BC";
1853 1852 font-size: 12px;
1854 1853 color: @grey4;
1855 1854 }
1856 1855
1857 1856 /*new binary
1858 1857 NEW_FILENODE = 1
1859 1858 DEL_FILENODE = 2
1860 1859 MOD_FILENODE = 3
1861 1860 RENAMED_FILENODE = 4
1862 1861 COPIED_FILENODE = 5
1863 1862 CHMOD_FILENODE = 6
1864 1863 BIN_FILENODE = 7
1865 1864 */
1866 1865 .cs_files_expand {
1867 1866 font-size: @basefontsize + 5px;
1868 1867 line-height: 1.8em;
1869 1868 float: right;
1870 1869 }
1871 1870
1872 1871 .cs_files_expand span{
1873 1872 color: @rcblue;
1874 1873 cursor: pointer;
1875 1874 }
1876 1875 .cs_files {
1877 1876 clear: both;
1878 1877 padding-bottom: @padding;
1879 1878
1880 1879 .cur_cs {
1881 1880 margin: 10px 2px;
1882 1881 font-weight: bold;
1883 1882 }
1884 1883
1885 1884 .node {
1886 1885 float: left;
1887 1886 }
1888 1887
1889 1888 .changes {
1890 1889 float: right;
1891 1890 color: white;
1892 1891 font-size: @basefontsize - 4px;
1893 1892 margin-top: 4px;
1894 1893 opacity: 0.6;
1895 1894 filter: Alpha(opacity=60); /* IE8 and earlier */
1896 1895
1897 1896 .added {
1898 1897 background-color: @alert1;
1899 1898 float: left;
1900 1899 text-align: center;
1901 1900 }
1902 1901
1903 1902 .deleted {
1904 1903 background-color: @alert2;
1905 1904 float: left;
1906 1905 text-align: center;
1907 1906 }
1908 1907
1909 1908 .bin {
1910 1909 background-color: @alert1;
1911 1910 text-align: center;
1912 1911 }
1913 1912
1914 1913 /*new binary*/
1915 1914 .bin.bin1 {
1916 1915 background-color: @alert1;
1917 1916 text-align: center;
1918 1917 }
1919 1918
1920 1919 /*deleted binary*/
1921 1920 .bin.bin2 {
1922 1921 background-color: @alert2;
1923 1922 text-align: center;
1924 1923 }
1925 1924
1926 1925 /*mod binary*/
1927 1926 .bin.bin3 {
1928 1927 background-color: @grey2;
1929 1928 text-align: center;
1930 1929 }
1931 1930
1932 1931 /*rename file*/
1933 1932 .bin.bin4 {
1934 1933 background-color: @alert4;
1935 1934 text-align: center;
1936 1935 }
1937 1936
1938 1937 /*copied file*/
1939 1938 .bin.bin5 {
1940 1939 background-color: @alert4;
1941 1940 text-align: center;
1942 1941 }
1943 1942
1944 1943 /*chmod file*/
1945 1944 .bin.bin6 {
1946 1945 background-color: @grey2;
1947 1946 text-align: center;
1948 1947 }
1949 1948 }
1950 1949 }
1951 1950
1952 1951 .cs_files .cs_added, .cs_files .cs_A,
1953 1952 .cs_files .cs_added, .cs_files .cs_M,
1954 1953 .cs_files .cs_added, .cs_files .cs_D {
1955 1954 height: 16px;
1956 1955 padding-right: 10px;
1957 1956 margin-top: 7px;
1958 1957 text-align: left;
1959 1958 }
1960 1959
1961 1960 .cs_icon_td {
1962 1961 min-width: 16px;
1963 1962 width: 16px;
1964 1963 }
1965 1964
1966 1965 .pull-request-merge {
1967 1966 border: 1px solid @grey5;
1968 1967 padding: 10px 0px 20px;
1969 1968 margin-top: 10px;
1970 1969 margin-bottom: 20px;
1971 1970 }
1972 1971
1973 1972 .pull-request-merge-refresh {
1974 1973 margin: 2px 7px;
1975 1974 a {
1976 1975 color: @grey3;
1977 1976 }
1978 1977 }
1979 1978
1980 1979 .pull-request-merge ul {
1981 1980 padding: 0px 0px;
1982 1981 }
1983 1982
1984 1983 .pull-request-merge li {
1985 1984 list-style-type: none;
1986 1985 }
1987 1986
1988 1987 .pull-request-merge .pull-request-wrap {
1989 1988 height: auto;
1990 1989 padding: 0px 0px;
1991 1990 text-align: right;
1992 1991 }
1993 1992
1994 1993 .pull-request-merge span {
1995 1994 margin-right: 5px;
1996 1995 }
1997 1996
1998 1997 .pull-request-merge-actions {
1999 1998 min-height: 30px;
2000 1999 padding: 0px 0px;
2001 2000 }
2002 2001
2003 2002 .pull-request-merge-info {
2004 2003 padding: 0px 5px 5px 0px;
2005 2004 }
2006 2005
2007 2006 .merge-status {
2008 2007 margin-right: 5px;
2009 2008 }
2010 2009
2011 2010 .merge-message {
2012 2011 font-size: 1.2em
2013 2012 }
2014 2013
2015 2014 .merge-message.success i,
2016 2015 .merge-icon.success i {
2017 2016 color:@alert1;
2018 2017 }
2019 2018
2020 2019 .merge-message.warning i,
2021 2020 .merge-icon.warning i {
2022 2021 color: @alert3;
2023 2022 }
2024 2023
2025 2024 .merge-message.error i,
2026 2025 .merge-icon.error i {
2027 2026 color:@alert2;
2028 2027 }
2029 2028
2030 2029 .pr-versions {
2031 2030 font-size: 1.1em;
2032 2031 padding: 7.5px;
2033 2032
2034 2033 table {
2035 2034
2036 2035 }
2037 2036
2038 2037 td {
2039 2038 line-height: 15px;
2040 2039 }
2041 2040
2042 2041 .compare-radio-button {
2043 2042 position: relative;
2044 2043 top: -3px;
2045 2044 }
2046 2045 }
2047 2046
2048 2047
2049 2048 #close_pull_request {
2050 2049 margin-right: 0px;
2051 2050 }
2052 2051
2053 2052 .empty_data {
2054 2053 color: @grey4;
2055 2054 }
2056 2055
2057 2056 #changeset_compare_view_content {
2058 2057 clear: both;
2059 2058 width: 100%;
2060 2059 box-sizing: border-box;
2061 2060 .border-radius(@border-radius);
2062 2061
2063 2062 .help-block {
2064 2063 margin: @padding 0;
2065 2064 color: @text-color;
2066 2065 &.pre-formatting {
2067 2066 white-space: pre;
2068 2067 }
2069 2068 }
2070 2069
2071 2070 .empty_data {
2072 2071 margin: @padding 0;
2073 2072 }
2074 2073
2075 2074 .alert {
2076 2075 margin-bottom: @space;
2077 2076 }
2078 2077 }
2079 2078
2080 2079 .table_disp {
2081 2080 .status {
2082 2081 width: auto;
2083 2082 }
2084 2083 }
2085 2084
2086 2085
2087 2086 .creation_in_progress {
2088 2087 color: @grey4
2089 2088 }
2090 2089
2091 2090 .status_box_menu {
2092 2091 margin: 0;
2093 2092 }
2094 2093
2095 2094 .notification-table{
2096 2095 margin-bottom: @space;
2097 2096 display: table;
2098 2097 width: 100%;
2099 2098
2100 2099 .container{
2101 2100 display: table-row;
2102 2101
2103 2102 .notification-header{
2104 2103 border-bottom: @border-thickness solid @border-default-color;
2105 2104 }
2106 2105
2107 2106 .notification-subject{
2108 2107 display: table-cell;
2109 2108 }
2110 2109 }
2111 2110 }
2112 2111
2113 2112 // Notifications
2114 2113 .notification-header{
2115 2114 display: table;
2116 2115 width: 100%;
2117 2116 padding: floor(@basefontsize/2) 0;
2118 2117 line-height: 1em;
2119 2118
2120 2119 .desc, .delete-notifications, .read-notifications{
2121 2120 display: table-cell;
2122 2121 text-align: left;
2123 2122 }
2124 2123
2125 2124 .delete-notifications, .read-notifications{
2126 2125 width: 35px;
2127 2126 min-width: 35px; //fixes when only one button is displayed
2128 2127 }
2129 2128 }
2130 2129
2131 2130 .notification-body {
2132 2131 .markdown-block,
2133 2132 .rst-block {
2134 2133 padding: @padding 0;
2135 2134 }
2136 2135
2137 2136 .notification-subject {
2138 2137 padding: @textmargin 0;
2139 2138 border-bottom: @border-thickness solid @border-default-color;
2140 2139 }
2141 2140 }
2142 2141
2143 2142 .notice-messages {
2144 2143 .markdown-block,
2145 2144 .rst-block {
2146 2145 padding: 0;
2147 2146 }
2148 2147 }
2149 2148
2150 2149 .notifications_buttons{
2151 2150 float: right;
2152 2151 }
2153 2152
2154 2153 #notification-status{
2155 2154 display: inline;
2156 2155 }
2157 2156
2158 2157 // Repositories
2159 2158
2160 2159 #summary.fields{
2161 2160 display: table;
2162 2161
2163 2162 .field{
2164 2163 display: table-row;
2165 2164
2166 2165 .label-summary{
2167 2166 display: table-cell;
2168 2167 min-width: @label-summary-minwidth;
2169 2168 padding-top: @padding/2;
2170 2169 padding-bottom: @padding/2;
2171 2170 padding-right: @padding/2;
2172 2171 }
2173 2172
2174 2173 .input{
2175 2174 display: table-cell;
2176 2175 padding: @padding/2;
2177 2176
2178 2177 input{
2179 2178 min-width: 29em;
2180 2179 padding: @padding/4;
2181 2180 }
2182 2181 }
2183 2182 .statistics, .downloads{
2184 2183 .disabled{
2185 2184 color: @grey4;
2186 2185 }
2187 2186 }
2188 2187 }
2189 2188 }
2190 2189
2191 2190 #summary{
2192 2191 width: 70%;
2193 2192 }
2194 2193
2195 2194
2196 2195 // Journal
2197 2196 .journal.title {
2198 2197 h5 {
2199 2198 float: left;
2200 2199 margin: 0;
2201 2200 width: 70%;
2202 2201 }
2203 2202
2204 2203 ul {
2205 2204 float: right;
2206 2205 display: inline-block;
2207 2206 margin: 0;
2208 2207 width: 30%;
2209 2208 text-align: right;
2210 2209
2211 2210 li {
2212 2211 display: inline;
2213 2212 font-size: @journal-fontsize;
2214 2213 line-height: 1em;
2215 2214
2216 2215 list-style-type: none;
2217 2216 }
2218 2217 }
2219 2218 }
2220 2219
2221 2220 .filterexample {
2222 2221 position: absolute;
2223 2222 top: 95px;
2224 2223 left: @contentpadding;
2225 2224 color: @rcblue;
2226 2225 font-size: 11px;
2227 2226 font-family: @text-regular;
2228 2227 cursor: help;
2229 2228
2230 2229 &:hover {
2231 2230 color: @rcdarkblue;
2232 2231 }
2233 2232
2234 2233 @media (max-width:768px) {
2235 2234 position: relative;
2236 2235 top: auto;
2237 2236 left: auto;
2238 2237 display: block;
2239 2238 }
2240 2239 }
2241 2240
2242 2241
2243 2242 #journal{
2244 2243 margin-bottom: @space;
2245 2244
2246 2245 .journal_day{
2247 2246 margin-bottom: @textmargin/2;
2248 2247 padding-bottom: @textmargin/2;
2249 2248 font-size: @journal-fontsize;
2250 2249 border-bottom: @border-thickness solid @border-default-color;
2251 2250 }
2252 2251
2253 2252 .journal_container{
2254 2253 margin-bottom: @space;
2255 2254
2256 2255 .journal_user{
2257 2256 display: inline-block;
2258 2257 }
2259 2258 .journal_action_container{
2260 2259 display: block;
2261 2260 margin-top: @textmargin;
2262 2261
2263 2262 div{
2264 2263 display: inline;
2265 2264 }
2266 2265
2267 2266 div.journal_action_params{
2268 2267 display: block;
2269 2268 }
2270 2269
2271 2270 div.journal_repo:after{
2272 2271 content: "\A";
2273 2272 white-space: pre;
2274 2273 }
2275 2274
2276 2275 div.date{
2277 2276 display: block;
2278 2277 margin-bottom: @textmargin;
2279 2278 }
2280 2279 }
2281 2280 }
2282 2281 }
2283 2282
2284 2283 // Files
2285 2284 .edit-file-title {
2286 2285 font-size: 16px;
2287 2286
2288 2287 .title-heading {
2289 2288 padding: 2px;
2290 2289 }
2291 2290 }
2292 2291
2293 2292 .edit-file-fieldset {
2294 2293 margin: @sidebarpadding 0;
2295 2294
2296 2295 .fieldset {
2297 2296 .left-label {
2298 2297 width: 13%;
2299 2298 }
2300 2299 .right-content {
2301 2300 width: 87%;
2302 2301 max-width: 100%;
2303 2302 }
2304 2303 .filename-label {
2305 2304 margin-top: 13px;
2306 2305 }
2307 2306 .commit-message-label {
2308 2307 margin-top: 4px;
2309 2308 }
2310 2309 .file-upload-input {
2311 2310 input {
2312 2311 display: none;
2313 2312 }
2314 2313 margin-top: 10px;
2315 2314 }
2316 2315 .file-upload-label {
2317 2316 margin-top: 10px;
2318 2317 }
2319 2318 p {
2320 2319 margin-top: 5px;
2321 2320 }
2322 2321
2323 2322 }
2324 2323 .custom-path-link {
2325 2324 margin-left: 5px;
2326 2325 }
2327 2326 #commit {
2328 2327 resize: vertical;
2329 2328 }
2330 2329 }
2331 2330
2332 2331 .delete-file-preview {
2333 2332 max-height: 250px;
2334 2333 }
2335 2334
2336 2335 .new-file,
2337 2336 #filter_activate,
2338 2337 #filter_deactivate {
2339 2338 float: right;
2340 2339 margin: 0 0 0 10px;
2341 2340 }
2342 2341
2343 2342 .file-upload-transaction-wrapper {
2344 2343 margin-top: 57px;
2345 2344 clear: both;
2346 2345 }
2347 2346
2348 2347 .file-upload-transaction-wrapper .error {
2349 2348 color: @color5;
2350 2349 }
2351 2350
2352 2351 .file-upload-transaction {
2353 2352 min-height: 200px;
2354 2353 padding: 54px;
2355 2354 border: 1px solid @grey5;
2356 2355 text-align: center;
2357 2356 clear: both;
2358 2357 }
2359 2358
2360 2359 .file-upload-transaction i {
2361 2360 font-size: 48px
2362 2361 }
2363 2362
2364 2363 h3.files_location{
2365 2364 line-height: 2.4em;
2366 2365 }
2367 2366
2368 2367 .browser-nav {
2369 2368 width: 100%;
2370 2369 display: table;
2371 2370 margin-bottom: 20px;
2372 2371
2373 2372 .info_box {
2374 2373 float: left;
2375 2374 display: inline-table;
2376 2375 height: 2.5em;
2377 2376
2378 2377 .browser-cur-rev, .info_box_elem {
2379 2378 display: table-cell;
2380 2379 vertical-align: middle;
2381 2380 }
2382 2381
2383 2382 .drop-menu {
2384 2383 margin: 0 10px;
2385 2384 }
2386 2385
2387 2386 .info_box_elem {
2388 2387 border-top: @border-thickness solid @grey5;
2389 2388 border-bottom: @border-thickness solid @grey5;
2390 2389 box-shadow: @button-shadow;
2391 2390
2392 2391 #at_rev, a {
2393 2392 padding: 0.6em 0.4em;
2394 2393 margin: 0;
2395 2394 .box-shadow(none);
2396 2395 border: 0;
2397 2396 height: 12px;
2398 2397 color: @grey2;
2399 2398 }
2400 2399
2401 2400 input#at_rev {
2402 2401 max-width: 50px;
2403 2402 text-align: center;
2404 2403 }
2405 2404
2406 2405 &.previous {
2407 2406 border: @border-thickness solid @grey5;
2408 2407 border-top-left-radius: @border-radius;
2409 2408 border-bottom-left-radius: @border-radius;
2410 2409
2411 2410 &:hover {
2412 2411 border-color: @grey4;
2413 2412 }
2414 2413
2415 2414 .disabled {
2416 2415 color: @grey5;
2417 2416 cursor: not-allowed;
2418 2417 opacity: 0.5;
2419 2418 }
2420 2419 }
2421 2420
2422 2421 &.next {
2423 2422 border: @border-thickness solid @grey5;
2424 2423 border-top-right-radius: @border-radius;
2425 2424 border-bottom-right-radius: @border-radius;
2426 2425
2427 2426 &:hover {
2428 2427 border-color: @grey4;
2429 2428 }
2430 2429
2431 2430 .disabled {
2432 2431 color: @grey5;
2433 2432 cursor: not-allowed;
2434 2433 opacity: 0.5;
2435 2434 }
2436 2435 }
2437 2436 }
2438 2437
2439 2438 .browser-cur-rev {
2440 2439
2441 2440 span{
2442 2441 margin: 0;
2443 2442 color: @rcblue;
2444 2443 height: 12px;
2445 2444 display: inline-block;
2446 2445 padding: 0.7em 1em ;
2447 2446 border: @border-thickness solid @rcblue;
2448 2447 margin-right: @padding;
2449 2448 }
2450 2449 }
2451 2450
2452 2451 }
2453 2452
2454 2453 .select-index-number {
2455 2454 margin: 0 0 0 20px;
2456 2455 color: @grey3;
2457 2456 }
2458 2457
2459 2458 .search_activate {
2460 2459 display: table-cell;
2461 2460 vertical-align: middle;
2462 2461
2463 2462 input, label{
2464 2463 margin: 0;
2465 2464 padding: 0;
2466 2465 }
2467 2466
2468 2467 input{
2469 2468 margin-left: @textmargin;
2470 2469 }
2471 2470
2472 2471 }
2473 2472 }
2474 2473
2475 2474 .browser-cur-rev{
2476 2475 margin-bottom: @textmargin;
2477 2476 }
2478 2477
2479 2478 #node_filter_box_loading{
2480 2479 .info_text;
2481 2480 }
2482 2481
2483 2482 .browser-search {
2484 2483 margin: -25px 0px 5px 0px;
2485 2484 }
2486 2485
2487 2486 .files-quick-filter {
2488 2487 float: right;
2489 2488 width: 180px;
2490 2489 position: relative;
2491 2490 }
2492 2491
2493 2492 .files-filter-box {
2494 2493 display: flex;
2495 2494 padding: 0px;
2496 2495 border-radius: 3px;
2497 2496 margin-bottom: 0;
2498 2497
2499 2498 a {
2500 2499 border: none !important;
2501 2500 }
2502 2501
2503 2502 li {
2504 2503 list-style-type: none
2505 2504 }
2506 2505 }
2507 2506
2508 2507 .files-filter-box-path {
2509 2508 line-height: 33px;
2510 2509 padding: 0;
2511 2510 width: 20px;
2512 2511 position: absolute;
2513 2512 z-index: 11;
2514 2513 left: 5px;
2515 2514 }
2516 2515
2517 2516 .files-filter-box-input {
2518 2517 margin-right: 0;
2519 2518
2520 2519 input {
2521 2520 border: 1px solid @white;
2522 2521 padding-left: 25px;
2523 2522 width: 145px;
2524 2523
2525 2524 &:hover {
2526 2525 border-color: @grey6;
2527 2526 }
2528 2527
2529 2528 &:focus {
2530 2529 border-color: @grey5;
2531 2530 }
2532 2531 }
2533 2532 }
2534 2533
2535 2534 .browser-result{
2536 2535 td a{
2537 2536 margin-left: 0.5em;
2538 2537 display: inline-block;
2539 2538
2540 2539 em {
2541 2540 font-weight: @text-bold-weight;
2542 2541 font-family: @text-bold;
2543 2542 }
2544 2543 }
2545 2544 }
2546 2545
2547 2546 .browser-highlight{
2548 2547 background-color: @grey5-alpha;
2549 2548 }
2550 2549
2551 2550
2552 2551 .edit-file-fieldset #location,
2553 2552 .edit-file-fieldset #filename {
2554 2553 display: flex;
2555 2554 width: -moz-available; /* WebKit-based browsers will ignore this. */
2556 2555 width: -webkit-fill-available; /* Mozilla-based browsers will ignore this. */
2557 2556 width: fill-available;
2558 2557 border: 0;
2559 2558 }
2560 2559
2561 2560 .path-items {
2562 2561 display: flex;
2563 2562 padding: 0;
2564 2563 border: 1px solid #eeeeee;
2565 2564 width: 100%;
2566 2565 float: left;
2567 2566
2568 2567 .breadcrumb-path {
2569 2568 line-height: 30px;
2570 2569 padding: 0 4px;
2571 2570 white-space: nowrap;
2572 2571 }
2573 2572
2574 2573 .upload-form {
2575 2574 margin-top: 46px;
2576 2575 }
2577 2576
2578 2577 .location-path {
2579 2578 width: -moz-available; /* WebKit-based browsers will ignore this. */
2580 2579 width: -webkit-fill-available; /* Mozilla-based browsers will ignore this. */
2581 2580 width: fill-available;
2582 2581
2583 2582 .file-name-input {
2584 2583 padding: 0.5em 0;
2585 2584 }
2586 2585
2587 2586 }
2588 2587
2589 2588 ul {
2590 2589 display: flex;
2591 2590 margin: 0;
2592 2591 padding: 0;
2593 2592 width: 100%;
2594 2593 }
2595 2594
2596 2595 li {
2597 2596 list-style-type: none;
2598 2597 }
2599 2598
2600 2599 }
2601 2600
2602 2601 .editor-items {
2603 2602 height: 40px;
2604 2603 margin: 10px 0 -17px 10px;
2605 2604
2606 2605 .editor-action {
2607 2606 cursor: pointer;
2608 2607 }
2609 2608
2610 2609 .editor-action.active {
2611 2610 border-bottom: 2px solid #5C5C5C;
2612 2611 }
2613 2612
2614 2613 li {
2615 2614 list-style-type: none;
2616 2615 }
2617 2616 }
2618 2617
2619 2618 .edit-file-fieldset .message textarea {
2620 2619 border: 1px solid #eeeeee;
2621 2620 }
2622 2621
2623 2622 #files_data .codeblock {
2624 2623 background-color: #F5F5F5;
2625 2624 }
2626 2625
2627 2626 #editor_preview {
2628 2627 background: white;
2629 2628 }
2630 2629
2631 2630 .show-editor {
2632 2631 padding: 10px;
2633 2632 background-color: white;
2634 2633
2635 2634 }
2636 2635
2637 2636 .show-preview {
2638 2637 padding: 10px;
2639 2638 background-color: white;
2640 2639 border-left: 1px solid #eeeeee;
2641 2640 }
2642 2641 // quick filter
2643 2642 .grid-quick-filter {
2644 2643 float: right;
2645 2644 position: relative;
2646 2645 }
2647 2646
2648 2647 .grid-filter-box {
2649 2648 display: flex;
2650 2649 padding: 0px;
2651 2650 border-radius: 3px;
2652 2651 margin-bottom: 0;
2653 2652
2654 2653 a {
2655 2654 border: none !important;
2656 2655 }
2657 2656
2658 2657 li {
2659 2658 list-style-type: none
2660 2659 }
2661 2660
2662 2661 }
2663 2662
2664 2663 .grid-filter-box-icon {
2665 2664 line-height: 33px;
2666 2665 padding: 0;
2667 2666 width: 20px;
2668 2667 position: absolute;
2669 2668 z-index: 11;
2670 2669 left: 5px;
2671 2670 }
2672 2671
2673 2672 .grid-filter-box-input {
2674 2673 margin-right: 0;
2675 2674
2676 2675 input {
2677 2676 border: 1px solid @white;
2678 2677 padding-left: 25px;
2679 2678 width: 145px;
2680 2679
2681 2680 &:hover {
2682 2681 border-color: @grey6;
2683 2682 }
2684 2683
2685 2684 &:focus {
2686 2685 border-color: @grey5;
2687 2686 }
2688 2687 }
2689 2688 }
2690 2689
2691 2690
2692 2691
2693 2692 // Search
2694 2693
2695 2694 .search-form{
2696 2695 #q {
2697 2696 width: @search-form-width;
2698 2697 }
2699 2698 .fields{
2700 2699 margin: 0 0 @space;
2701 2700 }
2702 2701
2703 2702 label{
2704 2703 display: inline-block;
2705 2704 margin-right: @textmargin;
2706 2705 padding-top: 0.25em;
2707 2706 }
2708 2707
2709 2708
2710 2709 .results{
2711 2710 clear: both;
2712 2711 margin: 0 0 @padding;
2713 2712 }
2714 2713
2715 2714 .search-tags {
2716 2715 padding: 5px 0;
2717 2716 }
2718 2717 }
2719 2718
2720 2719 div.search-feedback-items {
2721 2720 display: inline-block;
2722 2721 }
2723 2722
2724 2723 div.search-code-body {
2725 2724 background-color: #ffffff; padding: 5px 0 5px 10px;
2726 2725 pre {
2727 2726 .match { background-color: #faffa6;}
2728 2727 .break { display: block; width: 100%; background-color: #DDE7EF; color: #747474; }
2729 2728 }
2730 2729 }
2731 2730
2732 2731 .expand_commit.search {
2733 2732 .show_more.open {
2734 2733 height: auto;
2735 2734 max-height: none;
2736 2735 }
2737 2736 }
2738 2737
2739 2738 .search-results {
2740 2739
2741 2740 h2 {
2742 2741 margin-bottom: 0;
2743 2742 }
2744 2743 .codeblock {
2745 2744 border: none;
2746 2745 background: transparent;
2747 2746 }
2748 2747
2749 2748 .codeblock-header {
2750 2749 border: none;
2751 2750 background: transparent;
2752 2751 }
2753 2752
2754 2753 .code-body {
2755 2754 border: @border-thickness solid @grey6;
2756 2755 .border-radius(@border-radius);
2757 2756 }
2758 2757
2759 2758 .td-commit {
2760 2759 &:extend(pre);
2761 2760 border-bottom: @border-thickness solid @border-default-color;
2762 2761 }
2763 2762
2764 2763 .message {
2765 2764 height: auto;
2766 2765 max-width: 350px;
2767 2766 white-space: normal;
2768 2767 text-overflow: initial;
2769 2768 overflow: visible;
2770 2769
2771 2770 .match { background-color: #faffa6;}
2772 2771 .break { background-color: #DDE7EF; width: 100%; color: #747474; display: block; }
2773 2772 }
2774 2773
2775 2774 .path {
2776 2775 border-bottom: none !important;
2777 2776 border-left: 1px solid @grey6 !important;
2778 2777 border-right: 1px solid @grey6 !important;
2779 2778 }
2780 2779 }
2781 2780
2782 2781 table.rctable td.td-search-results div {
2783 2782 max-width: 100%;
2784 2783 }
2785 2784
2786 2785 #tip-box, .tip-box{
2787 2786 padding: @menupadding/2;
2788 2787 display: block;
2789 2788 border: @border-thickness solid @border-highlight-color;
2790 2789 .border-radius(@border-radius);
2791 2790 background-color: white;
2792 2791 z-index: 99;
2793 2792 white-space: pre-wrap;
2794 2793 }
2795 2794
2796 2795 #linktt {
2797 2796 width: 79px;
2798 2797 }
2799 2798
2800 2799 #help_kb .modal-content{
2801 2800 max-width: 800px;
2802 2801 margin: 10% auto;
2803 2802
2804 2803 table{
2805 2804 td,th{
2806 2805 border-bottom: none;
2807 2806 line-height: 2.5em;
2808 2807 }
2809 2808 th{
2810 2809 padding-bottom: @textmargin/2;
2811 2810 }
2812 2811 td.keys{
2813 2812 text-align: center;
2814 2813 }
2815 2814 }
2816 2815
2817 2816 .block-left{
2818 2817 width: 45%;
2819 2818 margin-right: 5%;
2820 2819 }
2821 2820 .modal-footer{
2822 2821 clear: both;
2823 2822 }
2824 2823 .key.tag{
2825 2824 padding: 0.5em;
2826 2825 background-color: @rcblue;
2827 2826 color: white;
2828 2827 border-color: @rcblue;
2829 2828 .box-shadow(none);
2830 2829 }
2831 2830 }
2832 2831
2833 2832
2834 2833
2835 2834 //--- IMPORTS FOR REFACTORED STYLES ------------------//
2836 2835
2837 2836 @import 'statistics-graph';
2838 2837 @import 'tables';
2839 2838 @import 'forms';
2840 2839 @import 'diff';
2841 2840 @import 'summary';
2842 2841 @import 'navigation';
2843 2842
2844 2843 //--- SHOW/HIDE SECTIONS --//
2845 2844
2846 2845 .btn-collapse {
2847 2846 float: right;
2848 2847 text-align: right;
2849 2848 font-family: @text-light;
2850 2849 font-size: @basefontsize;
2851 2850 cursor: pointer;
2852 2851 border: none;
2853 2852 color: @rcblue;
2854 2853 }
2855 2854
2856 2855 table.rctable,
2857 2856 table.dataTable {
2858 2857 .btn-collapse {
2859 2858 float: right;
2860 2859 text-align: right;
2861 2860 }
2862 2861 }
2863 2862
2864 2863 table.rctable {
2865 2864 &.permissions {
2866 2865
2867 2866 th.td-owner {
2868 2867 padding: 0;
2869 2868 }
2870 2869
2871 2870 th {
2872 2871 font-weight: normal;
2873 2872 padding: 0 5px;
2874 2873 }
2875 2874
2876 2875 }
2877 2876 }
2878 2877
2879 2878
2880 2879 // TODO: johbo: Fix for IE10, this avoids that we see a border
2881 2880 // and padding around checkboxes and radio boxes. Move to the right place,
2882 2881 // or better: Remove this once we did the form refactoring.
2883 2882 input[type=checkbox],
2884 2883 input[type=radio] {
2885 2884 padding: 0;
2886 2885 border: none;
2887 2886 }
2888 2887
2889 2888 .toggle-ajax-spinner{
2890 2889 height: 16px;
2891 2890 width: 16px;
2892 2891 }
2893 2892
2894 2893
2895 2894 .markup-form .clearfix {
2896 2895 .border-radius(@border-radius);
2897 2896 margin: 0px;
2898 2897 }
2899 2898
2900 2899 .markup-form-area {
2901 2900 padding: 8px 12px;
2902 2901 border: 1px solid @grey4;
2903 2902 .border-radius(@border-radius);
2904 2903 }
2905 2904
2906 2905 .markup-form-area-header .nav-links {
2907 2906 display: flex;
2908 2907 flex-flow: row wrap;
2909 2908 -webkit-flex-flow: row wrap;
2910 2909 width: 100%;
2911 2910 }
2912 2911
2913 2912 .markup-form-area-footer {
2914 2913 display: flex;
2915 2914 }
2916 2915
2917 2916 .markup-form-area-footer .toolbar {
2918 2917
2919 2918 }
2920 2919
2921 2920 // markup Form
2922 2921 div.markup-form {
2923 2922 margin-top: 20px;
2924 2923 }
2925 2924
2926 2925 .markup-form strong {
2927 2926 display: block;
2928 2927 margin-bottom: 15px;
2929 2928 }
2930 2929
2931 2930 .markup-form textarea {
2932 2931 width: 100%;
2933 2932 height: 100px;
2934 2933 font-family: @text-monospace;
2935 2934 }
2936 2935
2937 2936 form.markup-form {
2938 2937 margin-top: 10px;
2939 2938 margin-left: 10px;
2940 2939 }
2941 2940
2942 2941 .markup-form .comment-block-ta,
2943 2942 .markup-form .preview-box {
2944 2943 .border-radius(@border-radius);
2945 2944 .box-sizing(border-box);
2946 2945 background-color: white;
2947 2946 }
2948 2947
2949 2948 .markup-form .preview-box.unloaded {
2950 2949 height: 50px;
2951 2950 text-align: center;
2952 2951 padding: 20px;
2953 2952 background-color: white;
2954 2953 }
2955 2954
2956 2955
2957 2956 .dropzone-wrapper {
2958 2957 border: 1px solid @grey5;
2959 2958 padding: 20px;
2960 2959 }
2961 2960
2962 2961 .dropzone,
2963 2962 .dropzone-pure {
2964 2963 border: 2px dashed @grey5;
2965 2964 border-radius: 5px;
2966 2965 background: white;
2967 2966 min-height: 200px;
2968 2967 padding: 54px;
2969 2968
2970 2969 .dz-message {
2971 2970 font-weight: 700;
2972 2971 text-align: center;
2973 2972 margin: 2em 0;
2974 2973 }
2975 2974
2976 2975 }
2977 2976
2978 2977 .dz-preview {
2979 2978 margin: 10px 0 !important;
2980 2979 position: relative;
2981 2980 vertical-align: top;
2982 2981 padding: 10px;
2983 2982 border-bottom: 1px solid @grey5;
2984 2983 }
2985 2984
2986 2985 .dz-filename {
2987 2986 font-weight: 700;
2988 2987 float: left;
2989 2988 }
2990 2989
2991 2990 .dz-sending {
2992 2991 float: right;
2993 2992 }
2994 2993
2995 2994 .dz-response {
2996 2995 clear: both
2997 2996 }
2998 2997
2999 2998 .dz-filename-size {
3000 2999 float: right
3001 3000 }
3002 3001
3003 3002 .dz-error-message {
3004 3003 color: @alert2;
3005 3004 padding-top: 10px;
3006 3005 clear: both;
3007 3006 }
3008 3007
3009 3008
3010 3009 .user-hovercard {
3011 3010 padding: 5px;
3012 3011 }
3013 3012
3014 3013 .user-hovercard-icon {
3015 3014 display: inline;
3016 3015 padding: 0;
3017 3016 box-sizing: content-box;
3018 3017 border-radius: 50%;
3019 3018 float: left;
3020 3019 }
3021 3020
3022 3021 .user-hovercard-name {
3023 3022 float: right;
3024 3023 vertical-align: top;
3025 3024 padding-left: 10px;
3026 3025 min-width: 150px;
3027 3026 }
3028 3027
3029 3028 .user-hovercard-bio {
3030 3029 clear: both;
3031 3030 padding-top: 10px;
3032 3031 }
3033 3032
3034 3033 .user-hovercard-header {
3035 3034 clear: both;
3036 3035 min-height: 10px;
3037 3036 }
3038 3037
3039 3038 .user-hovercard-footer {
3040 3039 clear: both;
3041 3040 min-height: 10px;
3042 3041 }
3043 3042
3044 3043 .user-group-hovercard {
3045 3044 padding: 5px;
3046 3045 }
3047 3046
3048 3047 .user-group-hovercard-icon {
3049 3048 display: inline;
3050 3049 padding: 0;
3051 3050 box-sizing: content-box;
3052 3051 border-radius: 50%;
3053 3052 float: left;
3054 3053 }
3055 3054
3056 3055 .user-group-hovercard-name {
3057 3056 float: left;
3058 3057 vertical-align: top;
3059 3058 padding-left: 10px;
3060 3059 min-width: 150px;
3061 3060 }
3062 3061
3063 3062 .user-group-hovercard-icon i {
3064 3063 border: 1px solid @grey4;
3065 3064 border-radius: 4px;
3066 3065 }
3067 3066
3068 3067 .user-group-hovercard-bio {
3069 3068 clear: both;
3070 3069 padding-top: 10px;
3071 3070 line-height: 1.0em;
3072 3071 }
3073 3072
3074 3073 .user-group-hovercard-header {
3075 3074 clear: both;
3076 3075 min-height: 10px;
3077 3076 }
3078 3077
3079 3078 .user-group-hovercard-footer {
3080 3079 clear: both;
3081 3080 min-height: 10px;
3082 3081 }
3083 3082
3084 3083 .pr-hovercard-header {
3085 3084 clear: both;
3086 3085 display: block;
3087 3086 line-height: 20px;
3088 3087 }
3089 3088
3090 3089 .pr-hovercard-user {
3091 3090 display: flex;
3092 3091 align-items: center;
3093 3092 padding-left: 5px;
3094 3093 }
3095 3094
3096 3095 .pr-hovercard-title {
3097 3096 padding-top: 5px;
3098 3097 }
3099 3098
3100 3099 .action-divider {
3101 3100 opacity: 0.5;
3102 3101 }
3103 3102
3104 3103 .details-inline-block {
3105 3104 display: inline-block;
3106 3105 position: relative;
3107 3106 }
3108 3107
3109 3108 .details-inline-block summary {
3110 3109 list-style: none;
3111 3110 }
3112 3111
3113 3112 details:not([open]) > :not(summary) {
3114 3113 display: none !important;
3115 3114 }
3116 3115
3117 3116 .details-reset > summary {
3118 3117 list-style: none;
3119 3118 }
3120 3119
3121 3120 .details-reset > summary::-webkit-details-marker {
3122 3121 display: none;
3123 3122 }
3124 3123
3125 3124 .details-dropdown {
3126 3125 position: absolute;
3127 3126 top: 100%;
3128 3127 width: 185px;
3129 3128 list-style: none;
3130 3129 background-color: #fff;
3131 3130 background-clip: padding-box;
3132 3131 border: 1px solid @grey5;
3133 3132 box-shadow: 0 8px 24px rgba(149, 157, 165, .2);
3134 3133 left: -150px;
3135 3134 text-align: left;
3136 3135 z-index: 90;
3137 3136 }
3138 3137
3139 3138 .dropdown-divider {
3140 3139 display: block;
3141 3140 height: 0;
3142 3141 margin: 8px 0;
3143 3142 border-top: 1px solid @grey5;
3144 3143 }
3145 3144
3146 3145 .dropdown-item {
3147 3146 display: block;
3148 3147 padding: 4px 8px 4px 16px;
3149 3148 overflow: hidden;
3150 3149 text-overflow: ellipsis;
3151 3150 white-space: nowrap;
3152 3151 font-weight: normal;
3153 3152 }
3154 3153
3155 3154 .right-sidebar {
3156 3155 position: fixed;
3157 3156 top: 0px;
3158 3157 bottom: 0;
3159 3158 right: 0;
3160 3159
3161 3160 background: #fafafa;
3162 3161 z-index: 50;
3163 3162 }
3164 3163
3165 3164 .right-sidebar {
3166 3165 border-left: 1px solid @grey5;
3167 3166 }
3168 3167
3169 3168 .right-sidebar.right-sidebar-expanded {
3170 3169 width: 300px;
3171 3170 overflow: scroll;
3172 3171 }
3173 3172
3174 3173 .right-sidebar.right-sidebar-collapsed {
3175 3174 width: 40px;
3176 3175 padding: 0;
3177 3176 display: block;
3178 3177 overflow: hidden;
3179 3178 }
3180 3179
3181 3180 .sidenav {
3182 3181 float: right;
3183 3182 will-change: min-height;
3184 3183 background: #fafafa;
3185 3184 width: 100%;
3186 3185 }
3187 3186
3188 3187 .sidebar-toggle {
3189 3188 height: 30px;
3190 3189 text-align: center;
3191 3190 margin: 15px 0px 0 0;
3192 3191 }
3193 3192
3194 3193 .sidebar-toggle a {
3195 3194
3196 3195 }
3197 3196
3198 3197 .sidebar-content {
3199 3198 margin-left: 15px;
3200 3199 margin-right: 15px;
3201 3200 }
3202 3201
3203 3202 .sidebar-heading {
3204 3203 font-size: 1.2em;
3205 3204 font-weight: 700;
3206 3205 margin-top: 10px;
3207 3206 }
3208 3207
3209 3208 .sidebar-element {
3210 3209 margin-top: 20px;
3211 3210
3212 3211 .icon-draft {
3213 3212 color: @color-draft
3214 3213 }
3215 3214 }
3216 3215
3217 3216
3218 3217 .right-sidebar-collapsed-state {
3219 3218 display: flex;
3220 3219 flex-direction: column;
3221 3220 justify-content: center;
3222 3221 align-items: center;
3223 3222 padding: 0 10px;
3224 3223 cursor: pointer;
3225 3224 font-size: 1.3em;
3226 3225 margin: 0 -15px;
3227 3226 }
3228 3227
3229 3228 .right-sidebar-collapsed-state:hover {
3230 3229 background-color: @grey5;
3231 3230 }
3232 3231
3233 3232 .old-comments-marker {
3234 3233 text-align: left;
3235 3234 }
3236 3235
3237 3236 .old-comments-marker td {
3238 3237 padding-top: 15px;
3239 3238 }
@@ -1,1422 +1,1395 b''
1 1 <%namespace name="base" file="/base/base.mako"/>
2 2 <%namespace name="commentblock" file="/changeset/changeset_file_comment.mako"/>
3 3
4 4 <%def name="diff_line_anchor(commit, filename, line, type)"><%
5 5 return '%s_%s_%i' % (h.md5_safe(commit+filename), type, line)
6 6 %></%def>
7 7
8 8 <%def name="action_class(action)">
9 9 <%
10 10 return {
11 11 '-': 'cb-deletion',
12 12 '+': 'cb-addition',
13 13 ' ': 'cb-context',
14 14 }.get(action, 'cb-empty')
15 15 %>
16 16 </%def>
17 17
18 18 <%def name="op_class(op_id)">
19 19 <%
20 20 return {
21 21 DEL_FILENODE: 'deletion', # file deleted
22 22 BIN_FILENODE: 'warning' # binary diff hidden
23 23 }.get(op_id, 'addition')
24 24 %>
25 25 </%def>
26 26
27 27
28 28
29 29 <%def name="render_diffset(diffset, commit=None,
30 30
31 31 # collapse all file diff entries when there are more than this amount of files in the diff
32 32 collapse_when_files_over=20,
33 33
34 34 # collapse lines in the diff when more than this amount of lines changed in the file diff
35 35 lines_changed_limit=500,
36 36
37 37 # add a ruler at to the output
38 38 ruler_at_chars=0,
39 39
40 40 # show inline comments
41 41 use_comments=False,
42 42
43 43 # disable new comments
44 44 disable_new_comments=False,
45 45
46 46 # special file-comments that were deleted in previous versions
47 47 # it's used for showing outdated comments for deleted files in a PR
48 48 deleted_files_comments=None,
49 49
50 50 # for cache purpose
51 51 inline_comments=None,
52 52
53 53 # additional menu for PRs
54 54 pull_request_menu=None,
55 55
56 56 # show/hide todo next to comments
57 57 show_todos=True,
58 58
59 59 )">
60 60
61 61 <%
62 62 diffset_container_id = h.md5(diffset.target_ref)
63 63 collapse_all = len(diffset.files) > collapse_when_files_over
64 64 active_pattern_entries = h.get_active_pattern_entries(getattr(c, 'repo_name', None))
65 65 from rhodecode.lib.diffs import NEW_FILENODE, DEL_FILENODE, \
66 66 MOD_FILENODE, RENAMED_FILENODE, CHMOD_FILENODE, BIN_FILENODE, COPIED_FILENODE
67 67 %>
68 68
69 69 %if use_comments:
70 70
71 71 ## Template for injecting comments
72 72 <div id="cb-comments-inline-container-template" class="js-template">
73 73 ${inline_comments_container([])}
74 74 </div>
75 75
76 76 <div class="js-template" id="cb-comment-inline-form-template">
77 77 <div class="comment-inline-form ac">
78 78 %if not c.rhodecode_user.is_default:
79 79 ## render template for inline comments
80 80 ${commentblock.comment_form(form_type='inline')}
81 81 %endif
82 82 </div>
83 83 </div>
84 84
85 85 %endif
86 86
87 87 %if c.user_session_attrs["diffmode"] == 'sideside':
88 88 <style>
89 89 .wrapper {
90 90 max-width: 1600px !important;
91 91 }
92 92 </style>
93 93 %endif
94 94
95 95 %if ruler_at_chars:
96 96 <style>
97 97 .diff table.cb .cb-content:after {
98 98 content: "";
99 99 border-left: 1px solid blue;
100 100 position: absolute;
101 101 top: 0;
102 102 height: 18px;
103 103 opacity: .2;
104 104 z-index: 10;
105 105 //## +5 to account for diff action (+/-)
106 106 left: ${ruler_at_chars + 5}ch;
107 107 </style>
108 108 %endif
109 109
110 110 <div class="diffset ${disable_new_comments and 'diffset-comments-disabled'}">
111 111
112 112 <div style="height: 20px; line-height: 20px">
113 113 ## expand/collapse action
114 114 <div class="pull-left">
115 115 <a class="${'collapsed' if collapse_all else ''}" href="#expand-files" onclick="toggleExpand(this, '${diffset_container_id}'); return false">
116 116 % if collapse_all:
117 117 <i class="icon-plus-squared-alt icon-no-margin"></i>${_('Expand all files')}
118 118 % else:
119 119 <i class="icon-minus-squared-alt icon-no-margin"></i>${_('Collapse all files')}
120 120 % endif
121 121 </a>
122 122
123 123 </div>
124 124
125 125 ## todos
126 126 % if show_todos and getattr(c, 'at_version', None):
127 127 <div class="pull-right">
128 128 <i class="icon-flag-filled" style="color: #949494">TODOs:</i>
129 129 ${_('not available in this view')}
130 130 </div>
131 131 % elif show_todos:
132 132 <div class="pull-right">
133 133 <div class="comments-number" style="padding-left: 10px">
134 134 % if hasattr(c, 'unresolved_comments') and hasattr(c, 'resolved_comments'):
135 135 <i class="icon-flag-filled" style="color: #949494">TODOs:</i>
136 136 % if c.unresolved_comments:
137 137 <a href="#show-todos" onclick="$('#todo-box').toggle(); return false">
138 138 ${_('{} unresolved').format(len(c.unresolved_comments))}
139 139 </a>
140 140 % else:
141 141 ${_('0 unresolved')}
142 142 % endif
143 143
144 144 ${_('{} Resolved').format(len(c.resolved_comments))}
145 145 % endif
146 146 </div>
147 147 </div>
148 148 % endif
149 149
150 150 ## ## comments
151 151 ## <div class="pull-right">
152 152 ## <div class="comments-number" style="padding-left: 10px">
153 153 ## % if hasattr(c, 'comments') and hasattr(c, 'inline_cnt'):
154 154 ## <i class="icon-comment" style="color: #949494">COMMENTS:</i>
155 155 ## % if c.comments:
156 156 ## <a href="#comments">${_ungettext("{} General", "{} General", len(c.comments)).format(len(c.comments))}</a>,
157 157 ## % else:
158 158 ## ${_('0 General')}
159 159 ## % endif
160 160 ##
161 161 ## % if c.inline_cnt:
162 162 ## <a href="#" onclick="return Rhodecode.comments.nextComment();"
163 163 ## id="inline-comments-counter">${_ungettext("{} Inline", "{} Inline", c.inline_cnt).format(c.inline_cnt)}
164 164 ## </a>
165 165 ## % else:
166 166 ## ${_('0 Inline')}
167 167 ## % endif
168 168 ## % endif
169 169 ##
170 170 ## % if pull_request_menu:
171 171 ## <%
172 172 ## outdated_comm_count_ver = pull_request_menu['outdated_comm_count_ver']
173 173 ## %>
174 174 ##
175 175 ## % if outdated_comm_count_ver:
176 176 ## <a href="#" onclick="showOutdated(); Rhodecode.comments.nextOutdatedComment(); return false;">
177 177 ## (${_("{} Outdated").format(outdated_comm_count_ver)})
178 178 ## </a>
179 179 ## <a href="#" class="showOutdatedComments" onclick="showOutdated(this); return false;"> | ${_('show outdated')}</a>
180 180 ## <a href="#" class="hideOutdatedComments" style="display: none" onclick="hideOutdated(this); return false;"> | ${_('hide outdated')}</a>
181 181 ## % else:
182 182 ## (${_("{} Outdated").format(outdated_comm_count_ver)})
183 183 ## % endif
184 184 ##
185 185 ## % endif
186 186 ##
187 187 ## </div>
188 188 ## </div>
189 189
190 190 </div>
191 191
192 192 % if diffset.limited_diff:
193 193 <div class="diffset-heading ${(diffset.limited_diff and 'diffset-heading-warning' or '')}">
194 194 <h2 class="clearinner">
195 195 ${_('The requested changes are too big and content was truncated.')}
196 196 <a href="${h.current_route_path(request, fulldiff=1)}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a>
197 197 </h2>
198 198 </div>
199 199 % endif
200 200
201 201 <div id="todo-box">
202 202 % if hasattr(c, 'unresolved_comments') and c.unresolved_comments:
203 203 % for co in c.unresolved_comments:
204 204 <a class="permalink" href="#comment-${co.comment_id}"
205 205 onclick="Rhodecode.comments.scrollToComment($('#comment-${co.comment_id}'))">
206 206 <i class="icon-flag-filled-red"></i>
207 207 ${co.comment_id}</a>${('' if loop.last else ',')}
208 208 % endfor
209 209 % endif
210 210 </div>
211 211 %if diffset.has_hidden_changes:
212 212 <p class="empty_data">${_('Some changes may be hidden')}</p>
213 213 %elif not diffset.files:
214 214 <p class="empty_data">${_('No files')}</p>
215 215 %endif
216 216
217 217 <div class="filediffs">
218 218
219 219 ## initial value could be marked as False later on
220 220 <% over_lines_changed_limit = False %>
221 221 %for i, filediff in enumerate(diffset.files):
222 222
223 223 %if filediff.source_file_path and filediff.target_file_path:
224 224 %if filediff.source_file_path != filediff.target_file_path:
225 225 ## file was renamed, or copied
226 226 %if RENAMED_FILENODE in filediff.patch['stats']['ops']:
227 227 <%
228 228 final_file_name = h.literal(u'{} <i class="icon-angle-left"></i> <del>{}</del>'.format(filediff.target_file_path, filediff.source_file_path))
229 229 final_path = filediff.target_file_path
230 230 %>
231 231 %elif COPIED_FILENODE in filediff.patch['stats']['ops']:
232 232 <%
233 233 final_file_name = h.literal(u'{} <i class="icon-angle-left"></i> {}'.format(filediff.target_file_path, filediff.source_file_path))
234 234 final_path = filediff.target_file_path
235 235 %>
236 236 %endif
237 237 %else:
238 238 ## file was modified
239 239 <%
240 240 final_file_name = filediff.source_file_path
241 241 final_path = final_file_name
242 242 %>
243 243 %endif
244 244 %else:
245 245 %if filediff.source_file_path:
246 246 ## file was deleted
247 247 <%
248 248 final_file_name = filediff.source_file_path
249 249 final_path = final_file_name
250 250 %>
251 251 %else:
252 252 ## file was added
253 253 <%
254 254 final_file_name = filediff.target_file_path
255 255 final_path = final_file_name
256 256 %>
257 257 %endif
258 258 %endif
259 259
260 260 <%
261 261 lines_changed = filediff.patch['stats']['added'] + filediff.patch['stats']['deleted']
262 262 over_lines_changed_limit = lines_changed > lines_changed_limit
263 263 %>
264 264 ## anchor with support of sticky header
265 265 <div class="anchor" id="a_${h.FID(filediff.raw_id, filediff.patch['filename'])}"></div>
266 266
267 267 <input ${(collapse_all and 'checked' or '')} class="filediff-collapse-state collapse-${diffset_container_id}" id="filediff-collapse-${id(filediff)}" type="checkbox" onchange="updateSticky();">
268 268 <div
269 269 class="filediff"
270 270 data-f-path="${filediff.patch['filename']}"
271 271 data-anchor-id="${h.FID(filediff.raw_id, filediff.patch['filename'])}"
272 272 >
273 273 <label for="filediff-collapse-${id(filediff)}" class="filediff-heading">
274 274 <%
275 275 file_comments = (get_inline_comments(inline_comments, filediff.patch['filename']) or {}).values()
276 276 total_file_comments = [_c for _c in h.itertools.chain.from_iterable(file_comments) if not (_c.outdated or _c.draft)]
277 277 %>
278 278 <div class="filediff-collapse-indicator icon-"></div>
279 279
280 280 ## Comments/Options PILL
281 281 <span class="pill-group pull-right">
282 282 <span class="pill" op="comments">
283 283 <i class="icon-comment"></i> ${len(total_file_comments)}
284 284 </span>
285 285
286 286 <details class="details-reset details-inline-block">
287 287 <summary class="noselect">
288 288 <i class="pill icon-options cursor-pointer" op="options"></i>
289 289 </summary>
290 290 <details-menu class="details-dropdown">
291 291
292 292 <div class="dropdown-item">
293 293 <span>${final_path}</span>
294 294 <span class="pull-right icon-clipboard clipboard-action" data-clipboard-text="${final_path}" title="Copy file path"></span>
295 295 </div>
296 296
297 297 <div class="dropdown-divider"></div>
298 298
299 299 <div class="dropdown-item">
300 300 <% permalink = request.current_route_url(_anchor='a_{}'.format(h.FID(filediff.raw_id, filediff.patch['filename']))) %>
301 301 <a href="${permalink}">ΒΆ permalink</a>
302 302 <span class="pull-right icon-clipboard clipboard-action" data-clipboard-text="${permalink}" title="Copy permalink"></span>
303 303 </div>
304 304
305 305
306 306 </details-menu>
307 307 </details>
308 308
309 309 </span>
310 310
311 311 ${diff_ops(final_file_name, filediff)}
312 312
313 313 </label>
314 314
315 315 ${diff_menu(filediff, use_comments=use_comments)}
316 316 <table id="file-${h.safeid(h.safe_unicode(filediff.patch['filename']))}" data-f-path="${filediff.patch['filename']}" data-anchor-id="${h.FID(filediff.raw_id, filediff.patch['filename'])}" class="code-visible-block cb cb-diff-${c.user_session_attrs["diffmode"]} code-highlight ${(over_lines_changed_limit and 'cb-collapsed' or '')}">
317 317
318 318 ## new/deleted/empty content case
319 319 % if not filediff.hunks:
320 320 ## Comment container, on "fakes" hunk that contains all data to render comments
321 321 ${render_hunk_lines(filediff, c.user_session_attrs["diffmode"], filediff.hunk_ops, use_comments=use_comments, inline_comments=inline_comments, active_pattern_entries=active_pattern_entries)}
322 322 % endif
323 323
324 324 %if filediff.limited_diff:
325 325 <tr class="cb-warning cb-collapser">
326 326 <td class="cb-text" ${(c.user_session_attrs["diffmode"] == 'unified' and 'colspan=4' or 'colspan=6')}>
327 327 ${_('The requested commit or file is too big and content was truncated.')} <a href="${h.current_route_path(request, fulldiff=1)}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a>
328 328 </td>
329 329 </tr>
330 330 %else:
331 331 %if over_lines_changed_limit:
332 332 <tr class="cb-warning cb-collapser">
333 333 <td class="cb-text" ${(c.user_session_attrs["diffmode"] == 'unified' and 'colspan=4' or 'colspan=6')}>
334 334 ${_('This diff has been collapsed as it changes many lines, (%i lines changed)' % lines_changed)}
335 335 <a href="#" class="cb-expand"
336 336 onclick="$(this).closest('table').removeClass('cb-collapsed'); updateSticky(); return false;">${_('Show them')}
337 337 </a>
338 338 <a href="#" class="cb-collapse"
339 339 onclick="$(this).closest('table').addClass('cb-collapsed'); updateSticky(); return false;">${_('Hide them')}
340 340 </a>
341 341 </td>
342 342 </tr>
343 343 %endif
344 344 %endif
345 345
346 346 % for hunk in filediff.hunks:
347 347 <tr class="cb-hunk">
348 348 <td ${(c.user_session_attrs["diffmode"] == 'unified' and 'colspan=3' or '')}>
349 349 ## TODO: dan: add ajax loading of more context here
350 350 ## <a href="#">
351 351 <i class="icon-more"></i>
352 352 ## </a>
353 353 </td>
354 354 <td ${(c.user_session_attrs["diffmode"] == 'sideside' and 'colspan=5' or '')}>
355 355 @@
356 356 -${hunk.source_start},${hunk.source_length}
357 357 +${hunk.target_start},${hunk.target_length}
358 358 ${hunk.section_header}
359 359 </td>
360 360 </tr>
361 361
362 362 ${render_hunk_lines(filediff, c.user_session_attrs["diffmode"], hunk, use_comments=use_comments, inline_comments=inline_comments, active_pattern_entries=active_pattern_entries)}
363 363 % endfor
364 364
365 365 <% unmatched_comments = (inline_comments or {}).get(filediff.patch['filename'], {}) %>
366 366
367 367 ## outdated comments that do not fit into currently displayed lines
368 368 % for lineno, comments in unmatched_comments.items():
369 369
370 370 %if c.user_session_attrs["diffmode"] == 'unified':
371 371 % if loop.index == 0:
372 372 <tr class="cb-hunk">
373 373 <td colspan="3"></td>
374 374 <td>
375 375 <div>
376 376 ${_('Unmatched/outdated inline comments below')}
377 377 </div>
378 378 </td>
379 379 </tr>
380 380 % endif
381 381 <tr class="cb-line">
382 382 <td class="cb-data cb-context"></td>
383 383 <td class="cb-lineno cb-context"></td>
384 384 <td class="cb-lineno cb-context"></td>
385 385 <td class="cb-content cb-context">
386 386 ${inline_comments_container(comments, active_pattern_entries=active_pattern_entries)}
387 387 </td>
388 388 </tr>
389 389 %elif c.user_session_attrs["diffmode"] == 'sideside':
390 390 % if loop.index == 0:
391 391 <tr class="cb-comment-info">
392 392 <td colspan="2"></td>
393 393 <td class="cb-line">
394 394 <div>
395 395 ${_('Unmatched/outdated inline comments below')}
396 396 </div>
397 397 </td>
398 398 <td colspan="2"></td>
399 399 <td class="cb-line">
400 400 <div>
401 401 ${_('Unmatched/outdated comments below')}
402 402 </div>
403 403 </td>
404 404 </tr>
405 405 % endif
406 406 <tr class="cb-line">
407 407 <td class="cb-data cb-context"></td>
408 408 <td class="cb-lineno cb-context"></td>
409 409 <td class="cb-content cb-context">
410 410 % if lineno.startswith('o'):
411 411 ${inline_comments_container(comments, active_pattern_entries=active_pattern_entries)}
412 412 % endif
413 413 </td>
414 414
415 415 <td class="cb-data cb-context"></td>
416 416 <td class="cb-lineno cb-context"></td>
417 417 <td class="cb-content cb-context">
418 418 % if lineno.startswith('n'):
419 419 ${inline_comments_container(comments, active_pattern_entries=active_pattern_entries)}
420 420 % endif
421 421 </td>
422 422 </tr>
423 423 %endif
424 424
425 425 % endfor
426 426
427 427 </table>
428 428 </div>
429 429 %endfor
430 430
431 431 ## outdated comments that are made for a file that has been deleted
432 432 % for filename, comments_dict in (deleted_files_comments or {}).items():
433 433
434 434 <%
435 435 display_state = 'display: none'
436 436 open_comments_in_file = [x for x in comments_dict['comments'] if x.outdated is False]
437 437 if open_comments_in_file:
438 438 display_state = ''
439 439 fid = str(id(filename))
440 440 %>
441 441 <div class="filediffs filediff-outdated" style="${display_state}">
442 442 <input ${(collapse_all and 'checked' or '')} class="filediff-collapse-state collapse-${diffset_container_id}" id="filediff-collapse-${id(filename)}" type="checkbox" onchange="updateSticky();">
443 443 <div class="filediff" data-f-path="${filename}" id="a_${h.FID(fid, filename)}">
444 444 <label for="filediff-collapse-${id(filename)}" class="filediff-heading">
445 445 <div class="filediff-collapse-indicator icon-"></div>
446 446
447 447 <span class="pill">
448 448 ## file was deleted
449 449 ${filename}
450 450 </span>
451 451 <span class="pill-group pull-left" >
452 452 ## file op, doesn't need translation
453 453 <span class="pill" op="removed">unresolved comments</span>
454 454 </span>
455 455 <a class="pill filediff-anchor" href="#a_${h.FID(fid, filename)}">ΒΆ</a>
456 456 <span class="pill-group pull-right">
457 457 <span class="pill" op="deleted">
458 458 % if comments_dict['stats'] >0:
459 459 -${comments_dict['stats']}
460 460 % else:
461 461 ${comments_dict['stats']}
462 462 % endif
463 463 </span>
464 464 </span>
465 465 </label>
466 466
467 467 <table class="cb cb-diff-${c.user_session_attrs["diffmode"]} code-highlight ${(over_lines_changed_limit and 'cb-collapsed' or '')}">
468 468 <tr>
469 469 % if c.user_session_attrs["diffmode"] == 'unified':
470 470 <td></td>
471 471 %endif
472 472
473 473 <td></td>
474 474 <td class="cb-text cb-${op_class(BIN_FILENODE)}" ${(c.user_session_attrs["diffmode"] == 'unified' and 'colspan=4' or 'colspan=5')}>
475 475 <strong>${_('This file was removed from diff during updates to this pull-request.')}</strong><br/>
476 476 ${_('There are still outdated/unresolved comments attached to it.')}
477 477 </td>
478 478 </tr>
479 479 %if c.user_session_attrs["diffmode"] == 'unified':
480 480 <tr class="cb-line">
481 481 <td class="cb-data cb-context"></td>
482 482 <td class="cb-lineno cb-context"></td>
483 483 <td class="cb-lineno cb-context"></td>
484 484 <td class="cb-content cb-context">
485 485 ${inline_comments_container(comments_dict['comments'], active_pattern_entries=active_pattern_entries)}
486 486 </td>
487 487 </tr>
488 488 %elif c.user_session_attrs["diffmode"] == 'sideside':
489 489 <tr class="cb-line">
490 490 <td class="cb-data cb-context"></td>
491 491 <td class="cb-lineno cb-context"></td>
492 492 <td class="cb-content cb-context"></td>
493 493
494 494 <td class="cb-data cb-context"></td>
495 495 <td class="cb-lineno cb-context"></td>
496 496 <td class="cb-content cb-context">
497 497 ${inline_comments_container(comments_dict['comments'], active_pattern_entries=active_pattern_entries)}
498 498 </td>
499 499 </tr>
500 500 %endif
501 501 </table>
502 502 </div>
503 503 </div>
504 504 % endfor
505 505
506 506 </div>
507 507 </div>
508 508 </%def>
509 509
510 510 <%def name="diff_ops(file_name, filediff)">
511 511 <%
512 512 from rhodecode.lib.diffs import NEW_FILENODE, DEL_FILENODE, \
513 513 MOD_FILENODE, RENAMED_FILENODE, CHMOD_FILENODE, BIN_FILENODE, COPIED_FILENODE
514 514 %>
515 515 <span class="pill">
516 516 <i class="icon-file-text"></i>
517 517 ${file_name}
518 518 </span>
519 519
520 520 <span class="pill-group pull-right">
521 521
522 522 ## ops pills
523 523 %if filediff.limited_diff:
524 524 <span class="pill tooltip" op="limited" title="The stats for this diff are not complete">limited diff</span>
525 525 %endif
526 526
527 527 %if NEW_FILENODE in filediff.patch['stats']['ops']:
528 528 <span class="pill" op="created">created</span>
529 529 %if filediff['target_mode'].startswith('120'):
530 530 <span class="pill" op="symlink">symlink</span>
531 531 %else:
532 532 <span class="pill" op="mode">${nice_mode(filediff['target_mode'])}</span>
533 533 %endif
534 534 %endif
535 535
536 536 %if RENAMED_FILENODE in filediff.patch['stats']['ops']:
537 537 <span class="pill" op="renamed">renamed</span>
538 538 %endif
539 539
540 540 %if COPIED_FILENODE in filediff.patch['stats']['ops']:
541 541 <span class="pill" op="copied">copied</span>
542 542 %endif
543 543
544 544 %if DEL_FILENODE in filediff.patch['stats']['ops']:
545 545 <span class="pill" op="removed">removed</span>
546 546 %endif
547 547
548 548 %if CHMOD_FILENODE in filediff.patch['stats']['ops']:
549 549 <span class="pill" op="mode">
550 550 ${nice_mode(filediff['source_mode'])} ➑ ${nice_mode(filediff['target_mode'])}
551 551 </span>
552 552 %endif
553 553
554 554 %if BIN_FILENODE in filediff.patch['stats']['ops']:
555 555 <span class="pill" op="binary">binary</span>
556 556 %if MOD_FILENODE in filediff.patch['stats']['ops']:
557 557 <span class="pill" op="modified">modified</span>
558 558 %endif
559 559 %endif
560 560
561 561 <span class="pill" op="added">${('+' if filediff.patch['stats']['added'] else '')}${filediff.patch['stats']['added']}</span>
562 562 <span class="pill" op="deleted">${((h.safe_int(filediff.patch['stats']['deleted']) or 0) * -1)}</span>
563 563
564 564 </span>
565 565
566 566 </%def>
567 567
568 568 <%def name="nice_mode(filemode)">
569 569 ${(filemode.startswith('100') and filemode[3:] or filemode)}
570 570 </%def>
571 571
572 572 <%def name="diff_menu(filediff, use_comments=False)">
573 573 <div class="filediff-menu">
574 574
575 575 %if filediff.diffset.source_ref:
576 576
577 577 ## FILE BEFORE CHANGES
578 578 %if filediff.operation in ['D', 'M']:
579 579 <a
580 580 class="tooltip"
581 581 href="${h.route_path('repo_files',repo_name=filediff.diffset.target_repo_name,commit_id=filediff.diffset.source_ref,f_path=filediff.source_file_path)}"
582 582 title="${h.tooltip(_('Show file at commit: %(commit_id)s') % {'commit_id': filediff.diffset.source_ref[:12]})}"
583 583 >
584 584 ${_('Show file before')}
585 585 </a> |
586 586 %else:
587 587 <span
588 588 class="tooltip"
589 589 title="${h.tooltip(_('File not present at commit: %(commit_id)s') % {'commit_id': filediff.diffset.source_ref[:12]})}"
590 590 >
591 591 ${_('Show file before')}
592 592 </span> |
593 593 %endif
594 594
595 595 ## FILE AFTER CHANGES
596 596 %if filediff.operation in ['A', 'M']:
597 597 <a
598 598 class="tooltip"
599 599 href="${h.route_path('repo_files',repo_name=filediff.diffset.source_repo_name,commit_id=filediff.diffset.target_ref,f_path=filediff.target_file_path)}"
600 600 title="${h.tooltip(_('Show file at commit: %(commit_id)s') % {'commit_id': filediff.diffset.target_ref[:12]})}"
601 601 >
602 602 ${_('Show file after')}
603 603 </a>
604 604 %else:
605 605 <span
606 606 class="tooltip"
607 607 title="${h.tooltip(_('File not present at commit: %(commit_id)s') % {'commit_id': filediff.diffset.target_ref[:12]})}"
608 608 >
609 609 ${_('Show file after')}
610 610 </span>
611 611 %endif
612 612
613 613 % if use_comments:
614 614 |
615 615 <a href="#" onclick="Rhodecode.comments.toggleDiffComments(this);return toggleElement(this)"
616 616 data-toggle-on="${_('Hide comments')}"
617 617 data-toggle-off="${_('Show comments')}">
618 618 <span class="hide-comment-button">${_('Hide comments')}</span>
619 619 </a>
620 620 % endif
621 621
622 622 %endif
623 623
624 624 </div>
625 625 </%def>
626 626
627 627
628 628 <%def name="inline_comments_container(comments, active_pattern_entries=None, line_no='', f_path='')">
629 629
630 630 <div class="inline-comments">
631 631 %for comment in comments:
632 632 ${commentblock.comment_block(comment, inline=True, active_pattern_entries=active_pattern_entries)}
633 633 %endfor
634 634
635 635 <%
636 636 extra_class = ''
637 637 extra_style = ''
638 638
639 639 if comments and comments[-1].outdated_at_version(c.at_version_num):
640 640 extra_class = ' comment-outdated'
641 641 extra_style = 'display: none;'
642 642
643 643 %>
644 644
645 645 <div class="reply-thread-container-wrapper${extra_class}" style="${extra_style}">
646 646 <div class="reply-thread-container${extra_class}">
647 647 <div class="reply-thread-gravatar">
648 648 % if c.rhodecode_user.username != h.DEFAULT_USER:
649 649 ${base.gravatar(c.rhodecode_user.email, 20, tooltip=True, user=c.rhodecode_user)}
650 650 % endif
651 651 </div>
652 652
653 653 <div class="reply-thread-reply-button">
654 654 % if c.rhodecode_user.username != h.DEFAULT_USER:
655 655 ## initial reply button, some JS logic can append here a FORM to leave a first comment.
656 656 <button class="cb-comment-add-button" onclick="return Rhodecode.comments.createComment(this, '${f_path}', '${line_no}', null)">Reply...</button>
657 657 % endif
658 658 </div>
659 659 ##% endif
660 660 <div class="reply-thread-last"></div>
661 661 </div>
662 662 </div>
663 663 </div>
664 664
665 665 </%def>
666 666
667 667 <%!
668 668
669 669 def get_inline_comments(comments, filename):
670 670 if hasattr(filename, 'unicode_path'):
671 671 filename = filename.unicode_path
672 672
673 673 if not isinstance(filename, (unicode, str)):
674 674 return None
675 675
676 676 if comments and filename in comments:
677 677 return comments[filename]
678 678
679 679 return None
680 680
681 681 def get_comments_for(diff_type, comments, filename, line_version, line_number):
682 682 if hasattr(filename, 'unicode_path'):
683 683 filename = filename.unicode_path
684 684
685 685 if not isinstance(filename, (unicode, str)):
686 686 return None
687 687
688 688 file_comments = get_inline_comments(comments, filename)
689 689 if file_comments is None:
690 690 return None
691 691
692 692 line_key = '{}{}'.format(line_version, line_number) ## e.g o37, n12
693 693 if line_key in file_comments:
694 694 data = file_comments.pop(line_key)
695 695 return data
696 696 %>
697 697
698 698 <%def name="render_hunk_lines_sideside(filediff, hunk, use_comments=False, inline_comments=None, active_pattern_entries=None)">
699 699
700 700 <% chunk_count = 1 %>
701 701 %for loop_obj, item in h.looper(hunk.sideside):
702 702 <%
703 703 line = item
704 704 i = loop_obj.index
705 705 prev_line = loop_obj.previous
706 706 old_line_anchor, new_line_anchor = None, None
707 707
708 708 if line.original.lineno:
709 709 old_line_anchor = diff_line_anchor(filediff.raw_id, hunk.source_file_path, line.original.lineno, 'o')
710 710 if line.modified.lineno:
711 711 new_line_anchor = diff_line_anchor(filediff.raw_id, hunk.target_file_path, line.modified.lineno, 'n')
712 712
713 713 line_action = line.modified.action or line.original.action
714 714 prev_line_action = prev_line and (prev_line.modified.action or prev_line.original.action)
715 715 %>
716 716
717 717 <tr class="cb-line">
718 718 <td class="cb-data ${action_class(line.original.action)}"
719 719 data-line-no="${line.original.lineno}"
720 720 >
721 721
722 722 <% line_old_comments, line_old_comments_no_drafts = None, None %>
723 723 %if line.original.get_comment_args:
724 724 <%
725 725 line_old_comments = get_comments_for('side-by-side', inline_comments, *line.original.get_comment_args)
726 726 line_old_comments_no_drafts = [c for c in line_old_comments if not c.draft] if line_old_comments else []
727 727 has_outdated = any([x.outdated for x in line_old_comments_no_drafts])
728 728 %>
729 729 %endif
730 730 %if line_old_comments_no_drafts:
731 731 % if has_outdated:
732 732 <i class="tooltip toggle-comment-action icon-comment-toggle" title="${_('Comments including outdated: {}. Click here to toggle them.').format(len(line_old_comments_no_drafts))}" onclick="return Rhodecode.comments.toggleLineComments(this)"></i>
733 733 % else:
734 734 <i class="tooltip toggle-comment-action icon-comment" title="${_('Comments: {}. Click to toggle them.').format(len(line_old_comments_no_drafts))}" onclick="return Rhodecode.comments.toggleLineComments(this)"></i>
735 735 % endif
736 736 %endif
737 737 </td>
738 738 <td class="cb-lineno ${action_class(line.original.action)}"
739 739 data-line-no="${line.original.lineno}"
740 740 %if old_line_anchor:
741 741 id="${old_line_anchor}"
742 742 %endif
743 743 >
744 744 %if line.original.lineno:
745 745 <a name="${old_line_anchor}" href="#${old_line_anchor}">${line.original.lineno}</a>
746 746 %endif
747 747 </td>
748 748
749 749 <% line_no = 'o{}'.format(line.original.lineno) %>
750 750 <td class="cb-content ${action_class(line.original.action)}"
751 751 data-line-no="${line_no}"
752 752 >
753 753 %if use_comments and line.original.lineno:
754 754 ${render_add_comment_button(line_no=line_no, f_path=filediff.patch['filename'])}
755 755 %endif
756 756 <span class="cb-code"><span class="cb-action ${action_class(line.original.action)}"></span>${line.original.content or '' | n}</span>
757 757
758 758 %if use_comments and line.original.lineno and line_old_comments:
759 759 ${inline_comments_container(line_old_comments, active_pattern_entries=active_pattern_entries, line_no=line_no, f_path=filediff.patch['filename'])}
760 760 %endif
761 761
762 762 </td>
763 763 <td class="cb-data ${action_class(line.modified.action)}"
764 764 data-line-no="${line.modified.lineno}"
765 765 >
766 766 <div>
767 767
768 768 <% line_new_comments, line_new_comments_no_drafts = None, None %>
769 769 %if line.modified.get_comment_args:
770 770 <%
771 771 line_new_comments = get_comments_for('side-by-side', inline_comments, *line.modified.get_comment_args)
772 772 line_new_comments_no_drafts = [c for c in line_new_comments if not c.draft] if line_new_comments else []
773 773 has_outdated = any([x.outdated for x in line_new_comments_no_drafts])
774 774 %>
775 775 %endif
776 776
777 777 %if line_new_comments_no_drafts:
778 778 % if has_outdated:
779 779 <i class="tooltip toggle-comment-action icon-comment-toggle" title="${_('Comments including outdated: {}. Click here to toggle them.').format(len(line_new_comments_no_drafts))}" onclick="return Rhodecode.comments.toggleLineComments(this)"></i>
780 780 % else:
781 781 <i class="tooltip toggle-comment-action icon-comment" title="${_('Comments: {}. Click to toggle them.').format(len(line_new_comments_no_drafts))}" onclick="return Rhodecode.comments.toggleLineComments(this)"></i>
782 782 % endif
783 783 %endif
784 784 </div>
785 785 </td>
786 786 <td class="cb-lineno ${action_class(line.modified.action)}"
787 787 data-line-no="${line.modified.lineno}"
788 788 %if new_line_anchor:
789 789 id="${new_line_anchor}"
790 790 %endif
791 791 >
792 792 %if line.modified.lineno:
793 793 <a name="${new_line_anchor}" href="#${new_line_anchor}">${line.modified.lineno}</a>
794 794 %endif
795 795 </td>
796 796
797 797 <% line_no = 'n{}'.format(line.modified.lineno) %>
798 798 <td class="cb-content ${action_class(line.modified.action)}"
799 799 data-line-no="${line_no}"
800 800 >
801 801 %if use_comments and line.modified.lineno:
802 802 ${render_add_comment_button(line_no=line_no, f_path=filediff.patch['filename'])}
803 803 %endif
804 804 <span class="cb-code"><span class="cb-action ${action_class(line.modified.action)}"></span>${line.modified.content or '' | n}</span>
805 805 % if line_action in ['+', '-'] and prev_line_action not in ['+', '-']:
806 806 <div class="nav-chunk" style="visibility: hidden">
807 807 <i class="icon-eye" title="viewing diff hunk-${hunk.index}-${chunk_count}"></i>
808 808 </div>
809 809 <% chunk_count +=1 %>
810 810 % endif
811 811 %if use_comments and line.modified.lineno and line_new_comments:
812 812 ${inline_comments_container(line_new_comments, active_pattern_entries=active_pattern_entries, line_no=line_no, f_path=filediff.patch['filename'])}
813 813 %endif
814 814
815 815 </td>
816 816 </tr>
817 817 %endfor
818 818 </%def>
819 819
820 820
821 821 <%def name="render_hunk_lines_unified(filediff, hunk, use_comments=False, inline_comments=None, active_pattern_entries=None)">
822 822 %for old_line_no, new_line_no, action, content, comments_args in hunk.unified:
823 823
824 824 <%
825 825 old_line_anchor, new_line_anchor = None, None
826 826 if old_line_no:
827 827 old_line_anchor = diff_line_anchor(filediff.raw_id, hunk.source_file_path, old_line_no, 'o')
828 828 if new_line_no:
829 829 new_line_anchor = diff_line_anchor(filediff.raw_id, hunk.target_file_path, new_line_no, 'n')
830 830 %>
831 831 <tr class="cb-line">
832 832 <td class="cb-data ${action_class(action)}">
833 833 <div>
834 834
835 835 <% comments, comments_no_drafts = None, None %>
836 836 %if comments_args:
837 837 <%
838 838 comments = get_comments_for('unified', inline_comments, *comments_args)
839 839 comments_no_drafts = [c for c in line_new_comments if not c.draft] if line_new_comments else []
840 840 has_outdated = any([x.outdated for x in comments_no_drafts])
841 841 %>
842 842 %endif
843 843
844 844 % if comments_no_drafts:
845 845 % if has_outdated:
846 846 <i class="tooltip toggle-comment-action icon-comment-toggle" title="${_('Comments including outdated: {}. Click here to toggle them.').format(len(comments_no_drafts))}" onclick="return Rhodecode.comments.toggleLineComments(this)"></i>
847 847 % else:
848 848 <i class="tooltip toggle-comment-action icon-comment" title="${_('Comments: {}. Click to toggle them.').format(len(comments_no_drafts))}" onclick="return Rhodecode.comments.toggleLineComments(this)"></i>
849 849 % endif
850 850 % endif
851 851 </div>
852 852 </td>
853 853 <td class="cb-lineno ${action_class(action)}"
854 854 data-line-no="${old_line_no}"
855 855 %if old_line_anchor:
856 856 id="${old_line_anchor}"
857 857 %endif
858 858 >
859 859 %if old_line_anchor:
860 860 <a name="${old_line_anchor}" href="#${old_line_anchor}">${old_line_no}</a>
861 861 %endif
862 862 </td>
863 863 <td class="cb-lineno ${action_class(action)}"
864 864 data-line-no="${new_line_no}"
865 865 %if new_line_anchor:
866 866 id="${new_line_anchor}"
867 867 %endif
868 868 >
869 869 %if new_line_anchor:
870 870 <a name="${new_line_anchor}" href="#${new_line_anchor}">${new_line_no}</a>
871 871 %endif
872 872 </td>
873 873 <% line_no = '{}{}'.format(new_line_no and 'n' or 'o', new_line_no or old_line_no) %>
874 874 <td class="cb-content ${action_class(action)}"
875 875 data-line-no="${line_no}"
876 876 >
877 877 %if use_comments:
878 878 ${render_add_comment_button(line_no=line_no, f_path=filediff.patch['filename'])}
879 879 %endif
880 880 <span class="cb-code"><span class="cb-action ${action_class(action)}"></span> ${content or '' | n}</span>
881 881 %if use_comments and comments:
882 882 ${inline_comments_container(comments, active_pattern_entries=active_pattern_entries, line_no=line_no, f_path=filediff.patch['filename'])}
883 883 %endif
884 884 </td>
885 885 </tr>
886 886 %endfor
887 887 </%def>
888 888
889 889
890 890 <%def name="render_hunk_lines(filediff, diff_mode, hunk, use_comments, inline_comments, active_pattern_entries)">
891 891 % if diff_mode == 'unified':
892 892 ${render_hunk_lines_unified(filediff, hunk, use_comments=use_comments, inline_comments=inline_comments, active_pattern_entries=active_pattern_entries)}
893 893 % elif diff_mode == 'sideside':
894 894 ${render_hunk_lines_sideside(filediff, hunk, use_comments=use_comments, inline_comments=inline_comments, active_pattern_entries=active_pattern_entries)}
895 895 % else:
896 896 <tr class="cb-line">
897 897 <td>unknown diff mode</td>
898 898 </tr>
899 899 % endif
900 900 </%def>file changes
901 901
902 902
903 903 <%def name="render_add_comment_button(line_no='', f_path='')">
904 904 % if not c.rhodecode_user.is_default:
905 905 <button class="btn btn-small btn-primary cb-comment-box-opener" onclick="return Rhodecode.comments.createComment(this, '${f_path}', '${line_no}', null)">
906 906 <span><i class="icon-comment"></i></span>
907 907 </button>
908 908 % endif
909 909 </%def>
910 910
911 911 <%def name="render_diffset_menu(diffset, range_diff_on=None, commit=None, pull_request_menu=None)">
912 912 <% diffset_container_id = h.md5(diffset.target_ref) %>
913 913
914 914 <div id="diff-file-sticky" class="diffset-menu clearinner">
915 915 ## auto adjustable
916 916 <div class="sidebar__inner">
917 917 <div class="sidebar__bar">
918 918 <div class="pull-right">
919 919 <div class="btn-group">
920 920 <a class="btn tooltip toggle-wide-diff" href="#toggle-wide-diff" onclick="toggleWideDiff(this); return false" title="${h.tooltip(_('Toggle wide diff'))}">
921 921 <i class="icon-wide-mode"></i>
922 922 </a>
923 923 </div>
924 924 <div class="btn-group">
925 925
926 926 <a
927 927 class="btn ${(c.user_session_attrs["diffmode"] == 'sideside' and 'btn-active')} tooltip"
928 928 title="${h.tooltip(_('View diff as side by side'))}"
929 929 href="${h.current_route_path(request, diffmode='sideside')}">
930 930 <span>${_('Side by Side')}</span>
931 931 </a>
932 932
933 933 <a
934 934 class="btn ${(c.user_session_attrs["diffmode"] == 'unified' and 'btn-active')} tooltip"
935 935 title="${h.tooltip(_('View diff as unified'))}" href="${h.current_route_path(request, diffmode='unified')}">
936 936 <span>${_('Unified')}</span>
937 937 </a>
938 938
939 939 % if range_diff_on is True:
940 940 <a
941 941 title="${_('Turn off: Show the diff as commit range')}"
942 942 class="btn btn-primary"
943 943 href="${h.current_route_path(request, **{"range-diff":"0"})}">
944 944 <span>${_('Range Diff')}</span>
945 945 </a>
946 946 % elif range_diff_on is False:
947 947 <a
948 948 title="${_('Show the diff as commit range')}"
949 949 class="btn"
950 950 href="${h.current_route_path(request, **{"range-diff":"1"})}">
951 951 <span>${_('Range Diff')}</span>
952 952 </a>
953 953 % endif
954 954 </div>
955 955 <div class="btn-group">
956 956
957 <div class="pull-left">
958 ${h.hidden('diff_menu_{}'.format(diffset_container_id))}
957 <details class="details-reset details-inline-block">
958 <summary class="noselect btn">
959 <i class="icon-options cursor-pointer" op="options"></i>
960 </summary>
961
962 <div>
963 <details-menu class="details-dropdown" style="top: 35px;">
964
965 <div class="dropdown-item">
966 <div style="padding: 2px 0px">
967 % if request.GET.get('ignorews', '') == '1':
968 <a href="${h.current_route_path(request, ignorews=0)}">${_('Show whitespace changes')}</a>
969 % else:
970 <a href="${h.current_route_path(request, ignorews=1)}">${_('Hide whitespace changes')}</a>
971 % endif
959 972 </div>
973 </div>
974
975 <div class="dropdown-item">
976 <div style="padding: 2px 0px">
977 % if request.GET.get('fullcontext', '') == '1':
978 <a href="${h.current_route_path(request, fullcontext=0)}">${_('Hide full context diff')}</a>
979 % else:
980 <a href="${h.current_route_path(request, fullcontext=1)}">${_('Show full context diff')}</a>
981 % endif
982 </div>
983 </div>
984
985 </details-menu>
986 </div>
987 </details>
960 988
961 989 </div>
962 990 </div>
963 991 <div class="pull-left">
964 992 <div class="btn-group">
965 993 <div class="pull-left">
966 994 ${h.hidden('file_filter_{}'.format(diffset_container_id))}
967 995 </div>
968 996
969 997 </div>
970 998 </div>
971 999 </div>
972 1000 <div class="fpath-placeholder pull-left">
973 1001 <i class="icon-file-text"></i>
974 1002 <strong class="fpath-placeholder-text">
975 1003 Context file:
976 1004 </strong>
977 1005 </div>
978 1006 <div class="pull-right noselect">
979 1007
980 1008 %if commit:
981 1009 <span>
982 1010 <code>${h.show_id(commit)}</code>
983 1011 </span>
984 1012 %elif pull_request_menu and pull_request_menu.get('pull_request'):
985 1013 <span>
986 1014 <code>!${pull_request_menu['pull_request'].pull_request_id}</code>
987 1015 </span>
988 1016 %endif
989 1017 % if commit or pull_request_menu:
990 1018 <span class="tooltip" title="Navigate to previous or next change inside files." id="diff_nav">Loading diff...:</span>
991 1019 <span class="cursor-pointer" onclick="scrollToPrevChunk(); return false">
992 1020 <i class="icon-angle-up"></i>
993 1021 </span>
994 1022 <span class="cursor-pointer" onclick="scrollToNextChunk(); return false">
995 1023 <i class="icon-angle-down"></i>
996 1024 </span>
997 1025 % endif
998 1026 </div>
999 1027 <div class="sidebar_inner_shadow"></div>
1000 1028 </div>
1001 1029 </div>
1002 1030
1003 1031 % if diffset:
1004 1032 %if diffset.limited_diff:
1005 1033 <% file_placeholder = _ungettext('%(num)s file changed', '%(num)s files changed', diffset.changed_files) % {'num': diffset.changed_files} %>
1006 1034 %else:
1007 1035 <% file_placeholder = h.literal(_ungettext('%(num)s file changed: <span class="op-added">%(linesadd)s inserted</span>, <span class="op-deleted">%(linesdel)s deleted</span>', '%(num)s files changed: <span class="op-added">%(linesadd)s inserted</span>, <span class="op-deleted">%(linesdel)s deleted</span>',
1008 1036 diffset.changed_files) % {'num': diffset.changed_files, 'linesadd': diffset.lines_added, 'linesdel': diffset.lines_deleted}) %>
1009 1037
1010 1038 %endif
1011 1039 ## case on range-diff placeholder needs to be updated
1012 1040 % if range_diff_on is True:
1013 1041 <% file_placeholder = _('Disabled on range diff') %>
1014 1042 % endif
1015 1043
1016 1044 <script type="text/javascript">
1017 1045 var feedFilesOptions = function (query, initialData) {
1018 1046 var data = {results: []};
1019 1047 var isQuery = typeof query.term !== 'undefined';
1020 1048
1021 1049 var section = _gettext('Changed files');
1022 1050 var filteredData = [];
1023 1051
1024 1052 //filter results
1025 1053 $.each(initialData.results, function (idx, value) {
1026 1054
1027 1055 if (!isQuery || query.term.length === 0 || value.text.toUpperCase().indexOf(query.term.toUpperCase()) >= 0) {
1028 1056 filteredData.push({
1029 1057 'id': this.id,
1030 1058 'text': this.text,
1031 1059 "ops": this.ops,
1032 1060 })
1033 1061 }
1034 1062
1035 1063 });
1036 1064
1037 1065 data.results = filteredData;
1038 1066
1039 1067 query.callback(data);
1040 1068 };
1041 1069
1042 1070 var selectionFormatter = function(data, escapeMarkup) {
1043 1071 var container = '<div class="filelist" style="padding-right:100px">{0}</div>';
1044 1072 var tmpl = '<div><strong>{0}</strong></div>'.format(escapeMarkup(data['text']));
1045 1073 var pill = '<div class="pill-group" style="position: absolute; top:7px; right: 0">' +
1046 1074 '<span class="pill" op="added">{0}</span>' +
1047 1075 '<span class="pill" op="deleted">{1}</span>' +
1048 1076 '</div>'
1049 1077 ;
1050 1078 var added = data['ops']['added'];
1051 1079 if (added === 0) {
1052 1080 // don't show +0
1053 1081 added = 0;
1054 1082 } else {
1055 1083 added = '+' + added;
1056 1084 }
1057 1085
1058 1086 var deleted = -1*data['ops']['deleted'];
1059 1087
1060 1088 tmpl += pill.format(added, deleted);
1061 1089 return container.format(tmpl);
1062 1090 };
1063 1091 var formatFileResult = function(result, container, query, escapeMarkup) {
1064 1092 return selectionFormatter(result, escapeMarkup);
1065 1093 };
1066 1094
1067 1095 var formatSelection = function (data, container) {
1068 1096 return '${file_placeholder}'
1069 1097 };
1070 1098
1071 1099 if (window.preloadFileFilterData === undefined) {
1072 1100 window.preloadFileFilterData = {}
1073 1101 }
1074 1102
1075 1103 preloadFileFilterData["${diffset_container_id}"] = {
1076 1104 results: [
1077 1105 % for filediff in diffset.files:
1078 1106 {id:"a_${h.FID(filediff.raw_id, filediff.patch['filename'])}",
1079 1107 text:"${filediff.patch['filename']}",
1080 1108 ops:${h.json.dumps(filediff.patch['stats'])|n}}${('' if loop.last else ',')}
1081 1109 % endfor
1082 1110 ]
1083 1111 };
1084 1112
1085 1113 var diffFileFilterId = "#file_filter_" + "${diffset_container_id}";
1086 1114 var diffFileFilter = $(diffFileFilterId).select2({
1087 1115 'dropdownAutoWidth': true,
1088 1116 'width': 'auto',
1089 1117
1090 1118 containerCssClass: "drop-menu",
1091 1119 dropdownCssClass: "drop-menu-dropdown",
1092 1120 data: preloadFileFilterData["${diffset_container_id}"],
1093 1121 query: function(query) {
1094 1122 feedFilesOptions(query, preloadFileFilterData["${diffset_container_id}"]);
1095 1123 },
1096 1124 initSelection: function(element, callback) {
1097 1125 callback({'init': true});
1098 1126 },
1099 1127 formatResult: formatFileResult,
1100 1128 formatSelection: formatSelection
1101 1129 });
1102 1130
1103 1131 % if range_diff_on is True:
1104 1132 diffFileFilter.select2("enable", false);
1105 1133 % endif
1106 1134
1107 1135 $(diffFileFilterId).on('select2-selecting', function (e) {
1108 1136 var idSelector = e.choice.id;
1109 1137
1110 1138 // expand the container if we quick-select the field
1111 1139 $('#'+idSelector).next().prop('checked', false);
1112 1140 // hide the mast as we later do preventDefault()
1113 1141 $("#select2-drop-mask").click();
1114 1142
1115 1143 window.location.hash = '#'+idSelector;
1116 1144 updateSticky();
1117 1145
1118 1146 e.preventDefault();
1119 1147 });
1120 1148
1121 1149 diffNavText = 'diff navigation:'
1122 1150
1123 1151 getCurrentChunk = function () {
1124 1152
1125 1153 var chunksAll = $('.nav-chunk').filter(function () {
1126 1154 return $(this).parents('.filediff').prev().get(0).checked !== true
1127 1155 })
1128 1156 var chunkSelected = $('.nav-chunk.selected');
1129 1157 var initial = false;
1130 1158
1131 1159 if (chunkSelected.length === 0) {
1132 1160 // no initial chunk selected, we pick first
1133 1161 chunkSelected = $(chunksAll.get(0));
1134 1162 var initial = true;
1135 1163 }
1136 1164
1137 1165 return {
1138 1166 'all': chunksAll,
1139 1167 'selected': chunkSelected,
1140 1168 'initial': initial,
1141 1169 }
1142 1170 }
1143 1171
1144 1172 animateDiffNavText = function () {
1145 1173 var $diffNav = $('#diff_nav')
1146 1174
1147 1175 var callback = function () {
1148 1176 $diffNav.animate({'opacity': 1.00}, 200)
1149 1177 };
1150 1178 $diffNav.animate({'opacity': 0.15}, 200, callback);
1151 1179 }
1152 1180
1153 1181 scrollToChunk = function (moveBy) {
1154 1182 var chunk = getCurrentChunk();
1155 1183 var all = chunk.all
1156 1184 var selected = chunk.selected
1157 1185
1158 1186 var curPos = all.index(selected);
1159 1187 var newPos = curPos;
1160 1188 if (!chunk.initial) {
1161 1189 var newPos = curPos + moveBy;
1162 1190 }
1163 1191
1164 1192 var curElem = all.get(newPos);
1165 1193
1166 1194 if (curElem === undefined) {
1167 1195 // end or back
1168 1196 $('#diff_nav').html('no next diff element:')
1169 1197 animateDiffNavText()
1170 1198 return
1171 1199 } else if (newPos < 0) {
1172 1200 $('#diff_nav').html('no previous diff element:')
1173 1201 animateDiffNavText()
1174 1202 return
1175 1203 } else {
1176 1204 $('#diff_nav').html(diffNavText)
1177 1205 }
1178 1206
1179 1207 curElem = $(curElem)
1180 1208 var offset = 100;
1181 1209 $(window).scrollTop(curElem.position().top - offset);
1182 1210
1183 1211 //clear selection
1184 1212 all.removeClass('selected')
1185 1213 curElem.addClass('selected')
1186 1214 }
1187 1215
1188 1216 scrollToPrevChunk = function () {
1189 1217 scrollToChunk(-1)
1190 1218 }
1191 1219 scrollToNextChunk = function () {
1192 1220 scrollToChunk(1)
1193 1221 }
1194 1222
1195 1223 </script>
1196 1224 % endif
1197 1225
1198 1226 <script type="text/javascript">
1199 1227 $('#diff_nav').html('loading diff...') // wait until whole page is loaded
1200 1228
1201 1229 $(document).ready(function () {
1202 1230
1203 1231 var contextPrefix = _gettext('Context file: ');
1204 1232 ## sticky sidebar
1205 1233 var sidebarElement = document.getElementById('diff-file-sticky');
1206 1234 sidebar = new StickySidebar(sidebarElement, {
1207 1235 topSpacing: 0,
1208 1236 bottomSpacing: 0,
1209 1237 innerWrapperSelector: '.sidebar__inner'
1210 1238 });
1211 1239 sidebarElement.addEventListener('affixed.static.stickySidebar', function () {
1212 1240 // reset our file so it's not holding new value
1213 1241 $('.fpath-placeholder-text').html(contextPrefix + ' - ')
1214 1242 });
1215 1243
1216 1244 updateSticky = function () {
1217 1245 sidebar.updateSticky();
1218 1246 Waypoint.refreshAll();
1219 1247 };
1220 1248
1221 1249 var animateText = function (fPath, anchorId) {
1222 1250 fPath = Select2.util.escapeMarkup(fPath);
1223 1251 $('.fpath-placeholder-text').html(contextPrefix + '<a href="#a_' + anchorId + '">' + fPath + '</a>')
1224 1252 };
1225 1253
1226 1254 ## dynamic file waypoints
1227 1255 var setFPathInfo = function(fPath, anchorId){
1228 1256 animateText(fPath, anchorId)
1229 1257 };
1230 1258
1231 1259 var codeBlock = $('.filediff');
1232 1260
1233 1261 // forward waypoint
1234 1262 codeBlock.waypoint(
1235 1263 function(direction) {
1236 1264 if (direction === "down"){
1237 1265 setFPathInfo($(this.element).data('fPath'), $(this.element).data('anchorId'))
1238 1266 }
1239 1267 }, {
1240 1268 offset: function () {
1241 1269 return 70;
1242 1270 },
1243 1271 context: '.fpath-placeholder'
1244 1272 }
1245 1273 );
1246 1274
1247 1275 // backward waypoint
1248 1276 codeBlock.waypoint(
1249 1277 function(direction) {
1250 1278 if (direction === "up"){
1251 1279 setFPathInfo($(this.element).data('fPath'), $(this.element).data('anchorId'))
1252 1280 }
1253 1281 }, {
1254 1282 offset: function () {
1255 1283 return -this.element.clientHeight + 90;
1256 1284 },
1257 1285 context: '.fpath-placeholder'
1258 1286 }
1259 1287 );
1260 1288
1261 1289 toggleWideDiff = function (el) {
1262 1290 updateSticky();
1263 1291 var wide = Rhodecode.comments.toggleWideMode(this);
1264 1292 storeUserSessionAttr('rc_user_session_attr.wide_diff_mode', wide);
1265 1293 if (wide === true) {
1266 1294 $(el).addClass('btn-active');
1267 1295 } else {
1268 1296 $(el).removeClass('btn-active');
1269 1297 }
1270 1298 return null;
1271 1299 };
1272 1300
1273 var preloadDiffMenuData = {
1274 results: [
1275
1276 ## Whitespace change
1277 % if request.GET.get('ignorews', '') == '1':
1278 {
1279 id: 2,
1280 text: _gettext('Show whitespace changes'),
1281 action: function () {},
1282 url: "${h.current_route_path(request, ignorews=0)|n}"
1283 },
1284 % else:
1285 {
1286 id: 2,
1287 text: _gettext('Hide whitespace changes'),
1288 action: function () {},
1289 url: "${h.current_route_path(request, ignorews=1)|n}"
1290 },
1291 % endif
1292
1293 ## FULL CONTEXT
1294 % if request.GET.get('fullcontext', '') == '1':
1295 {
1296 id: 3,
1297 text: _gettext('Hide full context diff'),
1298 action: function () {},
1299 url: "${h.current_route_path(request, fullcontext=0)|n}"
1300 },
1301 % else:
1302 {
1303 id: 3,
1304 text: _gettext('Show full context diff'),
1305 action: function () {},
1306 url: "${h.current_route_path(request, fullcontext=1)|n}"
1307 },
1308 % endif
1309
1310 ]
1311 };
1312
1313 var diffMenuId = "#diff_menu_" + "${diffset_container_id}";
1314 $(diffMenuId).select2({
1315 minimumResultsForSearch: -1,
1316 containerCssClass: "drop-menu-no-width",
1317 dropdownCssClass: "drop-menu-dropdown",
1318 dropdownAutoWidth: true,
1319 data: preloadDiffMenuData,
1320 placeholder: "${_('...')}",
1321 });
1322 $(diffMenuId).on('select2-selecting', function (e) {
1323 e.choice.action();
1324 if (e.choice.url !== null) {
1325 window.location = e.choice.url
1326 }
1327 });
1328 1301 toggleExpand = function (el, diffsetEl) {
1329 1302 var el = $(el);
1330 1303 if (el.hasClass('collapsed')) {
1331 1304 $('.filediff-collapse-state.collapse-{0}'.format(diffsetEl)).prop('checked', false);
1332 1305 el.removeClass('collapsed');
1333 1306 el.html(
1334 1307 '<i class="icon-minus-squared-alt icon-no-margin"></i>' +
1335 1308 _gettext('Collapse all files'));
1336 1309 }
1337 1310 else {
1338 1311 $('.filediff-collapse-state.collapse-{0}'.format(diffsetEl)).prop('checked', true);
1339 1312 el.addClass('collapsed');
1340 1313 el.html(
1341 1314 '<i class="icon-plus-squared-alt icon-no-margin"></i>' +
1342 1315 _gettext('Expand all files'));
1343 1316 }
1344 1317 updateSticky()
1345 1318 };
1346 1319
1347 1320 toggleCommitExpand = function (el) {
1348 1321 var $el = $(el);
1349 1322 var commits = $el.data('toggleCommitsCnt');
1350 1323 var collapseMsg = _ngettext('Collapse {0} commit', 'Collapse {0} commits', commits).format(commits);
1351 1324 var expandMsg = _ngettext('Expand {0} commit', 'Expand {0} commits', commits).format(commits);
1352 1325
1353 1326 if ($el.hasClass('collapsed')) {
1354 1327 $('.compare_select').show();
1355 1328 $('.compare_select_hidden').hide();
1356 1329
1357 1330 $el.removeClass('collapsed');
1358 1331 $el.html(
1359 1332 '<i class="icon-minus-squared-alt icon-no-margin"></i>' +
1360 1333 collapseMsg);
1361 1334 }
1362 1335 else {
1363 1336 $('.compare_select').hide();
1364 1337 $('.compare_select_hidden').show();
1365 1338 $el.addClass('collapsed');
1366 1339 $el.html(
1367 1340 '<i class="icon-plus-squared-alt icon-no-margin"></i>' +
1368 1341 expandMsg);
1369 1342 }
1370 1343 updateSticky();
1371 1344 };
1372 1345
1373 1346 // get stored diff mode and pre-enable it
1374 1347 if (templateContext.session_attrs.wide_diff_mode === "true") {
1375 1348 Rhodecode.comments.toggleWideMode(null);
1376 1349 $('.toggle-wide-diff').addClass('btn-active');
1377 1350 updateSticky();
1378 1351 }
1379 1352
1380 1353 // DIFF NAV //
1381 1354
1382 1355 // element to detect scroll direction of
1383 1356 var $window = $(window);
1384 1357
1385 1358 // initialize last scroll position
1386 1359 var lastScrollY = $window.scrollTop();
1387 1360
1388 1361 $window.on('resize scrollstop', {latency: 350}, function () {
1389 1362 var visibleChunks = $('.nav-chunk').withinviewport({top: 75});
1390 1363
1391 1364 // get current scroll position
1392 1365 var currentScrollY = $window.scrollTop();
1393 1366
1394 1367 // determine current scroll direction
1395 1368 if (currentScrollY > lastScrollY) {
1396 1369 var y = 'down'
1397 1370 } else if (currentScrollY !== lastScrollY) {
1398 1371 var y = 'up';
1399 1372 }
1400 1373
1401 1374 var pos = -1; // by default we use last element in viewport
1402 1375 if (y === 'down') {
1403 1376 pos = -1;
1404 1377 } else if (y === 'up') {
1405 1378 pos = 0;
1406 1379 }
1407 1380
1408 1381 if (visibleChunks.length > 0) {
1409 1382 $('.nav-chunk').removeClass('selected');
1410 1383 $(visibleChunks.get(pos)).addClass('selected');
1411 1384 }
1412 1385
1413 1386 // update last scroll position to current position
1414 1387 lastScrollY = currentScrollY;
1415 1388
1416 1389 });
1417 1390 $('#diff_nav').html(diffNavText);
1418 1391
1419 1392 });
1420 1393 </script>
1421 1394
1422 1395 </%def>
@@ -1,270 +1,270 b''
1 1 <%text>
2 2 <div style="display: none">
3 3
4 4 <script>
5 5 var CG = new ColorGenerator();
6 6 </script>
7 7
8 8 <script id="ejs_gravatarWithUser" type="text/template" class="ejsTemplate">
9 9
10 10 <%
11 11 if (size > 16) {
12 12 var gravatar_class = 'gravatar gravatar-large';
13 13 } else {
14 14 var gravatar_class = 'gravatar';
15 15 }
16 16
17 17 if (tooltip) {
18 18 var gravatar_class = gravatar_class + ' tooltip-hovercard';
19 19 }
20 20
21 21 var data_hovercard_alt = username;
22 22
23 23 %>
24 24
25 25 <%
26 26 if (show_disabled) {
27 27 var user_cls = 'user user-disabled';
28 28 } else {
29 29 var user_cls = 'user';
30 30 }
31 31 var data_hovercard_url = pyroutes.url('hovercard_user', {"user_id": user_id})
32 32 %>
33 33
34 34 <div class="rc-user">
35 35 <img class="<%= gravatar_class %>" height="<%= size %>" width="<%= size %>" data-hovercard-url="<%= data_hovercard_url %>" data-hovercard-alt="<%= data_hovercard_alt %>" src="<%- gravatar_url -%>">
36 36 <span class="<%= user_cls %>"> <%- user_link -%> </span>
37 37 </div>
38 38
39 39 </script>
40 40
41 41 <script id="ejs_reviewMemberEntry" type="text/template" class="ejsTemplate">
42 42 <%
43 43 if (create) {
44 44 var edit_visibility = 'visible';
45 45 } else {
46 46 var edit_visibility = 'hidden';
47 47 }
48 48
49 49 if (member.user_group && member.user_group.vote_rule) {
50 50 var reviewGroup = '<i class="icon-user-group"></i>';
51 51 var reviewGroupColor = CG.asRGB(CG.getColor(member.user_group.vote_rule));
52 52 } else {
53 53 var reviewGroup = null;
54 54 var reviewGroupColor = 'transparent';
55 55 }
56 56 var rule_show = rule_show || false;
57 57
58 58 if (rule_show) {
59 59 var rule_visibility = 'table-cell';
60 60 } else {
61 61 var rule_visibility = 'none';
62 62 }
63 63
64 64 %>
65 65
66 66 <tr id="reviewer_<%= member.user_id %>" class="reviewer_entry" tooltip="Review Group" data-reviewer-user-id="<%= member.user_id %>">
67 67
68 68 <% if (create) { %>
69 <td></td>
69 <td style="width: 1px"></td>
70 70 <% } else { %>
71 71 <td style="width: 20px">
72 72 <div class="tooltip presence-state" style="display: none; position: absolute; left: 2px" title="This users is currently at this page">
73 73 <i class="icon-eye" style="color: #0ac878"></i>
74 74 </div>
75 75 <% if (role === 'reviewer') { %>
76 76 <div class="reviewer_status tooltip" title="<%= review_status_label %>">
77 77 <i class="icon-circle review-status-<%= review_status %>"></i>
78 78 </div>
79 79 <% } else if (role === 'observer') { %>
80 80 <div class="tooltip" title="Observer without voting right.">
81 81 <i class="icon-circle-thin"></i>
82 82 </div>
83 83 <% } %>
84 84 </td>
85 85 <% } %>
86 86
87 87
88 88 <% if (mandatory) { %>
89 89 <td style="text-align: right;width: 10px;">
90 90 <div class="reviewer_member_mandatory tooltip" title="Mandatory reviewer">
91 91 <i class="icon-lock"></i>
92 92 </div>
93 93 </td>
94 94
95 95 <% } else { %>
96 96 <td style="text-align: right;width: 10px;">
97 97 <% if (allowed_to_update) { %>
98 98 <div class="<%=role %>_member_remove" onclick="reviewersController.removeMember(<%= member.user_id %>, true)" style="visibility: <%= edit_visibility %>;">
99 99 <i class="icon-remove" style="color: #e85e4d;"></i>
100 100 </div>
101 101 <% } %>
102 102 </td>
103 103 <% } %>
104 104
105 105 <td>
106 106 <div id="reviewer_<%= member.user_id %>_name" class="reviewer_name">
107 107 <%-
108 108 renderTemplate('gravatarWithUser', {
109 109 'size': 16,
110 110 'show_disabled': false,
111 111 'tooltip': true,
112 112 'username': member.username,
113 113 'user_id': member.user_id,
114 114 'user_link': member.user_link,
115 115 'gravatar_url': member.gravatar_link
116 116 })
117 117 %>
118 118 </div>
119 119 <% if (reviewGroup !== null) { %>
120 120 <span class="tooltip" title="Member of review group from rule: `<%= member.user_group.name %>`" style="color: <%= reviewGroupColor %>">
121 121 <%- reviewGroup %>
122 122 </span>
123 123 <% } %>
124 124 </td>
125 125
126 126 </tr>
127 127
128 128 <tr id="reviewer_<%= member.user_id %>_rules">
129 129 <td colspan="4" style="display: <%= rule_visibility %>" class="pr-user-rule-container">
130 130 <input type="hidden" name="__start__" value="reviewer:mapping">
131 131
132 132 <%if (member.user_group && member.user_group.vote_rule) { %>
133 133 <div class="reviewer_reason">
134 134
135 135 <%if (member.user_group.vote_rule == -1) {%>
136 136 - group votes required: ALL
137 137 <%} else {%>
138 138 - group votes required: <%= member.user_group.vote_rule %>
139 139 <%}%>
140 140 </div>
141 141 <%} %>
142 142
143 143 <input type="hidden" name="__start__" value="reasons:sequence">
144 144 <% for (var i = 0; i < reasons.length; i++) { %>
145 145 <% var reason = reasons[i] %>
146 146 <div class="reviewer_reason">- <%= reason %></div>
147 147 <input type="hidden" name="reason" value="<%= reason %>">
148 148 <% } %>
149 149 <input type="hidden" name="__end__" value="reasons:sequence">
150 150
151 151 <input type="hidden" name="__start__" value="rules:sequence">
152 152 <% for (var i = 0; i < member.rules.length; i++) { %>
153 153 <% var rule = member.rules[i] %>
154 154 <input type="hidden" name="rule_id" value="<%= rule %>">
155 155 <% } %>
156 156 <input type="hidden" name="__end__" value="rules:sequence">
157 157
158 158 <input id="reviewer_<%= member.user_id %>_input" type="hidden" value="<%= member.user_id %>" name="user_id" />
159 159 <input type="hidden" name="mandatory" value="<%= mandatory %>"/>
160 160 <input type="hidden" name="role" value="<%= role %>"/>
161 161
162 162 <input type="hidden" name="__end__" value="reviewer:mapping">
163 163 </td>
164 164 </tr>
165 165
166 166 </script>
167 167
168 168 <script id="ejs_commentVersion" type="text/template" class="ejsTemplate">
169 169
170 170 <%
171 171 if (size > 16) {
172 172 var gravatar_class = 'gravatar gravatar-large';
173 173 } else {
174 174 var gravatar_class = 'gravatar';
175 175 }
176 176
177 177 %>
178 178
179 179 <%
180 180 if (show_disabled) {
181 181 var user_cls = 'user user-disabled';
182 182 } else {
183 183 var user_cls = 'user';
184 184 }
185 185
186 186 %>
187 187
188 188 <div style='line-height: 20px'>
189 189 <img style="margin: -3px 0" class="<%= gravatar_class %>" height="<%= size %>" width="<%= size %>" src="<%- gravatar_url -%>">
190 190 <strong><%- user_name -%></strong>, <code>v<%- version -%></code> edited <%- timeago_component -%>
191 191 </div>
192 192
193 193 </script>
194 194
195 195
196 196 <script id="ejs_sideBarCommentHovercard" type="text/template" class="ejsTemplate">
197 197
198 198 <div>
199 199
200 200 <% if (is_todo) { %>
201 201 <% if (inline) { %>
202 202 <strong>Inline</strong> TODO (<code>#<%- comment_id -%></code>) on line: <%= line_no %>
203 203 <% if (version_info) { %>
204 204 <%= version_info %>
205 205 <% } %>
206 206 <br/>
207 207 File: <code><%- file_name -%></code>
208 208 <% } else { %>
209 209 <% if (review_status) { %>
210 210 <i class="icon-circle review-status-<%= review_status %>"></i>
211 211 <% } %>
212 212 <strong>General</strong> TODO (<code>#<%- comment_id -%></code>)
213 213 <% if (version_info) { %>
214 214 <%= version_info %>
215 215 <% } %>
216 216 <% } %>
217 217 <% } else { %>
218 218 <% if (inline) { %>
219 219 <strong>Inline</strong> comment (<code>#<%- comment_id -%></code>) on line: <%= line_no %>
220 220 <% if (version_info) { %>
221 221 <%= version_info %>
222 222 <% } %>
223 223 <br/>
224 224 File: <code><%- file_name -%></code>
225 225 <% } else { %>
226 226 <% if (review_status) { %>
227 227 <i class="icon-circle review-status-<%= review_status %>"></i>
228 228 <% } %>
229 229 <strong>General</strong> comment (<code>#<%- comment_id -%></code>)
230 230 <% if (version_info) { %>
231 231 <%= version_info %>
232 232 <% } %>
233 233 <% } %>
234 234 <% } %>
235 235 <br/>
236 236 Created:
237 237 <time class="timeago" title="<%= created_on %>" datetime="<%= datetime %>"><%= $.timeago(datetime) %></time>
238 238
239 239 </div>
240 240
241 241 </script>
242 242
243 243 <script id="ejs_commentHelpHovercard" type="text/template" class="ejsTemplate">
244 244
245 245 <div>
246 246 Use <strong>@username</strong> mention syntax to send direct notification to this RhodeCode user.<br/>
247 247 Typing / starts autocomplete for certain action, e.g set review status, or comment type. <br/>
248 248 <br/>
249 249 Use <strong>Cmd/ctrl+enter</strong> to submit comment, or <strong>Shift+Cmd/ctrl+enter</strong> to submit a draft.<br/>
250 250 <br/>
251 251 <strong>Draft comments</strong> are private to the author, and trigger no notification to others.<br/>
252 252 They are permanent until deleted, or converted to regular comments.<br/>
253 253 <br/>
254 254 <br/>
255 255 </div>
256 256
257 257 </script>
258 258
259 259
260 260
261 261 ##// END OF EJS Templates
262 262 </div>
263 263
264 264
265 265 <script>
266 266 // registers the templates into global cache
267 267 registerTemplates();
268 268 </script>
269 269
270 270 </%text>
General Comments 0
You need to be logged in to leave comments. Login now