From 459e1b42e26bf5f73732b58648cc5626be19a02b Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 20 2018 08:20:42 +0000 Subject: Add a button to delete empty line when adding new tags Fixes https://pagure.io/pagure/issue/3079 Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/templates/settings.html b/pagure/templates/settings.html index 800af58..e1c8c44 100644 --- a/pagure/templates/settings.html +++ b/pagure/templates/settings.html @@ -1216,10 +1216,10 @@ $('#new_tag').click(function(e) {
\ New Tag\
\ -
\ +
\ Description\
\ -
\ +
\ Tag Color\
\
'); @@ -1231,7 +1231,7 @@ $('#new_tag').click(function(e) { \
\ -
\ +
\ \
\ @@ -1239,10 +1239,20 @@ $('#new_tag').click(function(e) { \
\ +
\ + \ +
\ ' ); + set_up_del_tag_tbn(); }); +function set_up_del_tag_tbn() { + $('.del_tag_tbn').click(function(e) { + $(this).parent().parent().remove(); + }); +} + $('.extend-form').click(function(e) { const tgt = $(this).attr('data-target'); let form = $(tgt + ' > div:last-child').clone();