Show More
@@ -648,37 +648,37 b' pre.literal-block, .codehilite pre{' | |||
|
648 | 648 | @cb-line-code-padding: 10px; |
|
649 | 649 | @cb-text-padding: 5px; |
|
650 | 650 | |
|
651 |
@ |
|
|
651 | @pill-padding: 2px 7px; | |
|
652 | 652 | |
|
653 | input.diff-collapse-state { | |
|
653 | input.filediff-collapse-state { | |
|
654 | 654 | display: none; |
|
655 | 655 | |
|
656 | &:checked + .diff { /* file diff is collapsed */ | |
|
656 | &:checked + .filediff { /* file diff is collapsed */ | |
|
657 | 657 | .cb { |
|
658 | 658 | display: none |
|
659 | 659 | } |
|
660 | .diff-collapse-indicator { | |
|
660 | .filediff-collapse-indicator { | |
|
661 | 661 | border-width: 9px 0 9px 15.6px; |
|
662 | 662 | border-color: transparent transparent transparent #ccc; |
|
663 | 663 | } |
|
664 | .diff-menu { | |
|
664 | .filediff-menu { | |
|
665 | 665 | display: none; |
|
666 | 666 | } |
|
667 | 667 | margin: -1px 0 0 0; |
|
668 | 668 | } |
|
669 | 669 | |
|
670 | &+ .diff { /* file diff is expanded */ | |
|
671 | .diff-collapse-indicator { | |
|
670 | &+ .filediff { /* file diff is expanded */ | |
|
671 | .filediff-collapse-indicator { | |
|
672 | 672 | border-width: 15.6px 9px 0 9px; |
|
673 | 673 | border-color: #ccc transparent transparent transparent; |
|
674 | 674 | } |
|
675 | .diff-menu { | |
|
675 | .filediff-menu { | |
|
676 | 676 | display: block; |
|
677 | 677 | } |
|
678 | 678 | margin: 20px 0; |
|
679 | 679 | } |
|
680 | 680 | } |
|
681 | .diff { | |
|
681 | .filediff { | |
|
682 | 682 | border: 1px solid @grey5; |
|
683 | 683 | |
|
684 | 684 | /* START OVERRIDES */ |
@@ -697,16 +697,16 b' input.diff-collapse-state {' | |||
|
697 | 697 | * { |
|
698 | 698 | box-sizing: border-box; |
|
699 | 699 | } |
|
700 | .diff-anchor { | |
|
700 | .filediff-anchor { | |
|
701 | 701 | visibility: hidden; |
|
702 | 702 | } |
|
703 | 703 | &:hover { |
|
704 | .diff-anchor { | |
|
704 | .filediff-anchor { | |
|
705 | 705 | visibility: visible; |
|
706 | 706 | } |
|
707 | 707 | } |
|
708 | 708 | |
|
709 | .diff-collapse-indicator { | |
|
709 | .filediff-collapse-indicator { | |
|
710 | 710 | width: 0; |
|
711 | 711 | height: 0; |
|
712 | 712 | border-style: solid; |
@@ -715,22 +715,22 b' input.diff-collapse-state {' | |||
|
715 | 715 | cursor: pointer; |
|
716 | 716 | } |
|
717 | 717 | |
|
718 | .diff-heading { | |
|
718 | .filediff-heading { | |
|
719 | 719 | background: @grey7; |
|
720 | 720 | cursor: pointer; |
|
721 | 721 | display: block; |
|
722 | 722 | padding: 5px 10px; |
|
723 | 723 | } |
|
724 | .diff-heading:after { | |
|
724 | .filediff-heading:after { | |
|
725 | 725 | content: ""; |
|
726 | 726 | display: table; |
|
727 | 727 | clear: both; |
|
728 | 728 | } |
|
729 | .diff-heading:hover { | |
|
729 | .filediff-heading:hover { | |
|
730 | 730 | background: #e1e9f4 !important; |
|
731 | 731 | } |
|
732 | 732 | |
|
733 | .diff-menu { | |
|
733 | .filediff-menu { | |
|
734 | 734 | float: right; |
|
735 | 735 | |
|
736 | 736 | a, span { |
@@ -739,13 +739,13 b' input.diff-collapse-state {' | |||
|
739 | 739 | float: left |
|
740 | 740 | } |
|
741 | 741 | } |
|
742 |
. |
|
|
742 | .pill { | |
|
743 | 743 | display: block; |
|
744 | 744 | float: left; |
|
745 |
padding: @ |
|
|
745 | padding: @pill-padding; | |
|
746 | 746 | } |
|
747 |
. |
|
|
748 |
. |
|
|
747 | .pill-group { | |
|
748 | .pill { | |
|
749 | 749 | opacity: .8; |
|
750 | 750 | &:first-child { |
|
751 | 751 | border-radius: @border-radius 0 0 @border-radius; |
@@ -758,7 +758,7 b' input.diff-collapse-state {' | |||
|
758 | 758 | } |
|
759 | 759 | } |
|
760 | 760 | } |
|
761 |
. |
|
|
761 | .pill { | |
|
762 | 762 | &[op="name"] { |
|
763 | 763 | background: none; |
|
764 | 764 | color: @grey2; |
@@ -809,19 +809,19 b' input.diff-collapse-state {' | |||
|
809 | 809 | } |
|
810 | 810 | } |
|
811 | 811 | |
|
812 | .diff-collapse-button, .diff-expand-button { | |
|
812 | .filediff-collapse-button, .filediff-expand-button { | |
|
813 | 813 | cursor: pointer; |
|
814 | 814 | } |
|
815 | .diff-collapse-button { | |
|
815 | .filediff-collapse-button { | |
|
816 | 816 | display: inline; |
|
817 | 817 | } |
|
818 | .diff-expand-button { | |
|
818 | .filediff-expand-button { | |
|
819 | 819 | display: none; |
|
820 | 820 | } |
|
821 | .diff-collapsed .diff-collapse-button { | |
|
821 | .filediff-collapsed .filediff-collapse-button { | |
|
822 | 822 | display: none; |
|
823 | 823 | } |
|
824 | .diff-collapsed .diff-expand-button { | |
|
824 | .filediff-collapsed .filediff-expand-button { | |
|
825 | 825 | display: inline; |
|
826 | 826 | } |
|
827 | 827 | } |
@@ -71,8 +71,8 b' collapse_all = len(diffset.files) > coll' | |||
|
71 | 71 | </div> |
|
72 | 72 | % endif |
|
73 | 73 | |
|
74 |
<div class=" |
|
|
75 |
<div class=" |
|
|
74 | <div class="diffset"> | |
|
75 | <div class="diffset-heading"> | |
|
76 | 76 | %if diffset.files: |
|
77 | 77 | <div class="pull-right"> |
|
78 | 78 | <div class="btn-group"> |
@@ -94,11 +94,11 b' collapse_all = len(diffset.files) > coll' | |||
|
94 | 94 | <a |
|
95 | 95 | class="btn" |
|
96 | 96 | href="#" |
|
97 | onclick="$('input[class=diff-collapse-state]').prop('checked', false); return false">${_('Expand All')}</a> | |
|
97 | onclick="$('input[class=filediff-collapse-state]').prop('checked', false); return false">${_('Expand All')}</a> | |
|
98 | 98 | <a |
|
99 | 99 | class="btn" |
|
100 | 100 | href="#" |
|
101 | onclick="$('input[class=diff-collapse-state]').prop('checked', true); return false">${_('Collapse All')}</a> | |
|
101 | onclick="$('input[class=filediff-collapse-state]').prop('checked', true); return false">${_('Collapse All')}</a> | |
|
102 | 102 | </div> |
|
103 | 103 | </div> |
|
104 | 104 | %endif |
@@ -122,13 +122,13 b' collapse_all = len(diffset.files) > coll' | |||
|
122 | 122 | lines_changed = filediff['patch']['stats']['added'] + filediff['patch']['stats']['deleted'] |
|
123 | 123 | over_lines_changed_limit = lines_changed > lines_changed_limit |
|
124 | 124 | %> |
|
125 | <input ${collapse_all and 'checked' or ''} class="diff-collapse-state" id="diff-collapse-${id(filediff)}" type="checkbox"> | |
|
125 | <input ${collapse_all and 'checked' or ''} class="filediff-collapse-state" id="filediff-collapse-${id(filediff)}" type="checkbox"> | |
|
126 | 126 | <div |
|
127 | class="diff" | |
|
127 | class="filediff" | |
|
128 | 128 | data-f-path="${filediff['patch']['filename']}" |
|
129 | 129 | id="a_${h.FID(commit_id or '', filediff['patch']['filename'])}"> |
|
130 | <label for="diff-collapse-${id(filediff)}" class="diff-heading"> | |
|
131 | <div class="diff-collapse-indicator"></div> | |
|
130 | <label for="filediff-collapse-${id(filediff)}" class="filediff-heading"> | |
|
131 | <div class="filediff-collapse-indicator"></div> | |
|
132 | 132 | ${diff_ops(filediff)} |
|
133 | 133 | </label> |
|
134 | 134 | ${diff_menu(filediff)} |
@@ -206,7 +206,7 b" stats = filediff['patch']['stats']" | |||
|
206 | 206 | from rhodecode.lib.diffs import NEW_FILENODE, DEL_FILENODE, \ |
|
207 | 207 | MOD_FILENODE, RENAMED_FILENODE, CHMOD_FILENODE, BIN_FILENODE |
|
208 | 208 | %> |
|
209 |
<span class=" |
|
|
209 | <span class="pill"> | |
|
210 | 210 | %if filediff.source_file_path and filediff.target_file_path: |
|
211 | 211 | %if filediff.source_file_path != filediff.target_file_path: # file was renamed |
|
212 | 212 | <strong>${filediff.target_file_path}</strong> ⬅ <del>${filediff.source_file_path}</del> |
@@ -224,48 +224,48 b' from rhodecode.lib.diffs import NEW_FILE' | |||
|
224 | 224 | %endif |
|
225 | 225 | %endif |
|
226 | 226 | </span> |
|
227 |
<span class=" |
|
|
227 | <span class="pill-group" style="float: left"> | |
|
228 | 228 | %if filediff.patch['is_limited_diff']: |
|
229 |
<span class=" |
|
|
229 | <span class="pill tooltip" op="limited" title="The stats for this diff are not complete">limited diff</span> | |
|
230 | 230 | %endif |
|
231 | 231 | %if RENAMED_FILENODE in stats['ops']: |
|
232 |
<span class=" |
|
|
232 | <span class="pill" op="renamed">renamed</span> | |
|
233 | 233 | %endif |
|
234 | 234 | |
|
235 | 235 | %if NEW_FILENODE in stats['ops']: |
|
236 |
<span class=" |
|
|
236 | <span class="pill" op="created">created</span> | |
|
237 | 237 | %if filediff['target_mode'].startswith('120'): |
|
238 |
<span class=" |
|
|
238 | <span class="pill" op="symlink">symlink</span> | |
|
239 | 239 | %else: |
|
240 |
<span class=" |
|
|
240 | <span class="pill" op="mode">${nice_mode(filediff['target_mode'])}</span> | |
|
241 | 241 | %endif |
|
242 | 242 | %endif |
|
243 | 243 | |
|
244 | 244 | %if DEL_FILENODE in stats['ops']: |
|
245 |
<span class=" |
|
|
245 | <span class="pill" op="removed">removed</span> | |
|
246 | 246 | %endif |
|
247 | 247 | |
|
248 | 248 | %if CHMOD_FILENODE in stats['ops']: |
|
249 |
<span class=" |
|
|
249 | <span class="pill" op="mode"> | |
|
250 | 250 | ${nice_mode(filediff['source_mode'])} ➡ ${nice_mode(filediff['target_mode'])} |
|
251 | 251 | </span> |
|
252 | 252 | %endif |
|
253 | 253 | </span> |
|
254 | 254 | |
|
255 |
<a class=" |
|
|
255 | <a class="pill filediff-anchor" href="#a_${h.FID(commit_id or '', filediff.patch['filename'])}">¶</a> | |
|
256 | 256 | |
|
257 |
<span class=" |
|
|
257 | <span class="pill-group" style="float: right"> | |
|
258 | 258 | %if BIN_FILENODE in stats['ops']: |
|
259 |
<span class=" |
|
|
259 | <span class="pill" op="binary">binary</span> | |
|
260 | 260 | %if MOD_FILENODE in stats['ops']: |
|
261 |
<span class=" |
|
|
261 | <span class="pill" op="modified">modified</span> | |
|
262 | 262 | %endif |
|
263 | 263 | %endif |
|
264 | 264 | %if stats['added']: |
|
265 |
<span class=" |
|
|
265 | <span class="pill" op="added">+${stats['added']}</span> | |
|
266 | 266 | %endif |
|
267 | 267 | %if stats['deleted']: |
|
268 |
<span class=" |
|
|
268 | <span class="pill" op="deleted">-${stats['deleted']}</span> | |
|
269 | 269 | %endif |
|
270 | 270 | </span> |
|
271 | 271 | |
@@ -276,7 +276,7 b' from rhodecode.lib.diffs import NEW_FILE' | |||
|
276 | 276 | </%def> |
|
277 | 277 | |
|
278 | 278 | <%def name="diff_menu(filediff)"> |
|
279 | <div class="diff-menu"> | |
|
279 | <div class="filediff-menu"> | |
|
280 | 280 | %if filediff.diffset.source_ref: |
|
281 | 281 | %if filediff.patch['operation'] in ['D', 'M']: |
|
282 | 282 | <a |
General Comments 0
You need to be logged in to leave comments.
Login now