##// END OF EJS Templates
diffs: exclude +/- from diffs generation and make then a non-selectable markers visible only via CSS.
dan -
r3135:5cc59605 default
parent child Browse files
Show More
@@ -293,26 +293,13 b' Added a symlink'
293 """ + diffs['svn'],
293 """ + diffs['svn'],
294 }
294 }
295
295
296 def _check_diff_menus(self, response, right_menu=False,):
296 def _check_new_diff_menus(self, response, right_menu=False,):
297 # diff menus
297 # individual file diff menus
298 for elem in ['Show File', 'Unified Diff', 'Side-by-side Diff',
298 for elem in ['Show file before', 'Show file after']:
299 'Raw Diff', 'Download Diff']:
300 response.mustcontain(elem)
299 response.mustcontain(elem)
301
300
302 # right pane diff menus
301 # right pane diff menus
303 if right_menu:
302 if right_menu:
304 for elem in ['Ignore whitespace', 'Increase context',
303 for elem in ['Hide whitespace changes', 'Toggle Wide Mode diff',
305 'Hide comments']:
304 'Show full context diff']:
306 response.mustcontain(elem)
305 response.mustcontain(elem)
307
308 def _check_new_diff_menus(self, response, right_menu=False,):
309 # diff menus
310 for elem in ['Show file before', 'Show file after',
311 'Raw diff', 'Download diff']:
312 response.mustcontain(elem)
313
314 # right pane diff menus
315 if right_menu:
316 for elem in ['Ignore whitespace', 'Increase context',
317 'Hide comments']:
318 response.mustcontain(elem)
@@ -1145,7 +1145,7 b' class DiffLimitExceeded(Exception):'
1145
1145
1146 # NOTE(marcink): if diffs.mako change, probably this
1146 # NOTE(marcink): if diffs.mako change, probably this
1147 # needs a bump to next version
1147 # needs a bump to next version
1148 CURRENT_DIFF_VERSION = 'v3'
1148 CURRENT_DIFF_VERSION = 'v4'
1149
1149
1150
1150
1151 def _cleanup_cache_file(cached_diff_file):
1151 def _cleanup_cache_file(cached_diff_file):
@@ -1098,6 +1098,17 b' table.cb {'
1098 .nonl {
1098 .nonl {
1099 color: @color5;
1099 color: @color5;
1100 }
1100 }
1101 .cb-action {
1102 &:before {
1103 content: " ";
1104 }
1105 &.cb-deletion:before {
1106 content: "- ";
1107 }
1108 &.cb-addition:before {
1109 content: "+ ";
1110 }
1111 }
1101 }
1112 }
1102
1113
1103 &> button.cb-comment-box-opener {
1114 &> button.cb-comment-box-opener {
@@ -573,7 +573,7 b' def get_comments_for(diff_type, comments'
573 %if use_comments and line.original.lineno:
573 %if use_comments and line.original.lineno:
574 ${render_add_comment_button()}
574 ${render_add_comment_button()}
575 %endif
575 %endif
576 <span class="cb-code">${line.original.action} ${line.original.content or '' | n}</span>
576 <span class="cb-code"><span class="cb-action ${action_class(line.original.action)}"></span>${line.original.content or '' | n}</span>
577
577
578 %if use_comments and line.original.lineno and line_old_comments:
578 %if use_comments and line.original.lineno and line_old_comments:
579 ${inline_comments_container(line_old_comments, inline_comments)}
579 ${inline_comments_container(line_old_comments, inline_comments)}
@@ -616,7 +616,7 b' def get_comments_for(diff_type, comments'
616 %if use_comments and line.modified.lineno:
616 %if use_comments and line.modified.lineno:
617 ${render_add_comment_button()}
617 ${render_add_comment_button()}
618 %endif
618 %endif
619 <span class="cb-code">${line.modified.action} ${line.modified.content or '' | n}</span>
619 <span class="cb-code"><span class="cb-action ${action_class(line.modified.action)}"></span>${line.modified.content or '' | n}</span>
620 %if use_comments and line.modified.lineno and line_new_comments:
620 %if use_comments and line.modified.lineno and line_new_comments:
621 ${inline_comments_container(line_new_comments, inline_comments)}
621 ${inline_comments_container(line_new_comments, inline_comments)}
622 %endif
622 %endif
@@ -682,7 +682,7 b' def get_comments_for(diff_type, comments'
682 %if use_comments:
682 %if use_comments:
683 ${render_add_comment_button()}
683 ${render_add_comment_button()}
684 %endif
684 %endif
685 <span class="cb-code">${action} ${content or '' | n}</span>
685 <span class="cb-code"><span class="cb-action ${action_class(action)}"></span> ${content or '' | n}</span>
686 %if use_comments and comments:
686 %if use_comments and comments:
687 ${inline_comments_container(comments, inline_comments)}
687 ${inline_comments_container(comments, inline_comments)}
688 %endif
688 %endif
@@ -947,7 +947,7 b' def get_comments_for(diff_type, comments'
947 ## Wide diff mode
947 ## Wide diff mode
948 {
948 {
949 id: 1,
949 id: 1,
950 text: _gettext('Toggle Wide Mode Diff'),
950 text: _gettext('Toggle Wide Mode diff'),
951 action: function () {
951 action: function () {
952 updateSticky();
952 updateSticky();
953 Rhodecode.comments.toggleWideMode(this);
953 Rhodecode.comments.toggleWideMode(this);
@@ -1007,10 +1007,10 b' def get_comments_for(diff_type, comments'
1007 window.location = e.choice.url
1007 window.location = e.choice.url
1008 }
1008 }
1009 });
1009 });
1010
1010
1011 });
1011 });
1012
1012
1013 </script>
1013 </script>
1014 % endif
1014 % endif
1015
1015
1016 </%def> No newline at end of file
1016 </%def>
General Comments 0
You need to be logged in to leave comments. Login now