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