diff --git a/frontends/etiquette_flask/static/js/api.js b/frontends/etiquette_flask/static/js/api.js index fda62ec..506ff7c 100644 --- a/frontends/etiquette_flask/static/js/api.js +++ b/frontends/etiquette_flask/static/js/api.js @@ -149,6 +149,31 @@ function edit(bookmark_id, title, url, callback) /**************************************************************************************************/ api.photos = {}; +api.photos.add_tag = +function add_tag(photo_id, tagname, callback) +{ + var url = `/photo/${photo_id}/add_tag`; + var data = new FormData(); + data.append("tagname", tagname); + common.post(url, data, callback); +} + +api.photos.refresh_metadata = +function refresh_metadata(photo_id, callback) +{ + var url = `/photo/${photo_id}/refresh_metadata`; + common.post(url, null, callback); +} + +api.photos.remove_tag = +function remove_tag(photo_id, tagname, callback) +{ + var url = `/photo/${photo_id}/remove_tag`; + var data = new FormData(); + data.append("tagname", tagname); + common.post(url, data, callback); +} + /**************************************************************************************************/ api.tags = {}; diff --git a/frontends/etiquette_flask/templates/photo.html b/frontends/etiquette_flask/templates/photo.html index 66d46d2..1808002 100644 --- a/frontends/etiquette_flask/templates/photo.html +++ b/frontends/etiquette_flask/templates/photo.html @@ -8,6 +8,7 @@ + @@ -187,7 +188,7 @@ body

File info - +