From 1d2ea09125bfe9db7053340547d0213ac2751244 Mon Sep 17 00:00:00 2001 From: Marcin Kuzminski Date: Mon, 1 Jul 2019 10:48:23 +0200 Subject: [PATCH] commits: use short-id for range selector --- rhodecode/templates/commits/changelog.mako | 7 ++----- rhodecode/templates/commits/changelog_elements.mako | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/rhodecode/templates/commits/changelog.mako b/rhodecode/templates/commits/changelog.mako index 7b626314..2e5d8ada 100644 --- a/rhodecode/templates/commits/changelog.mako +++ b/rhodecode/templates/commits/changelog.mako @@ -177,11 +177,8 @@ var commitEnd = $(selectedCheckboxes[0]).data(); var revEnd = commitEnd.commitId; - var lbl_start = 'r{0}:{1}'.format(commitStart.commitIdx, commitStart.commitId.substr(0,6)); - var lbl_end = 'r{0}:{1}'.format(commitEnd.commitIdx, commitEnd.commitId.substr(0,6)); - - var lbl_start = '{0}'.format(commitStart.commitId.substr(0,6)); - var lbl_end = '{0}'.format(commitEnd.commitId.substr(0,6)); + var lbl_start = '{0}'.format(commitStart.commitIdx, commitStart.shortId); + var lbl_end = '{0}'.format(commitEnd.commitIdx, commitEnd.shortId); var url = pyroutes.url('repo_commit', {'repo_name': '${c.repo_name}', 'commit_id': revStart+'...'+revEnd}); var link = _gettext('Show commit range {0} ... {1}').format(lbl_start, lbl_end); diff --git a/rhodecode/templates/commits/changelog_elements.mako b/rhodecode/templates/commits/changelog_elements.mako index a24094b0..187ff768 100644 --- a/rhodecode/templates/commits/changelog_elements.mako +++ b/rhodecode/templates/commits/changelog_elements.mako @@ -21,7 +21,7 @@ - ${h.checkbox(commit.raw_id,class_="commit-range", **{'data-commit-idx':commit.idx, 'data-commit-id': commit.raw_id})} + ${h.checkbox(commit.raw_id,class_="commit-range", **{'data-commit-idx':commit.idx, 'data-commit-id': commit.raw_id, 'data-short-id': commit.short_id})} ##