Show More
@@ -775,10 +775,10 b' var CommentsController = function() {' | |||
|
775 | 775 | linkifyComments($('.inline-comment-injected')); |
|
776 | 776 | timeagoActivate(); |
|
777 | 777 | |
|
778 |
if (window. |
|
|
778 | if (window.updateSticky !== undefined) { | |
|
779 | 779 | // potentially our comments change the active window size, so we |
|
780 |
// notify |
|
|
781 |
|
|
|
780 | // notify sticky elements | |
|
781 | updateSticky() | |
|
782 | 782 | } |
|
783 | 783 | |
|
784 | 784 | commentForm.setActionButtonsDisabled(false); |
@@ -157,7 +157,7 b' collapse_all = len(diffset.files) > coll' | |||
|
157 | 157 | ## anchor with support of sticky header |
|
158 | 158 | <div class="anchor" id="a_${h.FID(filediff.raw_id, filediff.patch['filename'])}"></div> |
|
159 | 159 | |
|
160 |
<input ${(collapse_all and 'checked' or '')} class="filediff-collapse-state" id="filediff-collapse-${id(filediff)}" type="checkbox" onchange=" |
|
|
160 | <input ${(collapse_all and 'checked' or '')} class="filediff-collapse-state" id="filediff-collapse-${id(filediff)}" type="checkbox" onchange="updateSticky();"> | |
|
161 | 161 | <div |
|
162 | 162 | class="filediff" |
|
163 | 163 | data-f-path="${filediff.patch['filename']}" |
@@ -189,10 +189,10 b' collapse_all = len(diffset.files) > coll' | |||
|
189 | 189 | <td class="cb-text" ${(c.user_session_attrs["diffmode"] == 'unified' and 'colspan=4' or 'colspan=6')}> |
|
190 | 190 | ${_('This diff has been collapsed as it changes many lines, (%i lines changed)' % lines_changed)} |
|
191 | 191 | <a href="#" class="cb-expand" |
|
192 | onclick="$(this).closest('table').removeClass('cb-collapsed'); return false;">${_('Show them')} | |
|
192 | onclick="$(this).closest('table').removeClass('cb-collapsed'); updateSticky(); return false;">${_('Show them')} | |
|
193 | 193 | </a> |
|
194 | 194 | <a href="#" class="cb-collapse" |
|
195 | onclick="$(this).closest('table').addClass('cb-collapsed'); return false;">${_('Hide them')} | |
|
195 | onclick="$(this).closest('table').addClass('cb-collapsed'); updateSticky(); return false;">${_('Hide them')} | |
|
196 | 196 | </a> |
|
197 | 197 | </td> |
|
198 | 198 | </tr> |
@@ -292,7 +292,7 b' collapse_all = len(diffset.files) > coll' | |||
|
292 | 292 | display_state = '' |
|
293 | 293 | %> |
|
294 | 294 | <div class="filediffs filediff-outdated" style="${display_state}"> |
|
295 |
<input ${(collapse_all and 'checked' or '')} class="filediff-collapse-state" id="filediff-collapse-${id(filename)}" type="checkbox" onchange=" |
|
|
295 | <input ${(collapse_all and 'checked' or '')} class="filediff-collapse-state" id="filediff-collapse-${id(filename)}" type="checkbox" onchange="updateSticky();"> | |
|
296 | 296 | <div class="filediff" data-f-path="${filename}" id="a_${h.FID(filediff.raw_id, filename)}"> |
|
297 | 297 | <label for="filediff-collapse-${id(filename)}" class="filediff-heading"> |
|
298 | 298 | <div class="filediff-collapse-indicator"></div> |
@@ -778,11 +778,11 b' def get_comments_for(diff_type, comments' | |||
|
778 | 778 | <a |
|
779 | 779 | class="btn" |
|
780 | 780 | href="#" |
|
781 |
onclick="$('input[class=filediff-collapse-state]').prop('checked', false); |
|
|
781 | onclick="$('input[class=filediff-collapse-state]').prop('checked', false); updateSticky(); return false">${_('Expand All Files')}</a> | |
|
782 | 782 | <a |
|
783 | 783 | class="btn" |
|
784 | 784 | href="#" |
|
785 |
onclick="$('input[class=filediff-collapse-state]').prop('checked', true); |
|
|
785 | onclick="$('input[class=filediff-collapse-state]').prop('checked', true); updateSticky(); return false">${_('Collapse All Files')}</a> | |
|
786 | 786 | <a |
|
787 | 787 | class="btn" |
|
788 | 788 | href="#" |
@@ -900,7 +900,7 b' def get_comments_for(diff_type, comments' | |||
|
900 | 900 | window.location.hash = idSelector; |
|
901 | 901 | // expand the container if we quick-select the field |
|
902 | 902 | $(idSelector).next().prop('checked', false); |
|
903 | Waypoint.refreshAll() | |
|
903 | updateSticky() | |
|
904 | 904 | }); |
|
905 | 905 | |
|
906 | 906 | var contextPrefix = _gettext('Context file: '); |
@@ -917,7 +917,8 b' def get_comments_for(diff_type, comments' | |||
|
917 | 917 | }); |
|
918 | 918 | |
|
919 | 919 | updateSticky = function () { |
|
920 | sidebar.updateSticky() | |
|
920 | sidebar.updateSticky(); | |
|
921 | Waypoint.refreshAll(); | |
|
921 | 922 | }; |
|
922 | 923 | |
|
923 | 924 | var animateText = $.debounce(100, function(fPath, anchorId) { |
General Comments 0
You need to be logged in to leave comments.
Login now