Show More
@@ -158,7 +158,7 b'' | |||||
158 |
|
158 | |||
159 | <div class="cs_files"> |
|
159 | <div class="cs_files"> | |
160 | <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/> |
|
160 | <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/> | |
161 | ${cbdiffs.render_diffset_menu(c.changes[c.commit.raw_id])} |
|
161 | ${cbdiffs.render_diffset_menu(c.changes[c.commit.raw_id], commit=c.commit)} | |
162 | ${cbdiffs.render_diffset( |
|
162 | ${cbdiffs.render_diffset( | |
163 | c.changes[c.commit.raw_id], commit=c.commit, use_comments=True,inline_comments=c.inline_comments )} |
|
163 | c.changes[c.commit.raw_id], commit=c.commit, use_comments=True,inline_comments=c.inline_comments )} | |
164 | </div> |
|
164 | </div> |
@@ -855,7 +855,7 b' def get_comments_for(diff_type, comments' | |||||
855 | </button> |
|
855 | </button> | |
856 | </%def> |
|
856 | </%def> | |
857 |
|
857 | |||
858 | <%def name="render_diffset_menu(diffset, range_diff_on=None)"> |
|
858 | <%def name="render_diffset_menu(diffset, range_diff_on=None, commit=None, pull_request_menu=None)"> | |
859 | <% diffset_container_id = h.md5(diffset.target_ref) %> |
|
859 | <% diffset_container_id = h.md5(diffset.target_ref) %> | |
860 |
|
860 | |||
861 | <div id="diff-file-sticky" class="diffset-menu clearinner"> |
|
861 | <div id="diff-file-sticky" class="diffset-menu clearinner"> | |
@@ -923,13 +923,25 b' def get_comments_for(diff_type, comments' | |||||
923 | </strong> |
|
923 | </strong> | |
924 | </div> |
|
924 | </div> | |
925 | <div class="pull-right noselect"> |
|
925 | <div class="pull-right noselect"> | |
926 | <span id="diff_nav">Loading diff...:</span> |
|
926 | ||
927 | <span class="cursor-pointer" onclick="scrollToPrevChunk(); return false"> |
|
927 | %if commit: | |
928 |
< |
|
928 | <span> | |
929 | </span> |
|
929 | <code>${h.show_id(commit)}</code> | |
930 | <span class="cursor-pointer" onclick="scrollToNextChunk(); return false"> |
|
930 | </span> | |
931 | <i class="icon-angle-down"></i> |
|
931 | %elif pull_request_menu and pull_request_menu.get('pull_request'): | |
932 |
< |
|
932 | <span> | |
|
933 | <code>!${pull_request_menu['pull_request'].pull_request_id}</code> | |||
|
934 | </span> | |||
|
935 | %endif | |||
|
936 | % if commit or pull_request_menu: | |||
|
937 | <span id="diff_nav">Loading diff...:</span> | |||
|
938 | <span class="cursor-pointer" onclick="scrollToPrevChunk(); return false"> | |||
|
939 | <i class="icon-angle-up"></i> | |||
|
940 | </span> | |||
|
941 | <span class="cursor-pointer" onclick="scrollToNextChunk(); return false"> | |||
|
942 | <i class="icon-angle-down"></i> | |||
|
943 | </span> | |||
|
944 | % endif | |||
933 | </div> |
|
945 | </div> | |
934 | <div class="sidebar_inner_shadow"></div> |
|
946 | <div class="sidebar_inner_shadow"></div> | |
935 | </div> |
|
947 | </div> | |
@@ -1053,6 +1065,8 b' def get_comments_for(diff_type, comments' | |||||
1053 | e.preventDefault(); |
|
1065 | e.preventDefault(); | |
1054 | }); |
|
1066 | }); | |
1055 |
|
1067 | |||
|
1068 | diffNavText = 'diff navigation:' | |||
|
1069 | ||||
1056 | getCurrentChunk = function () { |
|
1070 | getCurrentChunk = function () { | |
1057 |
|
1071 | |||
1058 | var chunksAll = $('.nav-chunk').filter(function () { |
|
1072 | var chunksAll = $('.nav-chunk').filter(function () { | |
@@ -1098,15 +1112,15 b' def get_comments_for(diff_type, comments' | |||||
1098 |
|
1112 | |||
1099 | if (curElem === undefined) { |
|
1113 | if (curElem === undefined) { | |
1100 | // end or back |
|
1114 | // end or back | |
1101 |
$('#diff_nav').html(' |
|
1115 | $('#diff_nav').html('no next diff element:') | |
1102 | animateDiffNavText() |
|
1116 | animateDiffNavText() | |
1103 | return |
|
1117 | return | |
1104 | } else if (newPos < 0) { |
|
1118 | } else if (newPos < 0) { | |
1105 |
$('#diff_nav').html(' |
|
1119 | $('#diff_nav').html('no previous diff element:') | |
1106 | animateDiffNavText() |
|
1120 | animateDiffNavText() | |
1107 | return |
|
1121 | return | |
1108 | } else { |
|
1122 | } else { | |
1109 |
$('#diff_nav').html( |
|
1123 | $('#diff_nav').html(diffNavText) | |
1110 | } |
|
1124 | } | |
1111 |
|
1125 | |||
1112 | curElem = $(curElem) |
|
1126 | curElem = $(curElem) | |
@@ -1347,7 +1361,7 b' def get_comments_for(diff_type, comments' | |||||
1347 | lastScrollY = currentScrollY; |
|
1361 | lastScrollY = currentScrollY; | |
1348 |
|
1362 | |||
1349 | }); |
|
1363 | }); | |
1350 |
$('#diff_nav').html( |
|
1364 | $('#diff_nav').html(diffNavText); | |
1351 |
|
1365 | |||
1352 | }); |
|
1366 | }); | |
1353 | </script> |
|
1367 | </script> |
@@ -624,11 +624,12 b'' | |||||
624 |
|
624 | |||
625 | <% |
|
625 | <% | |
626 | pr_menu_data = { |
|
626 | pr_menu_data = { | |
627 | 'outdated_comm_count_ver': outdated_comm_count_ver |
|
627 | 'outdated_comm_count_ver': outdated_comm_count_ver, | |
|
628 | 'pull_request': c.pull_request | |||
628 | } |
|
629 | } | |
629 | %> |
|
630 | %> | |
630 |
|
631 | |||
631 | ${cbdiffs.render_diffset_menu(c.diffset, range_diff_on=c.range_diff_on)} |
|
632 | ${cbdiffs.render_diffset_menu(c.diffset, range_diff_on=c.range_diff_on, pull_request_menu=pr_menu_data)} | |
632 |
|
633 | |||
633 | % if c.range_diff_on: |
|
634 | % if c.range_diff_on: | |
634 | % for commit in c.commit_ranges: |
|
635 | % for commit in c.commit_ranges: |
General Comments 0
You need to be logged in to leave comments.
Login now