Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore function to "Show more" buttons #22399

Merged
Prev Previous commit
Next Next commit
rename diff-show-more-button to diff-load-button as it is loading the…
… diff for a specific file and clearly the old name is confusing people

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath committed Jan 12, 2023
commit a531c6ed02a8938a04a9d5a252a93f5f059249ce
2 changes: 1 addition & 1 deletion templates/repo/diff/box.tmpl
Original file line number Diff line number Diff line change
@@ -143,7 +143,7 @@
{{$.locale.Tr "repo.diff.file_suppressed_line_too_long"}}
{{else}}
{{$.locale.Tr "repo.diff.file_suppressed"}}
<a class="ui basic tiny button diff-show-more-button" data-href="{{$.Link}}?file-only=true&files={{$file.Name}}&files={{$file.OldName}}">{{$.locale.Tr "repo.diff.load"}}</a>
<a class="ui basic tiny button diff-load-button" data-href="{{$.Link}}?file-only=true&files={{$file.Name}}&files={{$file.OldName}}">{{$.locale.Tr "repo.diff.load"}}</a>
{{end}}
{{else}}
{{$.locale.Tr "repo.diff.bin_not_shown"}}
2 changes: 1 addition & 1 deletion web_src/js/features/repo-diff.js
Original file line number Diff line number Diff line change
@@ -159,7 +159,7 @@ export function initRepoDiffShowMore() {
loadMoreFiles($target.data('href'), () => {});
});

$(document).on('click', 'a.diff-show-more-button', (e) => {
$(document).on('click', 'a.diff-load-button', (e) => {
e.preventDefault();
const $target = $(e.target);