##// END OF EJS Templates
clipboard-action: make the icon provide feedback when clicked.
marcink -
r1954:4c6e1090 default
parent child Browse files
Show More
@@ -1,2391 +1,2395 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 'fonts';
9 9 @import 'variables';
10 10 @import 'bootstrap-variables';
11 11 @import 'form-bootstrap';
12 12 @import 'codemirror';
13 13 @import 'legacy_code_styles';
14 14 @import 'readme-box';
15 15 @import 'progress-bar';
16 16
17 17 @import 'type';
18 18 @import 'alerts';
19 19 @import 'buttons';
20 20 @import 'tags';
21 21 @import 'code-block';
22 22 @import 'examples';
23 23 @import 'login';
24 24 @import 'main-content';
25 25 @import 'select2';
26 26 @import 'comments';
27 27 @import 'panels-bootstrap';
28 28 @import 'panels';
29 29 @import 'deform';
30 30
31 31 //--- BASE ------------------//
32 32 .noscript-error {
33 33 top: 0;
34 34 left: 0;
35 35 width: 100%;
36 36 z-index: 101;
37 37 text-align: center;
38 38 font-family: @text-semibold;
39 39 font-size: 120%;
40 40 color: white;
41 41 background-color: @alert2;
42 42 padding: 5px 0 5px 0;
43 43 }
44 44
45 45 html {
46 46 display: table;
47 47 height: 100%;
48 48 width: 100%;
49 49 }
50 50
51 51 body {
52 52 display: table-cell;
53 53 width: 100%;
54 54 }
55 55
56 56 //--- LAYOUT ------------------//
57 57
58 58 .hidden{
59 59 display: none !important;
60 60 }
61 61
62 62 .box{
63 63 float: left;
64 64 width: 100%;
65 65 }
66 66
67 67 .browser-header {
68 68 clear: both;
69 69 }
70 70 .main {
71 71 clear: both;
72 72 padding:0 0 @pagepadding;
73 73 height: auto;
74 74
75 75 &:after { //clearfix
76 76 content:"";
77 77 clear:both;
78 78 width:100%;
79 79 display:block;
80 80 }
81 81 }
82 82
83 83 .action-link{
84 84 margin-left: @padding;
85 85 padding-left: @padding;
86 86 border-left: @border-thickness solid @border-default-color;
87 87 }
88 88
89 89 input + .action-link, .action-link.first{
90 90 border-left: none;
91 91 }
92 92
93 93 .action-link.last{
94 94 margin-right: @padding;
95 95 padding-right: @padding;
96 96 }
97 97
98 98 .action-link.active,
99 99 .action-link.active a{
100 100 color: @grey4;
101 101 }
102 102
103 .clipboard-action {
104 cursor: pointer;
105 }
106
103 107 ul.simple-list{
104 108 list-style: none;
105 109 margin: 0;
106 110 padding: 0;
107 111 }
108 112
109 113 .main-content {
110 114 padding-bottom: @pagepadding;
111 115 }
112 116
113 117 .wide-mode-wrapper {
114 118 max-width:4000px !important;
115 119 }
116 120
117 121 .wrapper {
118 122 position: relative;
119 123 max-width: @wrapper-maxwidth;
120 124 margin: 0 auto;
121 125 }
122 126
123 127 #content {
124 128 clear: both;
125 129 padding: 0 @contentpadding;
126 130 }
127 131
128 132 .advanced-settings-fields{
129 133 input{
130 134 margin-left: @textmargin;
131 135 margin-right: @padding/2;
132 136 }
133 137 }
134 138
135 139 .cs_files_title {
136 140 margin: @pagepadding 0 0;
137 141 }
138 142
139 143 input.inline[type="file"] {
140 144 display: inline;
141 145 }
142 146
143 147 .error_page {
144 148 margin: 10% auto;
145 149
146 150 h1 {
147 151 color: @grey2;
148 152 }
149 153
150 154 .alert {
151 155 margin: @padding 0;
152 156 }
153 157
154 158 .error-branding {
155 159 font-family: @text-semibold;
156 160 color: @grey4;
157 161 }
158 162
159 163 .error_message {
160 164 font-family: @text-regular;
161 165 }
162 166
163 167 .sidebar {
164 168 min-height: 275px;
165 169 margin: 0;
166 170 padding: 0 0 @sidebarpadding @sidebarpadding;
167 171 border: none;
168 172 }
169 173
170 174 .main-content {
171 175 position: relative;
172 176 margin: 0 @sidebarpadding @sidebarpadding;
173 177 padding: 0 0 0 @sidebarpadding;
174 178 border-left: @border-thickness solid @grey5;
175 179
176 180 @media (max-width:767px) {
177 181 clear: both;
178 182 width: 100%;
179 183 margin: 0;
180 184 border: none;
181 185 }
182 186 }
183 187
184 188 .inner-column {
185 189 float: left;
186 190 width: 29.75%;
187 191 min-height: 150px;
188 192 margin: @sidebarpadding 2% 0 0;
189 193 padding: 0 2% 0 0;
190 194 border-right: @border-thickness solid @grey5;
191 195
192 196 @media (max-width:767px) {
193 197 clear: both;
194 198 width: 100%;
195 199 border: none;
196 200 }
197 201
198 202 ul {
199 203 padding-left: 1.25em;
200 204 }
201 205
202 206 &:last-child {
203 207 margin: @sidebarpadding 0 0;
204 208 border: none;
205 209 }
206 210
207 211 h4 {
208 212 margin: 0 0 @padding;
209 213 font-family: @text-semibold;
210 214 }
211 215 }
212 216 }
213 217 .error-page-logo {
214 218 width: 130px;
215 219 height: 160px;
216 220 }
217 221
218 222 // HEADER
219 223 .header {
220 224
221 225 // TODO: johbo: Fix login pages, so that they work without a min-height
222 226 // for the header and then remove the min-height. I chose a smaller value
223 227 // intentionally here to avoid rendering issues in the main navigation.
224 228 min-height: 49px;
225 229
226 230 position: relative;
227 231 vertical-align: bottom;
228 232 padding: 0 @header-padding;
229 233 background-color: @grey2;
230 234 color: @grey5;
231 235
232 236 .title {
233 237 overflow: visible;
234 238 }
235 239
236 240 &:before,
237 241 &:after {
238 242 content: "";
239 243 clear: both;
240 244 width: 100%;
241 245 }
242 246
243 247 // TODO: johbo: Avoids breaking "Repositories" chooser
244 248 .select2-container .select2-choice .select2-arrow {
245 249 display: none;
246 250 }
247 251 }
248 252
249 253 #header-inner {
250 254 &.title {
251 255 margin: 0;
252 256 }
253 257 &:before,
254 258 &:after {
255 259 content: "";
256 260 clear: both;
257 261 }
258 262 }
259 263
260 264 // Gists
261 265 #files_data {
262 266 clear: both; //for firefox
263 267 }
264 268 #gistid {
265 269 margin-right: @padding;
266 270 }
267 271
268 272 // Global Settings Editor
269 273 .textarea.editor {
270 274 float: left;
271 275 position: relative;
272 276 max-width: @texteditor-width;
273 277
274 278 select {
275 279 position: absolute;
276 280 top:10px;
277 281 right:0;
278 282 }
279 283
280 284 .CodeMirror {
281 285 margin: 0;
282 286 }
283 287
284 288 .help-block {
285 289 margin: 0 0 @padding;
286 290 padding:.5em;
287 291 background-color: @grey6;
288 292 &.pre-formatting {
289 293 white-space: pre;
290 294 }
291 295 }
292 296 }
293 297
294 298 ul.auth_plugins {
295 299 margin: @padding 0 @padding @legend-width;
296 300 padding: 0;
297 301
298 302 li {
299 303 margin-bottom: @padding;
300 304 line-height: 1em;
301 305 list-style-type: none;
302 306
303 307 .auth_buttons .btn {
304 308 margin-right: @padding;
305 309 }
306 310
307 311 &:before { content: none; }
308 312 }
309 313 }
310 314
311 315
312 316 // My Account PR list
313 317
314 318 #show_closed {
315 319 margin: 0 1em 0 0;
316 320 }
317 321
318 322 .pullrequestlist {
319 323 .closed {
320 324 background-color: @grey6;
321 325 }
322 326 .td-status {
323 327 padding-left: .5em;
324 328 }
325 329 .log-container .truncate {
326 330 height: 2.75em;
327 331 white-space: pre-line;
328 332 }
329 333 table.rctable .user {
330 334 padding-left: 0;
331 335 }
332 336 table.rctable {
333 337 td.td-description,
334 338 .rc-user {
335 339 min-width: auto;
336 340 }
337 341 }
338 342 }
339 343
340 344 // Pull Requests
341 345
342 346 .pullrequests_section_head {
343 347 display: block;
344 348 clear: both;
345 349 margin: @padding 0;
346 350 font-family: @text-bold;
347 351 }
348 352
349 353 .pr-origininfo, .pr-targetinfo {
350 354 position: relative;
351 355
352 356 .tag {
353 357 display: inline-block;
354 358 margin: 0 1em .5em 0;
355 359 }
356 360
357 361 .clone-url {
358 362 display: inline-block;
359 363 margin: 0 0 .5em 0;
360 364 padding: 0;
361 365 line-height: 1.2em;
362 366 }
363 367 }
364 368
365 369 .pr-mergeinfo {
366 370 clear: both;
367 371 margin: .5em 0;
368 372
369 373 input {
370 374 min-width: 100% !important;
371 375 padding: 0 !important;
372 376 border: 0;
373 377 }
374 378 }
375 379
376 380 .pr-pullinfo {
377 381 clear: both;
378 382 margin: .5em 0;
379 383
380 384 input {
381 385 min-width: 100% !important;
382 386 padding: 0 !important;
383 387 border: 0;
384 388 }
385 389 }
386 390
387 391 #pr-title-input {
388 392 width: 72%;
389 393 font-size: 1em;
390 394 font-family: @text-bold;
391 395 margin: 0;
392 396 padding: 0 0 0 @padding/4;
393 397 line-height: 1.7em;
394 398 color: @text-color;
395 399 letter-spacing: .02em;
396 400 }
397 401
398 402 #pullrequest_title {
399 403 width: 100%;
400 404 box-sizing: border-box;
401 405 }
402 406
403 407 #pr_open_message {
404 408 border: @border-thickness solid #fff;
405 409 border-radius: @border-radius;
406 410 padding: @padding-large-vertical @padding-large-vertical @padding-large-vertical 0;
407 411 text-align: left;
408 412 overflow: hidden;
409 413 }
410 414
411 415 .pr-submit-button {
412 416 float: right;
413 417 margin: 0 0 0 5px;
414 418 }
415 419
416 420 .pr-spacing-container {
417 421 padding: 20px;
418 422 clear: both
419 423 }
420 424
421 425 #pr-description-input {
422 426 margin-bottom: 0;
423 427 }
424 428
425 429 .pr-description-label {
426 430 vertical-align: top;
427 431 }
428 432
429 433 .perms_section_head {
430 434 min-width: 625px;
431 435
432 436 h2 {
433 437 margin-bottom: 0;
434 438 }
435 439
436 440 .label-checkbox {
437 441 float: left;
438 442 }
439 443
440 444 &.field {
441 445 margin: @space 0 @padding;
442 446 }
443 447
444 448 &:first-child.field {
445 449 margin-top: 0;
446 450
447 451 .label {
448 452 margin-top: 0;
449 453 padding-top: 0;
450 454 }
451 455
452 456 .radios {
453 457 padding-top: 0;
454 458 }
455 459 }
456 460
457 461 .radios {
458 462 float: right;
459 463 position: relative;
460 464 width: 405px;
461 465 }
462 466 }
463 467
464 468 //--- MODULES ------------------//
465 469
466 470
467 471 // Server Announcement
468 472 #server-announcement {
469 473 width: 95%;
470 474 margin: @padding auto;
471 475 padding: @padding;
472 476 border-width: 2px;
473 477 border-style: solid;
474 478 .border-radius(2px);
475 479 font-family: @text-bold;
476 480
477 481 &.info { border-color: @alert4; background-color: @alert4-inner; }
478 482 &.warning { border-color: @alert3; background-color: @alert3-inner; }
479 483 &.error { border-color: @alert2; background-color: @alert2-inner; }
480 484 &.success { border-color: @alert1; background-color: @alert1-inner; }
481 485 &.neutral { border-color: @grey3; background-color: @grey6; }
482 486 }
483 487
484 488 // Fixed Sidebar Column
485 489 .sidebar-col-wrapper {
486 490 padding-left: @sidebar-all-width;
487 491
488 492 .sidebar {
489 493 width: @sidebar-width;
490 494 margin-left: -@sidebar-all-width;
491 495 }
492 496 }
493 497
494 498 .sidebar-col-wrapper.scw-small {
495 499 padding-left: @sidebar-small-all-width;
496 500
497 501 .sidebar {
498 502 width: @sidebar-small-width;
499 503 margin-left: -@sidebar-small-all-width;
500 504 }
501 505 }
502 506
503 507
504 508 // FOOTER
505 509 #footer {
506 510 padding: 0;
507 511 text-align: center;
508 512 vertical-align: middle;
509 513 color: @grey2;
510 514 background-color: @grey6;
511 515
512 516 p {
513 517 margin: 0;
514 518 padding: 1em;
515 519 line-height: 1em;
516 520 }
517 521
518 522 .server-instance { //server instance
519 523 display: none;
520 524 }
521 525
522 526 .title {
523 527 float: none;
524 528 margin: 0 auto;
525 529 }
526 530 }
527 531
528 532 button.close {
529 533 padding: 0;
530 534 cursor: pointer;
531 535 background: transparent;
532 536 border: 0;
533 537 .box-shadow(none);
534 538 -webkit-appearance: none;
535 539 }
536 540
537 541 .close {
538 542 float: right;
539 543 font-size: 21px;
540 544 font-family: @text-bootstrap;
541 545 line-height: 1em;
542 546 font-weight: bold;
543 547 color: @grey2;
544 548
545 549 &:hover,
546 550 &:focus {
547 551 color: @grey1;
548 552 text-decoration: none;
549 553 cursor: pointer;
550 554 }
551 555 }
552 556
553 557 // GRID
554 558 .sorting,
555 559 .sorting_desc,
556 560 .sorting_asc {
557 561 cursor: pointer;
558 562 }
559 563 .sorting_desc:after {
560 564 content: "\00A0\25B2";
561 565 font-size: .75em;
562 566 }
563 567 .sorting_asc:after {
564 568 content: "\00A0\25BC";
565 569 font-size: .68em;
566 570 }
567 571
568 572
569 573 .user_auth_tokens {
570 574
571 575 &.truncate {
572 576 white-space: nowrap;
573 577 overflow: hidden;
574 578 text-overflow: ellipsis;
575 579 }
576 580
577 581 .fields .field .input {
578 582 margin: 0;
579 583 }
580 584
581 585 input#description {
582 586 width: 100px;
583 587 margin: 0;
584 588 }
585 589
586 590 .drop-menu {
587 591 // TODO: johbo: Remove this, should work out of the box when
588 592 // having multiple inputs inline
589 593 margin: 0 0 0 5px;
590 594 }
591 595 }
592 596 #user_list_table {
593 597 .closed {
594 598 background-color: @grey6;
595 599 }
596 600 }
597 601
598 602
599 603 input {
600 604 &.disabled {
601 605 opacity: .5;
602 606 }
603 607 }
604 608
605 609 // remove extra padding in firefox
606 610 input::-moz-focus-inner { border:0; padding:0 }
607 611
608 612 .adjacent input {
609 613 margin-bottom: @padding;
610 614 }
611 615
612 616 .permissions_boxes {
613 617 display: block;
614 618 }
615 619
616 620 //TODO: lisa: this should be in tables
617 621 .show_more_col {
618 622 width: 20px;
619 623 }
620 624
621 625 //FORMS
622 626
623 627 .medium-inline,
624 628 input#description.medium-inline {
625 629 display: inline;
626 630 width: @medium-inline-input-width;
627 631 min-width: 100px;
628 632 }
629 633
630 634 select {
631 635 //reset
632 636 -webkit-appearance: none;
633 637 -moz-appearance: none;
634 638
635 639 display: inline-block;
636 640 height: 28px;
637 641 width: auto;
638 642 margin: 0 @padding @padding 0;
639 643 padding: 0 18px 0 8px;
640 644 line-height:1em;
641 645 font-size: @basefontsize;
642 646 border: @border-thickness solid @rcblue;
643 647 background:white url("../images/dt-arrow-dn.png") no-repeat 100% 50%;
644 648 color: @rcblue;
645 649
646 650 &:after {
647 651 content: "\00A0\25BE";
648 652 }
649 653
650 654 &:focus {
651 655 outline: none;
652 656 }
653 657 }
654 658
655 659 option {
656 660 &:focus {
657 661 outline: none;
658 662 }
659 663 }
660 664
661 665 input,
662 666 textarea {
663 667 padding: @input-padding;
664 668 border: @input-border-thickness solid @border-highlight-color;
665 669 .border-radius (@border-radius);
666 670 font-family: @text-light;
667 671 font-size: @basefontsize;
668 672
669 673 &.input-sm {
670 674 padding: 5px;
671 675 }
672 676
673 677 &#description {
674 678 min-width: @input-description-minwidth;
675 679 min-height: 1em;
676 680 padding: 10px;
677 681 }
678 682 }
679 683
680 684 .field-sm {
681 685 input,
682 686 textarea {
683 687 padding: 5px;
684 688 }
685 689 }
686 690
687 691 textarea {
688 692 display: block;
689 693 clear: both;
690 694 width: 100%;
691 695 min-height: 100px;
692 696 margin-bottom: @padding;
693 697 .box-sizing(border-box);
694 698 overflow: auto;
695 699 }
696 700
697 701 label {
698 702 font-family: @text-light;
699 703 }
700 704
701 705 // GRAVATARS
702 706 // centers gravatar on username to the right
703 707
704 708 .gravatar {
705 709 display: inline;
706 710 min-width: 16px;
707 711 min-height: 16px;
708 712 margin: -5px 0;
709 713 padding: 0;
710 714 line-height: 1em;
711 715 border: 1px solid @grey4;
712 716 box-sizing: content-box;
713 717
714 718 &.gravatar-large {
715 719 margin: -0.5em .25em -0.5em 0;
716 720 }
717 721
718 722 & + .user {
719 723 display: inline;
720 724 margin: 0;
721 725 padding: 0 0 0 .17em;
722 726 line-height: 1em;
723 727 }
724 728 }
725 729
726 730 .user-inline-data {
727 731 display: inline-block;
728 732 float: left;
729 733 padding-left: .5em;
730 734 line-height: 1.3em;
731 735 }
732 736
733 737 .rc-user { // gravatar + user wrapper
734 738 float: left;
735 739 position: relative;
736 740 min-width: 100px;
737 741 max-width: 200px;
738 742 min-height: (@gravatar-size + @border-thickness * 2); // account for border
739 743 display: block;
740 744 padding: 0 0 0 (@gravatar-size + @basefontsize/2 + @border-thickness * 2);
741 745
742 746
743 747 .gravatar {
744 748 display: block;
745 749 position: absolute;
746 750 top: 0;
747 751 left: 0;
748 752 min-width: @gravatar-size;
749 753 min-height: @gravatar-size;
750 754 margin: 0;
751 755 }
752 756
753 757 .user {
754 758 display: block;
755 759 max-width: 175px;
756 760 padding-top: 2px;
757 761 overflow: hidden;
758 762 text-overflow: ellipsis;
759 763 }
760 764 }
761 765
762 766 .gist-gravatar,
763 767 .journal_container {
764 768 .gravatar-large {
765 769 margin: 0 .5em -10px 0;
766 770 }
767 771 }
768 772
769 773
770 774 // ADMIN SETTINGS
771 775
772 776 // Tag Patterns
773 777 .tag_patterns {
774 778 .tag_input {
775 779 margin-bottom: @padding;
776 780 }
777 781 }
778 782
779 783 .locked_input {
780 784 position: relative;
781 785
782 786 input {
783 787 display: inline;
784 788 margin: 3px 5px 0px 0px;
785 789 }
786 790
787 791 br {
788 792 display: none;
789 793 }
790 794
791 795 .error-message {
792 796 float: left;
793 797 width: 100%;
794 798 }
795 799
796 800 .lock_input_button {
797 801 display: inline;
798 802 }
799 803
800 804 .help-block {
801 805 clear: both;
802 806 }
803 807 }
804 808
805 809 // Notifications
806 810
807 811 .notifications_buttons {
808 812 margin: 0 0 @space 0;
809 813 padding: 0;
810 814
811 815 .btn {
812 816 display: inline-block;
813 817 }
814 818 }
815 819
816 820 .notification-list {
817 821
818 822 div {
819 823 display: inline-block;
820 824 vertical-align: middle;
821 825 }
822 826
823 827 .container {
824 828 display: block;
825 829 margin: 0 0 @padding 0;
826 830 }
827 831
828 832 .delete-notifications {
829 833 margin-left: @padding;
830 834 text-align: right;
831 835 cursor: pointer;
832 836 }
833 837
834 838 .read-notifications {
835 839 margin-left: @padding/2;
836 840 text-align: right;
837 841 width: 35px;
838 842 cursor: pointer;
839 843 }
840 844
841 845 .icon-minus-sign {
842 846 color: @alert2;
843 847 }
844 848
845 849 .icon-ok-sign {
846 850 color: @alert1;
847 851 }
848 852 }
849 853
850 854 .user_settings {
851 855 float: left;
852 856 clear: both;
853 857 display: block;
854 858 width: 100%;
855 859
856 860 .gravatar_box {
857 861 margin-bottom: @padding;
858 862
859 863 &:after {
860 864 content: " ";
861 865 clear: both;
862 866 width: 100%;
863 867 }
864 868 }
865 869
866 870 .fields .field {
867 871 clear: both;
868 872 }
869 873 }
870 874
871 875 .advanced_settings {
872 876 margin-bottom: @space;
873 877
874 878 .help-block {
875 879 margin-left: 0;
876 880 }
877 881
878 882 button + .help-block {
879 883 margin-top: @padding;
880 884 }
881 885 }
882 886
883 887 // admin settings radio buttons and labels
884 888 .label-2 {
885 889 float: left;
886 890 width: @label2-width;
887 891
888 892 label {
889 893 color: @grey1;
890 894 }
891 895 }
892 896 .checkboxes {
893 897 float: left;
894 898 width: @checkboxes-width;
895 899 margin-bottom: @padding;
896 900
897 901 .checkbox {
898 902 width: 100%;
899 903
900 904 label {
901 905 margin: 0;
902 906 padding: 0;
903 907 }
904 908 }
905 909
906 910 .checkbox + .checkbox {
907 911 display: inline-block;
908 912 }
909 913
910 914 label {
911 915 margin-right: 1em;
912 916 }
913 917 }
914 918
915 919 // CHANGELOG
916 920 .container_header {
917 921 float: left;
918 922 display: block;
919 923 width: 100%;
920 924 margin: @padding 0 @padding;
921 925
922 926 #filter_changelog {
923 927 float: left;
924 928 margin-right: @padding;
925 929 }
926 930
927 931 .breadcrumbs_light {
928 932 display: inline-block;
929 933 }
930 934 }
931 935
932 936 .info_box {
933 937 float: right;
934 938 }
935 939
936 940
937 941 #graph_nodes {
938 942 padding-top: 43px;
939 943 }
940 944
941 945 #graph_content{
942 946
943 947 // adjust for table headers so that graph renders properly
944 948 // #graph_nodes padding - table cell padding
945 949 padding-top: (@space - (@basefontsize * 2.4));
946 950
947 951 &.graph_full_width {
948 952 width: 100%;
949 953 max-width: 100%;
950 954 }
951 955 }
952 956
953 957 #graph {
954 958 .flag_status {
955 959 margin: 0;
956 960 }
957 961
958 962 .pagination-left {
959 963 float: left;
960 964 clear: both;
961 965 }
962 966
963 967 .log-container {
964 968 max-width: 345px;
965 969
966 970 .message{
967 971 max-width: 340px;
968 972 }
969 973 }
970 974
971 975 .graph-col-wrapper {
972 976 padding-left: 110px;
973 977
974 978 #graph_nodes {
975 979 width: 100px;
976 980 margin-left: -110px;
977 981 float: left;
978 982 clear: left;
979 983 }
980 984 }
981 985
982 986 .load-more-commits {
983 987 text-align: center;
984 988 }
985 989 .load-more-commits:hover {
986 990 background-color: @grey7;
987 991 }
988 992 .load-more-commits {
989 993 a {
990 994 display: block;
991 995 }
992 996 }
993 997 }
994 998
995 999 #filter_changelog {
996 1000 float: left;
997 1001 }
998 1002
999 1003
1000 1004 //--- THEME ------------------//
1001 1005
1002 1006 #logo {
1003 1007 float: left;
1004 1008 margin: 9px 0 0 0;
1005 1009
1006 1010 .header {
1007 1011 background-color: transparent;
1008 1012 }
1009 1013
1010 1014 a {
1011 1015 display: inline-block;
1012 1016 }
1013 1017
1014 1018 img {
1015 1019 height:30px;
1016 1020 }
1017 1021 }
1018 1022
1019 1023 .logo-wrapper {
1020 1024 float:left;
1021 1025 }
1022 1026
1023 1027 .branding{
1024 1028 float: left;
1025 1029 padding: 9px 2px;
1026 1030 line-height: 1em;
1027 1031 font-size: @navigation-fontsize;
1028 1032 }
1029 1033
1030 1034 img {
1031 1035 border: none;
1032 1036 outline: none;
1033 1037 }
1034 1038 user-profile-header
1035 1039 label {
1036 1040
1037 1041 input[type="checkbox"] {
1038 1042 margin-right: 1em;
1039 1043 }
1040 1044 input[type="radio"] {
1041 1045 margin-right: 1em;
1042 1046 }
1043 1047 }
1044 1048
1045 1049 .flag_status {
1046 1050 margin: 2px 8px 6px 2px;
1047 1051 &.under_review {
1048 1052 .circle(5px, @alert3);
1049 1053 }
1050 1054 &.approved {
1051 1055 .circle(5px, @alert1);
1052 1056 }
1053 1057 &.rejected,
1054 1058 &.forced_closed{
1055 1059 .circle(5px, @alert2);
1056 1060 }
1057 1061 &.not_reviewed {
1058 1062 .circle(5px, @grey5);
1059 1063 }
1060 1064 }
1061 1065
1062 1066 .flag_status_comment_box {
1063 1067 margin: 5px 6px 0px 2px;
1064 1068 }
1065 1069 .test_pattern_preview {
1066 1070 margin: @space 0;
1067 1071
1068 1072 p {
1069 1073 margin-bottom: 0;
1070 1074 border-bottom: @border-thickness solid @border-default-color;
1071 1075 color: @grey3;
1072 1076 }
1073 1077
1074 1078 .btn {
1075 1079 margin-bottom: @padding;
1076 1080 }
1077 1081 }
1078 1082 #test_pattern_result {
1079 1083 display: none;
1080 1084 &:extend(pre);
1081 1085 padding: .9em;
1082 1086 color: @grey3;
1083 1087 background-color: @grey7;
1084 1088 border-right: @border-thickness solid @border-default-color;
1085 1089 border-bottom: @border-thickness solid @border-default-color;
1086 1090 border-left: @border-thickness solid @border-default-color;
1087 1091 }
1088 1092
1089 1093 #repo_vcs_settings {
1090 1094 #inherit_overlay_vcs_default {
1091 1095 display: none;
1092 1096 }
1093 1097 #inherit_overlay_vcs_custom {
1094 1098 display: custom;
1095 1099 }
1096 1100 &.inherited {
1097 1101 #inherit_overlay_vcs_default {
1098 1102 display: block;
1099 1103 }
1100 1104 #inherit_overlay_vcs_custom {
1101 1105 display: none;
1102 1106 }
1103 1107 }
1104 1108 }
1105 1109
1106 1110 .issue-tracker-link {
1107 1111 color: @rcblue;
1108 1112 }
1109 1113
1110 1114 // Issue Tracker Table Show/Hide
1111 1115 #repo_issue_tracker {
1112 1116 #inherit_overlay {
1113 1117 display: none;
1114 1118 }
1115 1119 #custom_overlay {
1116 1120 display: custom;
1117 1121 }
1118 1122 &.inherited {
1119 1123 #inherit_overlay {
1120 1124 display: block;
1121 1125 }
1122 1126 #custom_overlay {
1123 1127 display: none;
1124 1128 }
1125 1129 }
1126 1130 }
1127 1131 table.issuetracker {
1128 1132 &.readonly {
1129 1133 tr, td {
1130 1134 color: @grey3;
1131 1135 }
1132 1136 }
1133 1137 .edit {
1134 1138 display: none;
1135 1139 }
1136 1140 .editopen {
1137 1141 .edit {
1138 1142 display: inline;
1139 1143 }
1140 1144 .entry {
1141 1145 display: none;
1142 1146 }
1143 1147 }
1144 1148 tr td.td-action {
1145 1149 min-width: 117px;
1146 1150 }
1147 1151 td input {
1148 1152 max-width: none;
1149 1153 min-width: 30px;
1150 1154 width: 80%;
1151 1155 }
1152 1156 .issuetracker_pref input {
1153 1157 width: 40%;
1154 1158 }
1155 1159 input.edit_issuetracker_update {
1156 1160 margin-right: 0;
1157 1161 width: auto;
1158 1162 }
1159 1163 }
1160 1164
1161 1165 table.integrations {
1162 1166 .td-icon {
1163 1167 width: 20px;
1164 1168 .integration-icon {
1165 1169 height: 20px;
1166 1170 width: 20px;
1167 1171 }
1168 1172 }
1169 1173 }
1170 1174
1171 1175 .integrations {
1172 1176 a.integration-box {
1173 1177 color: @text-color;
1174 1178 &:hover {
1175 1179 .panel {
1176 1180 background: #fbfbfb;
1177 1181 }
1178 1182 }
1179 1183 .integration-icon {
1180 1184 width: 30px;
1181 1185 height: 30px;
1182 1186 margin-right: 20px;
1183 1187 float: left;
1184 1188 }
1185 1189
1186 1190 .panel-body {
1187 1191 padding: 10px;
1188 1192 }
1189 1193 .panel {
1190 1194 margin-bottom: 10px;
1191 1195 }
1192 1196 h2 {
1193 1197 display: inline-block;
1194 1198 margin: 0;
1195 1199 min-width: 140px;
1196 1200 }
1197 1201 }
1198 1202 }
1199 1203
1200 1204 //Permissions Settings
1201 1205 #add_perm {
1202 1206 margin: 0 0 @padding;
1203 1207 cursor: pointer;
1204 1208 }
1205 1209
1206 1210 .perm_ac {
1207 1211 input {
1208 1212 width: 95%;
1209 1213 }
1210 1214 }
1211 1215
1212 1216 .autocomplete-suggestions {
1213 1217 width: auto !important; // overrides autocomplete.js
1214 1218 margin: 0;
1215 1219 border: @border-thickness solid @rcblue;
1216 1220 border-radius: @border-radius;
1217 1221 color: @rcblue;
1218 1222 background-color: white;
1219 1223 }
1220 1224 .autocomplete-selected {
1221 1225 background: #F0F0F0;
1222 1226 }
1223 1227 .ac-container-wrap {
1224 1228 margin: 0;
1225 1229 padding: 8px;
1226 1230 border-bottom: @border-thickness solid @rclightblue;
1227 1231 list-style-type: none;
1228 1232 cursor: pointer;
1229 1233
1230 1234 &:hover {
1231 1235 background-color: @rclightblue;
1232 1236 }
1233 1237
1234 1238 img {
1235 1239 height: @gravatar-size;
1236 1240 width: @gravatar-size;
1237 1241 margin-right: 1em;
1238 1242 }
1239 1243
1240 1244 strong {
1241 1245 font-weight: normal;
1242 1246 }
1243 1247 }
1244 1248
1245 1249 // Settings Dropdown
1246 1250 .user-menu .container {
1247 1251 padding: 0 4px;
1248 1252 margin: 0;
1249 1253 }
1250 1254
1251 1255 .user-menu .gravatar {
1252 1256 cursor: pointer;
1253 1257 }
1254 1258
1255 1259 .codeblock {
1256 1260 margin-bottom: @padding;
1257 1261 clear: both;
1258 1262
1259 1263 .stats{
1260 1264 overflow: hidden;
1261 1265 }
1262 1266
1263 1267 .message{
1264 1268 textarea{
1265 1269 margin: 0;
1266 1270 }
1267 1271 }
1268 1272
1269 1273 .code-header {
1270 1274 .stats {
1271 1275 line-height: 2em;
1272 1276
1273 1277 .revision_id {
1274 1278 margin-left: 0;
1275 1279 }
1276 1280 .buttons {
1277 1281 padding-right: 0;
1278 1282 }
1279 1283 }
1280 1284
1281 1285 .item{
1282 1286 margin-right: 0.5em;
1283 1287 }
1284 1288 }
1285 1289
1286 1290 #editor_container{
1287 1291 position: relative;
1288 1292 margin: @padding;
1289 1293 }
1290 1294 }
1291 1295
1292 1296 #file_history_container {
1293 1297 display: none;
1294 1298 }
1295 1299
1296 1300 .file-history-inner {
1297 1301 margin-bottom: 10px;
1298 1302 }
1299 1303
1300 1304 // Pull Requests
1301 1305 .summary-details {
1302 1306 width: 72%;
1303 1307 }
1304 1308 .pr-summary {
1305 1309 border-bottom: @border-thickness solid @grey5;
1306 1310 margin-bottom: @space;
1307 1311 }
1308 1312 .reviewers-title {
1309 1313 width: 25%;
1310 1314 min-width: 200px;
1311 1315 }
1312 1316 .reviewers {
1313 1317 width: 25%;
1314 1318 min-width: 200px;
1315 1319 }
1316 1320 .reviewers ul li {
1317 1321 position: relative;
1318 1322 width: 100%;
1319 1323 margin-bottom: 8px;
1320 1324 }
1321 1325
1322 1326 .reviewer_entry {
1323 1327 min-height: 55px;
1324 1328 }
1325 1329
1326 1330 .reviewers_member {
1327 1331 width: 100%;
1328 1332 overflow: auto;
1329 1333 }
1330 1334 .reviewer_reason {
1331 1335 padding-left: 20px;
1332 1336 }
1333 1337 .reviewer_status {
1334 1338 display: inline-block;
1335 1339 vertical-align: top;
1336 1340 width: 7%;
1337 1341 min-width: 20px;
1338 1342 height: 1.2em;
1339 1343 margin-top: 3px;
1340 1344 line-height: 1em;
1341 1345 }
1342 1346
1343 1347 .reviewer_name {
1344 1348 display: inline-block;
1345 1349 max-width: 83%;
1346 1350 padding-right: 20px;
1347 1351 vertical-align: middle;
1348 1352 line-height: 1;
1349 1353
1350 1354 .rc-user {
1351 1355 min-width: 0;
1352 1356 margin: -2px 1em 0 0;
1353 1357 }
1354 1358
1355 1359 .reviewer {
1356 1360 float: left;
1357 1361 }
1358 1362 }
1359 1363
1360 1364 .reviewer_member_mandatory,
1361 1365 .reviewer_member_mandatory_remove,
1362 1366 .reviewer_member_remove {
1363 1367 position: absolute;
1364 1368 right: 0;
1365 1369 top: 0;
1366 1370 width: 16px;
1367 1371 margin-bottom: 10px;
1368 1372 padding: 0;
1369 1373 color: black;
1370 1374 }
1371 1375
1372 1376 .reviewer_member_mandatory_remove {
1373 1377 color: @grey4;
1374 1378 }
1375 1379
1376 1380 .reviewer_member_mandatory {
1377 1381 padding-top:20px;
1378 1382 }
1379 1383
1380 1384 .reviewer_member_status {
1381 1385 margin-top: 5px;
1382 1386 }
1383 1387 .pr-summary #summary{
1384 1388 width: 100%;
1385 1389 }
1386 1390 .pr-summary .action_button:hover {
1387 1391 border: 0;
1388 1392 cursor: pointer;
1389 1393 }
1390 1394 .pr-details-title {
1391 1395 padding-bottom: 8px;
1392 1396 border-bottom: @border-thickness solid @grey5;
1393 1397
1394 1398 .action_button.disabled {
1395 1399 color: @grey4;
1396 1400 cursor: inherit;
1397 1401 }
1398 1402 .action_button {
1399 1403 color: @rcblue;
1400 1404 }
1401 1405 }
1402 1406 .pr-details-content {
1403 1407 margin-top: @textmargin;
1404 1408 margin-bottom: @textmargin;
1405 1409 }
1406 1410 .pr-description {
1407 1411 white-space:pre-wrap;
1408 1412 }
1409 1413
1410 1414 .pr-reviewer-rules {
1411 1415 padding: 10px 0px 20px 0px;
1412 1416 }
1413 1417
1414 1418 .group_members {
1415 1419 margin-top: 0;
1416 1420 padding: 0;
1417 1421 list-style: outside none none;
1418 1422
1419 1423 img {
1420 1424 height: @gravatar-size;
1421 1425 width: @gravatar-size;
1422 1426 margin-right: .5em;
1423 1427 margin-left: 3px;
1424 1428 }
1425 1429
1426 1430 .to-delete {
1427 1431 .user {
1428 1432 text-decoration: line-through;
1429 1433 }
1430 1434 }
1431 1435 }
1432 1436
1433 1437 .compare_view_commits_title {
1434 1438 .disabled {
1435 1439 cursor: inherit;
1436 1440 &:hover{
1437 1441 background-color: inherit;
1438 1442 color: inherit;
1439 1443 }
1440 1444 }
1441 1445 }
1442 1446
1443 1447 .subtitle-compare {
1444 1448 margin: -15px 0px 0px 0px;
1445 1449 }
1446 1450
1447 1451 .comments-summary-td {
1448 1452 border-top: 1px dashed @grey5;
1449 1453 }
1450 1454
1451 1455 // new entry in group_members
1452 1456 .td-author-new-entry {
1453 1457 background-color: rgba(red(@alert1), green(@alert1), blue(@alert1), 0.3);
1454 1458 }
1455 1459
1456 1460 .usergroup_member_remove {
1457 1461 width: 16px;
1458 1462 margin-bottom: 10px;
1459 1463 padding: 0;
1460 1464 color: black !important;
1461 1465 cursor: pointer;
1462 1466 }
1463 1467
1464 1468 .reviewer_ac .ac-input {
1465 1469 width: 92%;
1466 1470 margin-bottom: 1em;
1467 1471 }
1468 1472
1469 1473 .compare_view_commits tr{
1470 1474 height: 20px;
1471 1475 }
1472 1476 .compare_view_commits td {
1473 1477 vertical-align: top;
1474 1478 padding-top: 10px;
1475 1479 }
1476 1480 .compare_view_commits .author {
1477 1481 margin-left: 5px;
1478 1482 }
1479 1483
1480 1484 .compare_view_commits {
1481 1485 .color-a {
1482 1486 color: @alert1;
1483 1487 }
1484 1488
1485 1489 .color-c {
1486 1490 color: @color3;
1487 1491 }
1488 1492
1489 1493 .color-r {
1490 1494 color: @color5;
1491 1495 }
1492 1496
1493 1497 .color-a-bg {
1494 1498 background-color: @alert1;
1495 1499 }
1496 1500
1497 1501 .color-c-bg {
1498 1502 background-color: @alert3;
1499 1503 }
1500 1504
1501 1505 .color-r-bg {
1502 1506 background-color: @alert2;
1503 1507 }
1504 1508
1505 1509 .color-a-border {
1506 1510 border: 1px solid @alert1;
1507 1511 }
1508 1512
1509 1513 .color-c-border {
1510 1514 border: 1px solid @alert3;
1511 1515 }
1512 1516
1513 1517 .color-r-border {
1514 1518 border: 1px solid @alert2;
1515 1519 }
1516 1520
1517 1521 .commit-change-indicator {
1518 1522 width: 15px;
1519 1523 height: 15px;
1520 1524 position: relative;
1521 1525 left: 15px;
1522 1526 }
1523 1527
1524 1528 .commit-change-content {
1525 1529 text-align: center;
1526 1530 vertical-align: middle;
1527 1531 line-height: 15px;
1528 1532 }
1529 1533 }
1530 1534
1531 1535 .compare_view_files {
1532 1536 width: 100%;
1533 1537
1534 1538 td {
1535 1539 vertical-align: middle;
1536 1540 }
1537 1541 }
1538 1542
1539 1543 .compare_view_filepath {
1540 1544 color: @grey1;
1541 1545 }
1542 1546
1543 1547 .show_more {
1544 1548 display: inline-block;
1545 1549 position: relative;
1546 1550 vertical-align: middle;
1547 1551 width: 4px;
1548 1552 height: @basefontsize;
1549 1553
1550 1554 &:after {
1551 1555 content: "\00A0\25BE";
1552 1556 display: inline-block;
1553 1557 width:10px;
1554 1558 line-height: 5px;
1555 1559 font-size: 12px;
1556 1560 cursor: pointer;
1557 1561 }
1558 1562 }
1559 1563
1560 1564 .journal_more .show_more {
1561 1565 display: inline;
1562 1566
1563 1567 &:after {
1564 1568 content: none;
1565 1569 }
1566 1570 }
1567 1571
1568 1572 .open .show_more:after,
1569 1573 .select2-dropdown-open .show_more:after {
1570 1574 .rotate(180deg);
1571 1575 margin-left: 4px;
1572 1576 }
1573 1577
1574 1578
1575 1579 .compare_view_commits .collapse_commit:after {
1576 1580 cursor: pointer;
1577 1581 content: "\00A0\25B4";
1578 1582 margin-left: -3px;
1579 1583 font-size: 17px;
1580 1584 color: @grey4;
1581 1585 }
1582 1586
1583 1587 .diff_links {
1584 1588 margin-left: 8px;
1585 1589 }
1586 1590
1587 1591 div.ancestor {
1588 1592 margin: -30px 0px;
1589 1593 }
1590 1594
1591 1595 .cs_icon_td input[type="checkbox"] {
1592 1596 display: none;
1593 1597 }
1594 1598
1595 1599 .cs_icon_td .expand_file_icon:after {
1596 1600 cursor: pointer;
1597 1601 content: "\00A0\25B6";
1598 1602 font-size: 12px;
1599 1603 color: @grey4;
1600 1604 }
1601 1605
1602 1606 .cs_icon_td .collapse_file_icon:after {
1603 1607 cursor: pointer;
1604 1608 content: "\00A0\25BC";
1605 1609 font-size: 12px;
1606 1610 color: @grey4;
1607 1611 }
1608 1612
1609 1613 /*new binary
1610 1614 NEW_FILENODE = 1
1611 1615 DEL_FILENODE = 2
1612 1616 MOD_FILENODE = 3
1613 1617 RENAMED_FILENODE = 4
1614 1618 COPIED_FILENODE = 5
1615 1619 CHMOD_FILENODE = 6
1616 1620 BIN_FILENODE = 7
1617 1621 */
1618 1622 .cs_files_expand {
1619 1623 font-size: @basefontsize + 5px;
1620 1624 line-height: 1.8em;
1621 1625 float: right;
1622 1626 }
1623 1627
1624 1628 .cs_files_expand span{
1625 1629 color: @rcblue;
1626 1630 cursor: pointer;
1627 1631 }
1628 1632 .cs_files {
1629 1633 clear: both;
1630 1634 padding-bottom: @padding;
1631 1635
1632 1636 .cur_cs {
1633 1637 margin: 10px 2px;
1634 1638 font-weight: bold;
1635 1639 }
1636 1640
1637 1641 .node {
1638 1642 float: left;
1639 1643 }
1640 1644
1641 1645 .changes {
1642 1646 float: right;
1643 1647 color: white;
1644 1648 font-size: @basefontsize - 4px;
1645 1649 margin-top: 4px;
1646 1650 opacity: 0.6;
1647 1651 filter: Alpha(opacity=60); /* IE8 and earlier */
1648 1652
1649 1653 .added {
1650 1654 background-color: @alert1;
1651 1655 float: left;
1652 1656 text-align: center;
1653 1657 }
1654 1658
1655 1659 .deleted {
1656 1660 background-color: @alert2;
1657 1661 float: left;
1658 1662 text-align: center;
1659 1663 }
1660 1664
1661 1665 .bin {
1662 1666 background-color: @alert1;
1663 1667 text-align: center;
1664 1668 }
1665 1669
1666 1670 /*new binary*/
1667 1671 .bin.bin1 {
1668 1672 background-color: @alert1;
1669 1673 text-align: center;
1670 1674 }
1671 1675
1672 1676 /*deleted binary*/
1673 1677 .bin.bin2 {
1674 1678 background-color: @alert2;
1675 1679 text-align: center;
1676 1680 }
1677 1681
1678 1682 /*mod binary*/
1679 1683 .bin.bin3 {
1680 1684 background-color: @grey2;
1681 1685 text-align: center;
1682 1686 }
1683 1687
1684 1688 /*rename file*/
1685 1689 .bin.bin4 {
1686 1690 background-color: @alert4;
1687 1691 text-align: center;
1688 1692 }
1689 1693
1690 1694 /*copied file*/
1691 1695 .bin.bin5 {
1692 1696 background-color: @alert4;
1693 1697 text-align: center;
1694 1698 }
1695 1699
1696 1700 /*chmod file*/
1697 1701 .bin.bin6 {
1698 1702 background-color: @grey2;
1699 1703 text-align: center;
1700 1704 }
1701 1705 }
1702 1706 }
1703 1707
1704 1708 .cs_files .cs_added, .cs_files .cs_A,
1705 1709 .cs_files .cs_added, .cs_files .cs_M,
1706 1710 .cs_files .cs_added, .cs_files .cs_D {
1707 1711 height: 16px;
1708 1712 padding-right: 10px;
1709 1713 margin-top: 7px;
1710 1714 text-align: left;
1711 1715 }
1712 1716
1713 1717 .cs_icon_td {
1714 1718 min-width: 16px;
1715 1719 width: 16px;
1716 1720 }
1717 1721
1718 1722 .pull-request-merge {
1719 1723 border: 1px solid @grey5;
1720 1724 padding: 10px 0px 20px;
1721 1725 margin-top: 10px;
1722 1726 margin-bottom: 20px;
1723 1727 }
1724 1728
1725 1729 .pull-request-merge ul {
1726 1730 padding: 0px 0px;
1727 1731 }
1728 1732
1729 1733 .pull-request-merge li:before{
1730 1734 content:none;
1731 1735 }
1732 1736
1733 1737 .pull-request-merge .pull-request-wrap {
1734 1738 height: auto;
1735 1739 padding: 0px 0px;
1736 1740 text-align: right;
1737 1741 }
1738 1742
1739 1743 .pull-request-merge span {
1740 1744 margin-right: 5px;
1741 1745 }
1742 1746
1743 1747 .pull-request-merge-actions {
1744 1748 height: 30px;
1745 1749 padding: 0px 0px;
1746 1750 }
1747 1751
1748 1752 .merge-status {
1749 1753 margin-right: 5px;
1750 1754 }
1751 1755
1752 1756 .merge-message {
1753 1757 font-size: 1.2em
1754 1758 }
1755 1759
1756 1760 .merge-message.success i,
1757 1761 .merge-icon.success i {
1758 1762 color:@alert1;
1759 1763 }
1760 1764
1761 1765 .merge-message.warning i,
1762 1766 .merge-icon.warning i {
1763 1767 color: @alert3;
1764 1768 }
1765 1769
1766 1770 .merge-message.error i,
1767 1771 .merge-icon.error i {
1768 1772 color:@alert2;
1769 1773 }
1770 1774
1771 1775 .pr-versions {
1772 1776 font-size: 1.1em;
1773 1777
1774 1778 table {
1775 1779 padding: 0px 5px;
1776 1780 }
1777 1781
1778 1782 td {
1779 1783 line-height: 15px;
1780 1784 }
1781 1785
1782 1786 .flag_status {
1783 1787 margin: 0;
1784 1788 }
1785 1789
1786 1790 .compare-radio-button {
1787 1791 position: relative;
1788 1792 top: -3px;
1789 1793 }
1790 1794 }
1791 1795
1792 1796
1793 1797 #close_pull_request {
1794 1798 margin-right: 0px;
1795 1799 }
1796 1800
1797 1801 .empty_data {
1798 1802 color: @grey4;
1799 1803 }
1800 1804
1801 1805 #changeset_compare_view_content {
1802 1806 margin-bottom: @space;
1803 1807 clear: both;
1804 1808 width: 100%;
1805 1809 box-sizing: border-box;
1806 1810 .border-radius(@border-radius);
1807 1811
1808 1812 .help-block {
1809 1813 margin: @padding 0;
1810 1814 color: @text-color;
1811 1815 &.pre-formatting {
1812 1816 white-space: pre;
1813 1817 }
1814 1818 }
1815 1819
1816 1820 .empty_data {
1817 1821 margin: @padding 0;
1818 1822 }
1819 1823
1820 1824 .alert {
1821 1825 margin-bottom: @space;
1822 1826 }
1823 1827 }
1824 1828
1825 1829 .table_disp {
1826 1830 .status {
1827 1831 width: auto;
1828 1832
1829 1833 .flag_status {
1830 1834 float: left;
1831 1835 }
1832 1836 }
1833 1837 }
1834 1838
1835 1839 .status_box_menu {
1836 1840 margin: 0;
1837 1841 }
1838 1842
1839 1843 .notification-table{
1840 1844 margin-bottom: @space;
1841 1845 display: table;
1842 1846 width: 100%;
1843 1847
1844 1848 .container{
1845 1849 display: table-row;
1846 1850
1847 1851 .notification-header{
1848 1852 border-bottom: @border-thickness solid @border-default-color;
1849 1853 }
1850 1854
1851 1855 .notification-subject{
1852 1856 display: table-cell;
1853 1857 }
1854 1858 }
1855 1859 }
1856 1860
1857 1861 // Notifications
1858 1862 .notification-header{
1859 1863 display: table;
1860 1864 width: 100%;
1861 1865 padding: floor(@basefontsize/2) 0;
1862 1866 line-height: 1em;
1863 1867
1864 1868 .desc, .delete-notifications, .read-notifications{
1865 1869 display: table-cell;
1866 1870 text-align: left;
1867 1871 }
1868 1872
1869 1873 .desc{
1870 1874 width: 1163px;
1871 1875 }
1872 1876
1873 1877 .delete-notifications, .read-notifications{
1874 1878 width: 35px;
1875 1879 min-width: 35px; //fixes when only one button is displayed
1876 1880 }
1877 1881 }
1878 1882
1879 1883 .notification-body {
1880 1884 .markdown-block,
1881 1885 .rst-block {
1882 1886 padding: @padding 0;
1883 1887 }
1884 1888
1885 1889 .notification-subject {
1886 1890 padding: @textmargin 0;
1887 1891 border-bottom: @border-thickness solid @border-default-color;
1888 1892 }
1889 1893 }
1890 1894
1891 1895
1892 1896 .notifications_buttons{
1893 1897 float: right;
1894 1898 }
1895 1899
1896 1900 #notification-status{
1897 1901 display: inline;
1898 1902 }
1899 1903
1900 1904 // Repositories
1901 1905
1902 1906 #summary.fields{
1903 1907 display: table;
1904 1908
1905 1909 .field{
1906 1910 display: table-row;
1907 1911
1908 1912 .label-summary{
1909 1913 display: table-cell;
1910 1914 min-width: @label-summary-minwidth;
1911 1915 padding-top: @padding/2;
1912 1916 padding-bottom: @padding/2;
1913 1917 padding-right: @padding/2;
1914 1918 }
1915 1919
1916 1920 .input{
1917 1921 display: table-cell;
1918 1922 padding: @padding/2;
1919 1923
1920 1924 input{
1921 1925 min-width: 29em;
1922 1926 padding: @padding/4;
1923 1927 }
1924 1928 }
1925 1929 .statistics, .downloads{
1926 1930 .disabled{
1927 1931 color: @grey4;
1928 1932 }
1929 1933 }
1930 1934 }
1931 1935 }
1932 1936
1933 1937 #summary{
1934 1938 width: 70%;
1935 1939 }
1936 1940
1937 1941
1938 1942 // Journal
1939 1943 .journal.title {
1940 1944 h5 {
1941 1945 float: left;
1942 1946 margin: 0;
1943 1947 width: 70%;
1944 1948 }
1945 1949
1946 1950 ul {
1947 1951 float: right;
1948 1952 display: inline-block;
1949 1953 margin: 0;
1950 1954 width: 30%;
1951 1955 text-align: right;
1952 1956
1953 1957 li {
1954 1958 display: inline;
1955 1959 font-size: @journal-fontsize;
1956 1960 line-height: 1em;
1957 1961
1958 1962 &:before { content: none; }
1959 1963 }
1960 1964 }
1961 1965 }
1962 1966
1963 1967 .filterexample {
1964 1968 position: absolute;
1965 1969 top: 95px;
1966 1970 left: @contentpadding;
1967 1971 color: @rcblue;
1968 1972 font-size: 11px;
1969 1973 font-family: @text-regular;
1970 1974 cursor: help;
1971 1975
1972 1976 &:hover {
1973 1977 color: @rcdarkblue;
1974 1978 }
1975 1979
1976 1980 @media (max-width:768px) {
1977 1981 position: relative;
1978 1982 top: auto;
1979 1983 left: auto;
1980 1984 display: block;
1981 1985 }
1982 1986 }
1983 1987
1984 1988
1985 1989 #journal{
1986 1990 margin-bottom: @space;
1987 1991
1988 1992 .journal_day{
1989 1993 margin-bottom: @textmargin/2;
1990 1994 padding-bottom: @textmargin/2;
1991 1995 font-size: @journal-fontsize;
1992 1996 border-bottom: @border-thickness solid @border-default-color;
1993 1997 }
1994 1998
1995 1999 .journal_container{
1996 2000 margin-bottom: @space;
1997 2001
1998 2002 .journal_user{
1999 2003 display: inline-block;
2000 2004 }
2001 2005 .journal_action_container{
2002 2006 display: block;
2003 2007 margin-top: @textmargin;
2004 2008
2005 2009 div{
2006 2010 display: inline;
2007 2011 }
2008 2012
2009 2013 div.journal_action_params{
2010 2014 display: block;
2011 2015 }
2012 2016
2013 2017 div.journal_repo:after{
2014 2018 content: "\A";
2015 2019 white-space: pre;
2016 2020 }
2017 2021
2018 2022 div.date{
2019 2023 display: block;
2020 2024 margin-bottom: @textmargin;
2021 2025 }
2022 2026 }
2023 2027 }
2024 2028 }
2025 2029
2026 2030 // Files
2027 2031 .edit-file-title {
2028 2032 border-bottom: @border-thickness solid @border-default-color;
2029 2033
2030 2034 .breadcrumbs {
2031 2035 margin-bottom: 0;
2032 2036 }
2033 2037 }
2034 2038
2035 2039 .edit-file-fieldset {
2036 2040 margin-top: @sidebarpadding;
2037 2041
2038 2042 .fieldset {
2039 2043 .left-label {
2040 2044 width: 13%;
2041 2045 }
2042 2046 .right-content {
2043 2047 width: 87%;
2044 2048 max-width: 100%;
2045 2049 }
2046 2050 .filename-label {
2047 2051 margin-top: 13px;
2048 2052 }
2049 2053 .commit-message-label {
2050 2054 margin-top: 4px;
2051 2055 }
2052 2056 .file-upload-input {
2053 2057 input {
2054 2058 display: none;
2055 2059 }
2056 2060 margin-top: 10px;
2057 2061 }
2058 2062 .file-upload-label {
2059 2063 margin-top: 10px;
2060 2064 }
2061 2065 p {
2062 2066 margin-top: 5px;
2063 2067 }
2064 2068
2065 2069 }
2066 2070 .custom-path-link {
2067 2071 margin-left: 5px;
2068 2072 }
2069 2073 #commit {
2070 2074 resize: vertical;
2071 2075 }
2072 2076 }
2073 2077
2074 2078 .delete-file-preview {
2075 2079 max-height: 250px;
2076 2080 }
2077 2081
2078 2082 .new-file,
2079 2083 #filter_activate,
2080 2084 #filter_deactivate {
2081 2085 float: left;
2082 2086 margin: 0 0 0 15px;
2083 2087 }
2084 2088
2085 2089 h3.files_location{
2086 2090 line-height: 2.4em;
2087 2091 }
2088 2092
2089 2093 .browser-nav {
2090 2094 display: table;
2091 2095 margin-bottom: @space;
2092 2096
2093 2097
2094 2098 .info_box {
2095 2099 display: inline-table;
2096 2100 height: 2.5em;
2097 2101
2098 2102 .browser-cur-rev, .info_box_elem {
2099 2103 display: table-cell;
2100 2104 vertical-align: middle;
2101 2105 }
2102 2106
2103 2107 .info_box_elem {
2104 2108 border-top: @border-thickness solid @rcblue;
2105 2109 border-bottom: @border-thickness solid @rcblue;
2106 2110
2107 2111 #at_rev, a {
2108 2112 padding: 0.6em 0.9em;
2109 2113 margin: 0;
2110 2114 .box-shadow(none);
2111 2115 border: 0;
2112 2116 height: 12px;
2113 2117 }
2114 2118
2115 2119 input#at_rev {
2116 2120 max-width: 50px;
2117 2121 text-align: right;
2118 2122 }
2119 2123
2120 2124 &.previous {
2121 2125 border: @border-thickness solid @rcblue;
2122 2126 .disabled {
2123 2127 color: @grey4;
2124 2128 cursor: not-allowed;
2125 2129 }
2126 2130 }
2127 2131
2128 2132 &.next {
2129 2133 border: @border-thickness solid @rcblue;
2130 2134 .disabled {
2131 2135 color: @grey4;
2132 2136 cursor: not-allowed;
2133 2137 }
2134 2138 }
2135 2139 }
2136 2140
2137 2141 .browser-cur-rev {
2138 2142
2139 2143 span{
2140 2144 margin: 0;
2141 2145 color: @rcblue;
2142 2146 height: 12px;
2143 2147 display: inline-block;
2144 2148 padding: 0.7em 1em ;
2145 2149 border: @border-thickness solid @rcblue;
2146 2150 margin-right: @padding;
2147 2151 }
2148 2152 }
2149 2153 }
2150 2154
2151 2155 .search_activate {
2152 2156 display: table-cell;
2153 2157 vertical-align: middle;
2154 2158
2155 2159 input, label{
2156 2160 margin: 0;
2157 2161 padding: 0;
2158 2162 }
2159 2163
2160 2164 input{
2161 2165 margin-left: @textmargin;
2162 2166 }
2163 2167
2164 2168 }
2165 2169 }
2166 2170
2167 2171 .browser-cur-rev{
2168 2172 margin-bottom: @textmargin;
2169 2173 }
2170 2174
2171 2175 #node_filter_box_loading{
2172 2176 .info_text;
2173 2177 }
2174 2178
2175 2179 .browser-search {
2176 2180 margin: -25px 0px 5px 0px;
2177 2181 }
2178 2182
2179 2183 .node-filter {
2180 2184 font-size: @repo-title-fontsize;
2181 2185 padding: 4px 0px 0px 0px;
2182 2186
2183 2187 .node-filter-path {
2184 2188 float: left;
2185 2189 color: @grey4;
2186 2190 }
2187 2191 .node-filter-input {
2188 2192 float: left;
2189 2193 margin: -2px 0px 0px 2px;
2190 2194 input {
2191 2195 padding: 2px;
2192 2196 border: none;
2193 2197 font-size: @repo-title-fontsize;
2194 2198 }
2195 2199 }
2196 2200 }
2197 2201
2198 2202
2199 2203 .browser-result{
2200 2204 td a{
2201 2205 margin-left: 0.5em;
2202 2206 display: inline-block;
2203 2207
2204 2208 em{
2205 2209 font-family: @text-bold;
2206 2210 }
2207 2211 }
2208 2212 }
2209 2213
2210 2214 .browser-highlight{
2211 2215 background-color: @grey5-alpha;
2212 2216 }
2213 2217
2214 2218
2215 2219 // Search
2216 2220
2217 2221 .search-form{
2218 2222 #q {
2219 2223 width: @search-form-width;
2220 2224 }
2221 2225 .fields{
2222 2226 margin: 0 0 @space;
2223 2227 }
2224 2228
2225 2229 label{
2226 2230 display: inline-block;
2227 2231 margin-right: @textmargin;
2228 2232 padding-top: 0.25em;
2229 2233 }
2230 2234
2231 2235
2232 2236 .results{
2233 2237 clear: both;
2234 2238 margin: 0 0 @padding;
2235 2239 }
2236 2240 }
2237 2241
2238 2242 div.search-feedback-items {
2239 2243 display: inline-block;
2240 2244 padding:0px 0px 0px 96px;
2241 2245 }
2242 2246
2243 2247 div.search-code-body {
2244 2248 background-color: #ffffff; padding: 5px 0 5px 10px;
2245 2249 pre {
2246 2250 .match { background-color: #faffa6;}
2247 2251 .break { display: block; width: 100%; background-color: #DDE7EF; color: #747474; }
2248 2252 }
2249 2253 }
2250 2254
2251 2255 .expand_commit.search {
2252 2256 .show_more.open {
2253 2257 height: auto;
2254 2258 max-height: none;
2255 2259 }
2256 2260 }
2257 2261
2258 2262 .search-results {
2259 2263
2260 2264 h2 {
2261 2265 margin-bottom: 0;
2262 2266 }
2263 2267 .codeblock {
2264 2268 border: none;
2265 2269 background: transparent;
2266 2270 }
2267 2271
2268 2272 .codeblock-header {
2269 2273 border: none;
2270 2274 background: transparent;
2271 2275 }
2272 2276
2273 2277 .code-body {
2274 2278 border: @border-thickness solid @border-default-color;
2275 2279 .border-radius(@border-radius);
2276 2280 }
2277 2281
2278 2282 .td-commit {
2279 2283 &:extend(pre);
2280 2284 border-bottom: @border-thickness solid @border-default-color;
2281 2285 }
2282 2286
2283 2287 .message {
2284 2288 height: auto;
2285 2289 max-width: 350px;
2286 2290 white-space: normal;
2287 2291 text-overflow: initial;
2288 2292 overflow: visible;
2289 2293
2290 2294 .match { background-color: #faffa6;}
2291 2295 .break { background-color: #DDE7EF; width: 100%; color: #747474; display: block; }
2292 2296 }
2293 2297
2294 2298 }
2295 2299
2296 2300 table.rctable td.td-search-results div {
2297 2301 max-width: 100%;
2298 2302 }
2299 2303
2300 2304 #tip-box, .tip-box{
2301 2305 padding: @menupadding/2;
2302 2306 display: block;
2303 2307 border: @border-thickness solid @border-highlight-color;
2304 2308 .border-radius(@border-radius);
2305 2309 background-color: white;
2306 2310 z-index: 99;
2307 2311 white-space: pre-wrap;
2308 2312 }
2309 2313
2310 2314 #linktt {
2311 2315 width: 79px;
2312 2316 }
2313 2317
2314 2318 #help_kb .modal-content{
2315 2319 max-width: 750px;
2316 2320 margin: 10% auto;
2317 2321
2318 2322 table{
2319 2323 td,th{
2320 2324 border-bottom: none;
2321 2325 line-height: 2.5em;
2322 2326 }
2323 2327 th{
2324 2328 padding-bottom: @textmargin/2;
2325 2329 }
2326 2330 td.keys{
2327 2331 text-align: center;
2328 2332 }
2329 2333 }
2330 2334
2331 2335 .block-left{
2332 2336 width: 45%;
2333 2337 margin-right: 5%;
2334 2338 }
2335 2339 .modal-footer{
2336 2340 clear: both;
2337 2341 }
2338 2342 .key.tag{
2339 2343 padding: 0.5em;
2340 2344 background-color: @rcblue;
2341 2345 color: white;
2342 2346 border-color: @rcblue;
2343 2347 .box-shadow(none);
2344 2348 }
2345 2349 }
2346 2350
2347 2351
2348 2352
2349 2353 //--- IMPORTS FOR REFACTORED STYLES ------------------//
2350 2354
2351 2355 @import 'statistics-graph';
2352 2356 @import 'tables';
2353 2357 @import 'forms';
2354 2358 @import 'diff';
2355 2359 @import 'summary';
2356 2360 @import 'navigation';
2357 2361
2358 2362 //--- SHOW/HIDE SECTIONS --//
2359 2363
2360 2364 .btn-collapse {
2361 2365 float: right;
2362 2366 text-align: right;
2363 2367 font-family: @text-light;
2364 2368 font-size: @basefontsize;
2365 2369 cursor: pointer;
2366 2370 border: none;
2367 2371 color: @rcblue;
2368 2372 }
2369 2373
2370 2374 table.rctable,
2371 2375 table.dataTable {
2372 2376 .btn-collapse {
2373 2377 float: right;
2374 2378 text-align: right;
2375 2379 }
2376 2380 }
2377 2381
2378 2382
2379 2383 // TODO: johbo: Fix for IE10, this avoids that we see a border
2380 2384 // and padding around checkboxes and radio boxes. Move to the right place,
2381 2385 // or better: Remove this once we did the form refactoring.
2382 2386 input[type=checkbox],
2383 2387 input[type=radio] {
2384 2388 padding: 0;
2385 2389 border: none;
2386 2390 }
2387 2391
2388 2392 .toggle-ajax-spinner{
2389 2393 height: 16px;
2390 2394 width: 16px;
2391 2395 }
@@ -1,497 +1,501 b''
1 1 // # Copyright (C) 2010-2017 RhodeCode GmbH
2 2 // #
3 3 // # This program is free software: you can redistribute it and/or modify
4 4 // # it under the terms of the GNU Affero General Public License, version 3
5 5 // # (only), as published by the Free Software Foundation.
6 6 // #
7 7 // # This program is distributed in the hope that it will be useful,
8 8 // # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 9 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 10 // # GNU General Public License for more details.
11 11 // #
12 12 // # You should have received a copy of the GNU Affero General Public License
13 13 // # along with this program. If not, see <http://www.gnu.org/licenses/>.
14 14 // #
15 15 // # This program is dual-licensed. If you wish to learn more about the
16 16 // # RhodeCode Enterprise Edition, including its added features, Support services,
17 17 // # and proprietary license terms, please see https://rhodecode.com/licenses/
18 18
19 19 /**
20 20 RhodeCode JS Files
21 21 **/
22 22
23 23 if (typeof console == "undefined" || typeof console.log == "undefined"){
24 24 console = { log: function() {} }
25 25 }
26 26
27 27 // TODO: move the following function to submodules
28 28
29 29 /**
30 30 * show more
31 31 */
32 32 var show_more_event = function(){
33 33 $('table .show_more').click(function(e) {
34 34 var cid = e.target.id.substring(1);
35 35 var button = $(this);
36 36 if (button.hasClass('open')) {
37 37 $('#'+cid).hide();
38 38 button.removeClass('open');
39 39 } else {
40 40 $('#'+cid).show();
41 41 button.addClass('open one');
42 42 }
43 43 });
44 44 };
45 45
46 46 var compare_radio_buttons = function(repo_name, compare_ref_type){
47 47 $('#compare_action').on('click', function(e){
48 48 e.preventDefault();
49 49
50 50 var source = $('input[name=compare_source]:checked').val();
51 51 var target = $('input[name=compare_target]:checked').val();
52 52 if(source && target){
53 53 var url_data = {
54 54 repo_name: repo_name,
55 55 source_ref: source,
56 56 source_ref_type: compare_ref_type,
57 57 target_ref: target,
58 58 target_ref_type: compare_ref_type,
59 59 merge: 1
60 60 };
61 61 window.location = pyroutes.url('compare_url', url_data);
62 62 }
63 63 });
64 64 $('.compare-radio-button').on('click', function(e){
65 65 var source = $('input[name=compare_source]:checked').val();
66 66 var target = $('input[name=compare_target]:checked').val();
67 67 if(source && target){
68 68 $('#compare_action').removeAttr("disabled");
69 69 $('#compare_action').removeClass("disabled");
70 70 }
71 71 })
72 72 };
73 73
74 74 var showRepoSize = function(target, repo_name, commit_id, callback) {
75 75 var container = $('#' + target);
76 76 var url = pyroutes.url('repo_stats',
77 77 {"repo_name": repo_name, "commit_id": commit_id});
78 78
79 79 if (!container.hasClass('loaded')) {
80 80 $.ajax({url: url})
81 81 .complete(function (data) {
82 82 var responseJSON = data.responseJSON;
83 83 container.addClass('loaded');
84 84 container.html(responseJSON.size);
85 85 callback(responseJSON.code_stats)
86 86 })
87 87 .fail(function (data) {
88 88 console.log('failed to load repo stats');
89 89 });
90 90 }
91 91
92 92 };
93 93
94 94 var showRepoStats = function(target, data){
95 95 var container = $('#' + target);
96 96
97 97 if (container.hasClass('loaded')) {
98 98 return
99 99 }
100 100
101 101 var total = 0;
102 102 var no_data = true;
103 103 var tbl = document.createElement('table');
104 104 tbl.setAttribute('class', 'trending_language_tbl');
105 105
106 106 $.each(data, function(key, val){
107 107 total += val.count;
108 108 });
109 109
110 110 var sortedStats = [];
111 111 for (var obj in data){
112 112 sortedStats.push([obj, data[obj]])
113 113 }
114 114 var sortedData = sortedStats.sort(function (a, b) {
115 115 return b[1].count - a[1].count
116 116 });
117 117 var cnt = 0;
118 118 $.each(sortedData, function(idx, val){
119 119 cnt += 1;
120 120 no_data = false;
121 121
122 122 var hide = cnt > 2;
123 123 var tr = document.createElement('tr');
124 124 if (hide) {
125 125 tr.setAttribute('style', 'display:none');
126 126 tr.setAttribute('class', 'stats_hidden');
127 127 }
128 128
129 129 var key = val[0];
130 130 var obj = {"desc": val[1].desc, "count": val[1].count};
131 131
132 132 var percentage = Math.round((obj.count / total * 100), 2);
133 133
134 134 var td1 = document.createElement('td');
135 135 td1.width = 300;
136 136 var trending_language_label = document.createElement('div');
137 137 trending_language_label.innerHTML = obj.desc + " (.{0})".format(key);
138 138 td1.appendChild(trending_language_label);
139 139
140 140 var td2 = document.createElement('td');
141 141 var trending_language = document.createElement('div');
142 142 var nr_files = obj.count +" "+ _ngettext('file', 'files', obj.count);
143 143
144 144 trending_language.title = key + " " + nr_files;
145 145
146 146 trending_language.innerHTML = "<span>" + percentage + "% " + nr_files
147 147 + "</span><b>" + percentage + "% " + nr_files + "</b>";
148 148
149 149 trending_language.setAttribute("class", 'trending_language');
150 150 $('b', trending_language)[0].style.width = percentage + "%";
151 151 td2.appendChild(trending_language);
152 152
153 153 tr.appendChild(td1);
154 154 tr.appendChild(td2);
155 155 tbl.appendChild(tr);
156 156 if (cnt == 3) {
157 157 var show_more = document.createElement('tr');
158 158 var td = document.createElement('td');
159 159 lnk = document.createElement('a');
160 160
161 161 lnk.href = '#';
162 162 lnk.innerHTML = _gettext('Show more');
163 163 lnk.id = 'code_stats_show_more';
164 164 td.appendChild(lnk);
165 165
166 166 show_more.appendChild(td);
167 167 show_more.appendChild(document.createElement('td'));
168 168 tbl.appendChild(show_more);
169 169 }
170 170 });
171 171
172 172 $(container).html(tbl);
173 173 $(container).addClass('loaded');
174 174
175 175 $('#code_stats_show_more').on('click', function (e) {
176 176 e.preventDefault();
177 177 $('.stats_hidden').each(function (idx) {
178 178 $(this).css("display", "");
179 179 });
180 180 $('#code_stats_show_more').hide();
181 181 });
182 182
183 183 };
184 184
185 185 // returns a node from given html;
186 186 var fromHTML = function(html){
187 187 var _html = document.createElement('element');
188 188 _html.innerHTML = html;
189 189 return _html;
190 190 };
191 191
192 192 // Toggle Collapsable Content
193 193 function collapsableContent() {
194 194
195 195 $('.collapsable-content').not('.no-hide').hide();
196 196
197 197 $('.btn-collapse').unbind(); //in case we've been here before
198 198 $('.btn-collapse').click(function() {
199 199 var button = $(this);
200 200 var togglename = $(this).data("toggle");
201 201 $('.collapsable-content[data-toggle='+togglename+']').toggle();
202 202 if ($(this).html()=="Show Less")
203 203 $(this).html("Show More");
204 204 else
205 205 $(this).html("Show Less");
206 206 });
207 207 };
208 208
209 209 var timeagoActivate = function() {
210 210 $("time.timeago").timeago();
211 211 };
212 212
213 213
214 214 var clipboardActivate = function() {
215 215 /*
216 216 *
217 217 * <i class="tooltip icon-plus clipboard-action" data-clipboard-text="${commit.raw_id}" title="${_('Copy the full commit id')}"></i>
218 218 * */
219 219 var clipboard = new Clipboard('.clipboard-action');
220 220
221 221 clipboard.on('success', function(e) {
222 var callback = function () {
223 $(e.trigger).animate({'opacity': 1.00}, 200)
224 };
225 $(e.trigger).animate({'opacity': 0.15}, 200, callback);
222 226 e.clearSelection();
223 227 });
224 228 };
225 229
226 230
227 231 // Formatting values in a Select2 dropdown of commit references
228 232 var formatSelect2SelectionRefs = function(commit_ref){
229 233 var tmpl = '';
230 234 if (!commit_ref.text || commit_ref.type === 'sha'){
231 235 return commit_ref.text;
232 236 }
233 237 if (commit_ref.type === 'branch'){
234 238 tmpl = tmpl.concat('<i class="icon-branch"></i> ');
235 239 } else if (commit_ref.type === 'tag'){
236 240 tmpl = tmpl.concat('<i class="icon-tag"></i> ');
237 241 } else if (commit_ref.type === 'book'){
238 242 tmpl = tmpl.concat('<i class="icon-bookmark"></i> ');
239 243 }
240 244 return tmpl.concat(commit_ref.text);
241 245 };
242 246
243 247 // takes a given html element and scrolls it down offset pixels
244 248 function offsetScroll(element, offset) {
245 249 setTimeout(function() {
246 250 var location = element.offset().top;
247 251 // some browsers use body, some use html
248 252 $('html, body').animate({ scrollTop: (location - offset) });
249 253 }, 100);
250 254 }
251 255
252 256 // scroll an element `percent`% from the top of page in `time` ms
253 257 function scrollToElement(element, percent, time) {
254 258 percent = (percent === undefined ? 25 : percent);
255 259 time = (time === undefined ? 100 : time);
256 260
257 261 var $element = $(element);
258 262 if ($element.length == 0) {
259 263 throw('Cannot scroll to {0}'.format(element))
260 264 }
261 265 var elOffset = $element.offset().top;
262 266 var elHeight = $element.height();
263 267 var windowHeight = $(window).height();
264 268 var offset = elOffset;
265 269 if (elHeight < windowHeight) {
266 270 offset = elOffset - ((windowHeight / (100 / percent)) - (elHeight / 2));
267 271 }
268 272 setTimeout(function() {
269 273 $('html, body').animate({ scrollTop: offset});
270 274 }, time);
271 275 }
272 276
273 277 /**
274 278 * global hooks after DOM is loaded
275 279 */
276 280 $(document).ready(function() {
277 281 firefoxAnchorFix();
278 282
279 283 $('.navigation a.menulink').on('click', function(e){
280 284 var menuitem = $(this).parent('li');
281 285 if (menuitem.hasClass('open')) {
282 286 menuitem.removeClass('open');
283 287 } else {
284 288 menuitem.addClass('open');
285 289 $(document).on('click', function(event) {
286 290 if (!$(event.target).closest(menuitem).length) {
287 291 menuitem.removeClass('open');
288 292 }
289 293 });
290 294 }
291 295 });
292 296 $('.compare_view_files').on(
293 297 'mouseenter mouseleave', 'tr.line .lineno a',function(event) {
294 298 if (event.type === "mouseenter") {
295 299 $(this).parents('tr.line').addClass('hover');
296 300 } else {
297 301 $(this).parents('tr.line').removeClass('hover');
298 302 }
299 303 });
300 304
301 305 $('.compare_view_files').on(
302 306 'mouseenter mouseleave', 'tr.line .add-comment-line a',function(event){
303 307 if (event.type === "mouseenter") {
304 308 $(this).parents('tr.line').addClass('commenting');
305 309 } else {
306 310 $(this).parents('tr.line').removeClass('commenting');
307 311 }
308 312 });
309 313
310 314 $('body').on( /* TODO: replace the $('.compare_view_files').on('click') below
311 315 when new diffs are integrated */
312 316 'click', '.cb-lineno a', function(event) {
313 317
314 318 if ($(this).attr('data-line-no') !== ""){
315 319 $('.cb-line-selected').removeClass('cb-line-selected');
316 320 var td = $(this).parent();
317 321 td.addClass('cb-line-selected'); // line number td
318 322 td.prev().addClass('cb-line-selected'); // line data td
319 323 td.next().addClass('cb-line-selected'); // line content td
320 324
321 325 // Replace URL without jumping to it if browser supports.
322 326 // Default otherwise
323 327 if (history.pushState) {
324 328 var new_location = location.href.rstrip('#');
325 329 if (location.hash) {
326 330 new_location = new_location.replace(location.hash, "");
327 331 }
328 332
329 333 // Make new anchor url
330 334 new_location = new_location + $(this).attr('href');
331 335 history.pushState(true, document.title, new_location);
332 336
333 337 return false;
334 338 }
335 339 }
336 340 });
337 341
338 342 $('.compare_view_files').on( /* TODO: replace this with .cb function above
339 343 when new diffs are integrated */
340 344 'click', 'tr.line .lineno a',function(event) {
341 345 if ($(this).text() != ""){
342 346 $('tr.line').removeClass('selected');
343 347 $(this).parents("tr.line").addClass('selected');
344 348
345 349 // Replace URL without jumping to it if browser supports.
346 350 // Default otherwise
347 351 if (history.pushState) {
348 352 var new_location = location.href;
349 353 if (location.hash){
350 354 new_location = new_location.replace(location.hash, "");
351 355 }
352 356
353 357 // Make new anchor url
354 358 var new_location = new_location+$(this).attr('href');
355 359 history.pushState(true, document.title, new_location);
356 360
357 361 return false;
358 362 }
359 363 }
360 364 });
361 365
362 366 $('.compare_view_files').on(
363 367 'click', 'tr.line .add-comment-line a',function(event) {
364 368 var tr = $(event.currentTarget).parents('tr.line')[0];
365 369 injectInlineForm(tr);
366 370 return false;
367 371 });
368 372
369 373 $('.collapse_file').on('click', function(e) {
370 374 e.stopPropagation();
371 375 if ($(e.target).is('a')) { return; }
372 376 var node = $(e.delegateTarget).first();
373 377 var icon = $($(node.children().first()).children().first());
374 378 var id = node.attr('fid');
375 379 var target = $('#'+id);
376 380 var tr = $('#tr_'+id);
377 381 var diff = $('#diff_'+id);
378 382 if(node.hasClass('expand_file')){
379 383 node.removeClass('expand_file');
380 384 icon.removeClass('expand_file_icon');
381 385 node.addClass('collapse_file');
382 386 icon.addClass('collapse_file_icon');
383 387 diff.show();
384 388 tr.show();
385 389 target.show();
386 390 } else {
387 391 node.removeClass('collapse_file');
388 392 icon.removeClass('collapse_file_icon');
389 393 node.addClass('expand_file');
390 394 icon.addClass('expand_file_icon');
391 395 diff.hide();
392 396 tr.hide();
393 397 target.hide();
394 398 }
395 399 });
396 400
397 401 $('#expand_all_files').click(function() {
398 402 $('.expand_file').each(function() {
399 403 var node = $(this);
400 404 var icon = $($(node.children().first()).children().first());
401 405 var id = $(this).attr('fid');
402 406 var target = $('#'+id);
403 407 var tr = $('#tr_'+id);
404 408 var diff = $('#diff_'+id);
405 409 node.removeClass('expand_file');
406 410 icon.removeClass('expand_file_icon');
407 411 node.addClass('collapse_file');
408 412 icon.addClass('collapse_file_icon');
409 413 diff.show();
410 414 tr.show();
411 415 target.show();
412 416 });
413 417 });
414 418
415 419 $('#collapse_all_files').click(function() {
416 420 $('.collapse_file').each(function() {
417 421 var node = $(this);
418 422 var icon = $($(node.children().first()).children().first());
419 423 var id = $(this).attr('fid');
420 424 var target = $('#'+id);
421 425 var tr = $('#tr_'+id);
422 426 var diff = $('#diff_'+id);
423 427 node.removeClass('collapse_file');
424 428 icon.removeClass('collapse_file_icon');
425 429 node.addClass('expand_file');
426 430 icon.addClass('expand_file_icon');
427 431 diff.hide();
428 432 tr.hide();
429 433 target.hide();
430 434 });
431 435 });
432 436
433 437 // Mouse over behavior for comments and line selection
434 438
435 439 // Select the line that comes from the url anchor
436 440 // At the time of development, Chrome didn't seem to support jquery's :target
437 441 // element, so I had to scroll manually
438 442
439 443 if (location.hash) {
440 444 var result = splitDelimitedHash(location.hash);
441 445 var loc = result.loc;
442 446 if (loc.length > 1) {
443 447
444 448 var highlightable_line_tds = [];
445 449
446 450 // source code line format
447 451 var page_highlights = loc.substring(
448 452 loc.indexOf('#') + 1).split('L');
449 453
450 454 if (page_highlights.length > 1) {
451 455 var highlight_ranges = page_highlights[1].split(",");
452 456 var h_lines = [];
453 457 for (var pos in highlight_ranges) {
454 458 var _range = highlight_ranges[pos].split('-');
455 459 if (_range.length === 2) {
456 460 var start = parseInt(_range[0]);
457 461 var end = parseInt(_range[1]);
458 462 if (start < end) {
459 463 for (var i = start; i <= end; i++) {
460 464 h_lines.push(i);
461 465 }
462 466 }
463 467 }
464 468 else {
465 469 h_lines.push(parseInt(highlight_ranges[pos]));
466 470 }
467 471 }
468 472 for (pos in h_lines) {
469 473 var line_td = $('td.cb-lineno#L' + h_lines[pos]);
470 474 if (line_td.length) {
471 475 highlightable_line_tds.push(line_td);
472 476 }
473 477 }
474 478 }
475 479
476 480 // now check a direct id reference (diff page)
477 481 if ($(loc).length && $(loc).hasClass('cb-lineno')) {
478 482 highlightable_line_tds.push($(loc));
479 483 }
480 484 $.each(highlightable_line_tds, function (i, $td) {
481 485 $td.addClass('cb-line-selected'); // line number td
482 486 $td.prev().addClass('cb-line-selected'); // line data
483 487 $td.next().addClass('cb-line-selected'); // line content
484 488 });
485 489
486 490 if (highlightable_line_tds.length) {
487 491 var $first_line_td = highlightable_line_tds[0];
488 492 scrollToElement($first_line_td);
489 493 $.Topic('/ui/plugins/code/anchor_focus').prepareOrPublish({
490 494 td: $first_line_td,
491 495 remainder: result.remainder
492 496 });
493 497 }
494 498 }
495 499 }
496 500 collapsableContent();
497 501 });
General Comments 0
You need to be logged in to leave comments. Login now