From bbadd151292e5be9ebffccf4c9038aee6108c98d Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 12 Sep 2020 11:59:03 -0700 Subject: [PATCH] Put the callbacks next to their respective form functions. --- frontends/etiquette_flask/templates/photo.html | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/frontends/etiquette_flask/templates/photo.html b/frontends/etiquette_flask/templates/photo.html index be9a363..5259104 100644 --- a/frontends/etiquette_flask/templates/photo.html +++ b/frontends/etiquette_flask/templates/photo.html @@ -300,13 +300,6 @@ function add_photo_tag_form() api.photos.add_tag(PHOTO_ID, tagname, add_photo_tag_callback); add_tag_box.value = ""; } - -function remove_photo_tag_form(photo_id, tagname) -{ - api.photos.remove_tag(photo_id, tagname, remove_photo_tag_callback); - add_tag_box.focus(); -} - function add_photo_tag_callback(response) { add_remove_photo_tag_callback(response); @@ -336,6 +329,11 @@ function add_photo_tag_callback(response) this_tags.appendChild(li); } +function remove_photo_tag_form(photo_id, tagname) +{ + api.photos.remove_tag(photo_id, tagname, remove_photo_tag_callback); + add_tag_box.focus(); +} function remove_photo_tag_callback(response) { add_remove_photo_tag_callback(response);