diff --git a/frontends/etiquette_flask/templates/album.html b/frontends/etiquette_flask/templates/album.html index 08779cb..b57bfce 100644 --- a/frontends/etiquette_flask/templates/album.html +++ b/frontends/etiquette_flask/templates/album.html @@ -50,8 +50,16 @@ p {{header.make_header(session=session)}}

- {{album.display_name}} + + {{-album.display_name-}} +

+
 
diff --git a/frontends/etiquette_flask/templates/bookmarks.html b/frontends/etiquette_flask/templates/bookmarks.html
index abe6b93..e6d785e 100644
--- a/frontends/etiquette_flask/templates/bookmarks.html
+++ b/frontends/etiquette_flask/templates/bookmarks.html
@@ -48,23 +48,27 @@
         
{% for bookmark in bookmarks %} {% endfor %} @@ -104,13 +108,13 @@ function create_bookmark(url, title) } -function on_open(editor, edit_element_map) +function on_open(ed, edit_element_map) { - editor.open(); + ed.open(); edit_element_map["title"].focus(); } -function on_save(editor, edit_element_map) +function on_save(ed, edit_element_map) { var title_editor = edit_element_map["title"]; var url_editor = edit_element_map["url"]; @@ -120,14 +124,14 @@ function on_save(editor, edit_element_map) return; } - editor.show_spinner(); + ed.show_spinner(); function callback() { - editor.hide_spinner(); - editor.save(); + ed.hide_spinner(); + ed.save(); } - var url = "/bookmark/" + editor.misc_data["bookmark_id"] + "/edit"; + var url = "/bookmark/" + ed.misc_data["bookmark_id"] + "/edit"; var data = new FormData(); data.append("title", title_editor.value); data.append("url", url_editor.value); @@ -144,8 +148,8 @@ function create_editors() var card = cards[index]; var title_div = card.getElementsByClassName("bookmark_title")[0]; var url_div = card.getElementsByClassName("bookmark_url")[0]; - editor = new editor.Editor([title_div, url_div], on_open, on_save, on_cancel); - editor.misc_data["bookmark_id"] = card.dataset.bookmarkId; + ed = new editor.Editor([title_div, url_div], on_open, on_save, on_cancel); + ed.misc_data["bookmark_id"] = card.dataset.bookmarkId; } } create_editors(); diff --git a/frontends/etiquette_flask/templates/tags.html b/frontends/etiquette_flask/templates/tags.html index 1dd1c29..e11d964 100644 --- a/frontends/etiquette_flask/templates/tags.html +++ b/frontends/etiquette_flask/templates/tags.html @@ -241,24 +241,24 @@ function receive_callback(response) } {% if specific_tag is not none %} -function on_open(editor, edit_element_map) +function on_open(ed, edit_element_map) { - editor.open(); + ed.open(); edit_element_map["name"].focus(); } -function on_save(editor, edit_element_map, display_element_map) +function on_save(ed, edit_element_map, display_element_map) { var name_display = display_element_map["name"]; var name_editor = edit_element_map["name"]; var description_display = display_element_map["description"]; var description_editor = edit_element_map["description"]; - editor.show_spinner(); + ed.show_spinner(); function callback(response) { console.log(response); - editor.hide_spinner(); + ed.hide_spinner(); if (response["meta"]["status"] == 200) { var new_name = response["data"]["name"]; @@ -267,7 +267,7 @@ function on_save(editor, edit_element_map, display_element_map) window.history.replaceState(null, null, "/tag/" + new_name); name_editor.value = new_name; description_editor.value = new_description; - editor.save(); + ed.save(); if (new_description === "") { description_display.classList.add("hidden"); @@ -282,9 +282,9 @@ function on_save(editor, edit_element_map, display_element_map) common.post(url, data, callback); } -function on_cancel(editor, edit_element_map, display_element_map) +function on_cancel(ed, edit_element_map, display_element_map) { - editor.cancel(); + ed.cancel(); if (display_element_map["description"].innerText == "") { display_element_map["description"].classList.add("hidden"); @@ -293,7 +293,7 @@ function on_cancel(editor, edit_element_map, display_element_map) var name_text = document.getElementById("name_text"); var description_text = document.getElementById("description_text"); -var editor = new editor.Editor([name_text, description_text], on_open, on_save, on_cancel); +var ed = new editor.Editor([name_text, description_text], on_open, on_save, on_cancel); {% endif %}