From dd006db5a719b33aef7887faab48718e4b0f2786 Mon Sep 17 00:00:00 2001 From: Harshit Bansal Date: Mon, 7 Jan 2019 01:38:25 +0530 Subject: [PATCH] Display branch name in delete branch confirmation modal. (#5654) Fixes: #5630. --- public/js/index.js | 4 ++-- templates/admin/repo/list.tmpl | 4 ++-- templates/repo/branch/list.tmpl | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/js/index.js b/public/js/index.js index 1377e9f36a..70cad04e94 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -561,7 +561,7 @@ function initRepository() { if ($('.repository.settings.options').length > 0) { $('#repo_name').keyup(function () { var $prompt = $('#repo-name-change-prompt'); - if ($(this).val().toString().toLowerCase() != $(this).data('repo-name').toString().toLowerCase()) { + if ($(this).val().toString().toLowerCase() != $(this).data('name').toString().toLowerCase()) { $prompt.show(); } else { $prompt.hide(); @@ -2071,7 +2071,7 @@ function showDeletePopup() { } var dialog = $('.delete.modal' + filter); - dialog.find('.repo-name').text($this.data('repo-name')); + dialog.find('.name').text($this.data('name')); dialog.modal({ closable: false, diff --git a/templates/admin/repo/list.tmpl b/templates/admin/repo/list.tmpl index f706eaa1c8..2054b32178 100644 --- a/templates/admin/repo/list.tmpl +++ b/templates/admin/repo/list.tmpl @@ -39,7 +39,7 @@ {{.NumIssues}} {{SizeFmt .Size}} {{.CreatedUnix.FormatShort}} - + {{end}} @@ -57,7 +57,7 @@

{{.i18n.Tr "repo.settings.delete_desc"}}

- {{.i18n.Tr "repo.settings.delete_notices_2" `` | Safe}}
+ {{.i18n.Tr "repo.settings.delete_notices_2" `` | Safe}}
{{.i18n.Tr "repo.settings.delete_notices_fork_1"}}
{{template "base/delete_modal_actions" .}} diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl index ce0558e92b..0242d1d107 100644 --- a/templates/repo/branch/list.tmpl +++ b/templates/repo/branch/list.tmpl @@ -52,7 +52,7 @@ {{else if .IsDeleted}} {{else}} - + {{end}} {{end}} @@ -69,7 +69,7 @@