diff --git a/frontends/etiquette_flask/static/js/api.js b/frontends/etiquette_flask/static/js/api.js
index 33018fb..16eb827 100644
--- a/frontends/etiquette_flask/static/js/api.js
+++ b/frontends/etiquette_flask/static/js/api.js
@@ -1,4 +1,4 @@
-var api = {};
+const api = {};
/**************************************************************************************************/
api.albums = {};
diff --git a/frontends/etiquette_flask/static/js/common.js b/frontends/etiquette_flask/static/js/common.js
index 26665af..349eac6 100644
--- a/frontends/etiquette_flask/static/js/common.js
+++ b/frontends/etiquette_flask/static/js/common.js
@@ -1,12 +1,12 @@
-var common = {};
+const common = {};
common.INPUT_TYPES = new Set(["INPUT", "TEXTAREA"]);
common._request =
function _request(method, url, callback)
{
- let request = new XMLHttpRequest();
- let response = {
+ const request = new XMLHttpRequest();
+ const response = {
"completed": false,
};
@@ -29,7 +29,7 @@ function _request(method, url, callback)
}
callback(response);
};
- let asynchronous = true;
+ const asynchronous = true;
request.open(method, url, asynchronous);
return request;
}
@@ -61,7 +61,7 @@ function bind_box_to_button(box, button, ctrl_enter)
Thanks Yaroslav Yakovlev
http://stackoverflow.com/a/9343095
*/
- let bound_box_hook = function(event)
+ const bound_box_hook = function(event)
{
if (event.key !== "Enter")
{return;}
@@ -83,9 +83,9 @@ function create_message_bubble(message_area, message_positivity, message_text, l
{
lifespan = 8000;
}
- let message = document.createElement("div");
+ const message = document.createElement("div");
message.className = "message_bubble " + message_positivity;
- let span = document.createElement("span");
+ const span = document.createElement("span");
span.innerHTML = message_text;
message.appendChild(span);
message_area.appendChild(message);
@@ -168,7 +168,7 @@ function entry_with_history_hook(event)
common.html_to_element =
function html_to_element(html)
{
- let template = document.createElement("template");
+ const template = document.createElement("template");
template.innerHTML = html.trim();
return template.content.firstElementChild;
}
@@ -200,13 +200,13 @@ function init_atag_merge_params(a)
if (a.dataset.mergeParams)
{
- let keep = new Set(a.dataset.mergeParams.split(/[\s,]+/));
+ const keep = new Set(a.dataset.mergeParams.split(/[\s,]+/));
to_merge = page_params.filter(key_value => keep.has(key_value[0]));
delete a.dataset.mergeParams;
}
else if (a.dataset.mergeParamsExcept)
{
- let remove = new Set(a.dataset.mergeParamsExcept.split(/[\s,]+/));
+ const remove = new Set(a.dataset.mergeParamsExcept.split(/[\s,]+/));
to_merge = page_params.filter(key_value => (! remove.has(key_value[0])));
delete a.dataset.mergeParamsExcept;
}
@@ -227,7 +227,7 @@ common.init_all_atag_merge_params =
function init_all_atag_merge_params()
{
const page_params = Array.from(new URLSearchParams(window.location.search));
- let as = Array.from(document.getElementsByClassName("merge_params"));
+ const as = Array.from(document.getElementsByClassName("merge_params"));
for (const a of as)
{
setTimeout(() => common.init_atag_merge_params(a), 0);
@@ -269,16 +269,16 @@ function init_button_with_confirm(button)
*/
button.classList.remove("button_with_confirm");
- let holder = document.createElement("span");
+ const holder = document.createElement("span");
holder.className = "confirm_holder " + (button.dataset.holderClass || "");
button.parentElement.insertBefore(holder, button);
- let holder_stage1 = document.createElement("span");
+ const holder_stage1 = document.createElement("span");
holder_stage1.className = "confirm_holder_stage1";
holder_stage1.appendChild(button);
holder.appendChild(holder_stage1);
- let holder_stage2 = document.createElement("span");
+ const holder_stage2 = document.createElement("span");
holder_stage2.className = "confirm_holder_stage2 hidden";
holder.appendChild(holder_stage2);
@@ -301,7 +301,7 @@ function init_button_with_confirm(button)
delete button.dataset.prompt;
delete button.dataset.promptClass;
- let button_confirm = document.createElement("button");
+ const button_confirm = document.createElement("button");
button_confirm.innerText = (button.dataset.confirm || button.innerText).trim();
if (button.dataset.confirmClass === undefined)
{
@@ -323,7 +323,7 @@ function init_button_with_confirm(button)
delete button.dataset.confirmClass;
delete button.dataset.isInput;
- let button_cancel = document.createElement("button");
+ const button_cancel = document.createElement("button");
button_cancel.innerText = button.dataset.cancel || "Cancel";
button_cancel.className = button.dataset.cancelClass || "";
holder_stage2.appendChild(button_cancel);
@@ -331,7 +331,7 @@ function init_button_with_confirm(button)
delete button.dataset.cancelClass;
// If this is stupid, let me know.
- let confirm_onclick = `
+ const confirm_onclick = `
let holder = event.target.parentElement.parentElement;
holder.getElementsByClassName("confirm_holder_stage1")[0].classList.remove("hidden");
holder.getElementsByClassName("confirm_holder_stage2")[0].classList.add("hidden");
@@ -341,10 +341,10 @@ function init_button_with_confirm(button)
button.removeAttribute("onclick");
button.onclick = function(event)
{
- let holder = event.target.parentElement.parentElement;
+ const holder = event.target.parentElement.parentElement;
holder.getElementsByClassName("confirm_holder_stage1")[0].classList.add("hidden");
holder.getElementsByClassName("confirm_holder_stage2")[0].classList.remove("hidden");
- let input = holder.getElementsByTagName("input")[0];
+ const input = holder.getElementsByTagName("input")[0];
if (input)
{
input.focus();
@@ -353,7 +353,7 @@ function init_button_with_confirm(button)
button_cancel.onclick = function(event)
{
- let holder = event.target.parentElement.parentElement;
+ const holder = event.target.parentElement.parentElement;
holder.getElementsByClassName("confirm_holder_stage1")[0].classList.remove("hidden");
holder.getElementsByClassName("confirm_holder_stage2")[0].classList.add("hidden");
}
@@ -363,7 +363,7 @@ function init_button_with_confirm(button)
common.init_all_button_with_confirm =
function init_all_button_with_confirm()
{
- let buttons = Array.from(document.getElementsByClassName("button_with_confirm"));
+ const buttons = Array.from(document.getElementsByClassName("button_with_confirm"));
for (const button of buttons)
{
setTimeout(() => common.init_button_with_confirm(button), 0);
@@ -385,7 +385,7 @@ function init_enable_on_pageload(element)
common.init_all_enable_on_pageload =
function init_all_enable_on_pageload()
{
- let elements = Array.from(document.getElementsByClassName("enable_on_pageload"));
+ const elements = Array.from(document.getElementsByClassName("enable_on_pageload"));
for (const element of elements)
{
setTimeout(() => common.init_enable_on_pageload(element), 0);
@@ -412,18 +412,18 @@ function init_all_entry_with_history()
common.init_tabbed_container =
function init_tabbed_container(tabbed_container)
{
- let button_container = document.createElement("div");
+ const button_container = document.createElement("div");
button_container.className = "tab_buttons";
tabbed_container.prepend(button_container);
- let tabs = Array.from(tabbed_container.getElementsByClassName("tab"));
+ const tabs = Array.from(tabbed_container.getElementsByClassName("tab"));
for (const tab of tabs)
{
tab.classList.add("hidden");
- let tab_id = tab.dataset.tabId || tab.dataset.tabTitle;
+ const tab_id = tab.dataset.tabId || tab.dataset.tabTitle;
tab.dataset.tabId = tab_id;
tab.style.borderTopColor = "transparent";
- let button = document.createElement("button");
+ const button = document.createElement("button");
button.className = "tab_button tab_button_inactive";
button.onclick = common.tabbed_container_switcher;
button.innerText = tab.dataset.tabTitle;
@@ -438,7 +438,7 @@ function init_tabbed_container(tabbed_container)
common.init_all_tabbed_container =
function init_all_tabbed_container()
{
- let tabbed_containers = Array.from(document.getElementsByClassName("tabbed_container"));
+ const tabbed_containers = Array.from(document.getElementsByClassName("tabbed_container"));
for (const tabbed_container of tabbed_containers)
{
setTimeout(() => common.init_tabbed_container(tabbed_container), 0);
@@ -448,13 +448,13 @@ function init_all_tabbed_container()
common.tabbed_container_switcher =
function tabbed_container_switcher(event)
{
- let tab_button = event.target;
+ const tab_button = event.target;
if (tab_button.classList.contains("tab_button_active"))
{ return; }
- let tab_id = tab_button.dataset.tabId;
- let tab_buttons = tab_button.parentElement.getElementsByClassName("tab_button");
- let tabs = tab_button.parentElement.parentElement.getElementsByClassName("tab");
+ const tab_id = tab_button.dataset.tabId;
+ const tab_buttons = tab_button.parentElement.getElementsByClassName("tab_button");
+ const tabs = tab_button.parentElement.parentElement.getElementsByClassName("tab");
for (const tab_button of tab_buttons)
{
if (tab_button.dataset.tabId === tab_id)
diff --git a/frontends/etiquette_flask/static/js/editor.js b/frontends/etiquette_flask/static/js/editor.js
index 7f6ad5a..6aa62dc 100644
--- a/frontends/etiquette_flask/static/js/editor.js
+++ b/frontends/etiquette_flask/static/js/editor.js
@@ -1,4 +1,4 @@
-var editor = {};
+const editor = {};
editor.PARAGRAPH_TYPES = new Set(["P", "PRE"]);
@@ -67,13 +67,13 @@ function Editor(elements, on_open, on_save, on_cancel)
{
for (let index = 0; index < this.display_elements.length; index += 1)
{
- let display_element = this.display_elements[index];
- let edit_element = this.edit_elements[index];
+ const display_element = this.display_elements[index];
+ const edit_element = this.edit_elements[index];
display_element.classList.add("hidden");
edit_element.classList.remove("hidden");
- let empty_text = display_element.dataset.editorEmptyText;
+ const empty_text = display_element.dataset.editorEmptyText;
if (empty_text !== undefined && display_element.innerText == empty_text)
{
edit_element.value = "";
@@ -92,8 +92,8 @@ function Editor(elements, on_open, on_save, on_cancel)
{
for (let index = 0; index < this.display_elements.length; index += 1)
{
- let display_element = this.display_elements[index];
- let edit_element = this.edit_elements[index];
+ const display_element = this.display_elements[index];
+ const edit_element = this.edit_elements[index];
if (display_element.dataset.editorEmptyText !== undefined && edit_element.value == "")
{
@@ -187,7 +187,7 @@ function Editor(elements, on_open, on_save, on_cancel)
return fallback.bind(this);
}
- let bindable = function()
+ const bindable = function()
{
if (this.can_use_element_map)
{
@@ -201,14 +201,14 @@ function Editor(elements, on_open, on_save, on_cancel)
return bindable.bind(this);
}
- let placeholders = document.getElementsByClassName("editor_toolbox_placeholder");
+ const placeholders = document.getElementsByClassName("editor_toolbox_placeholder");
for (const placeholder of placeholders)
{
placeholder.parentElement.removeChild(placeholder);
}
- let last_element = this.edit_elements[this.edit_elements.length - 1];
- let toolbox = document.createElement("div");
+ const last_element = this.edit_elements[this.edit_elements.length - 1];
+ const toolbox = document.createElement("div");
toolbox.classList.add("editor_toolbox");
last_element.parentElement.insertBefore(toolbox, last_element.nextSibling);
diff --git a/frontends/etiquette_flask/static/js/hotkeys.js b/frontends/etiquette_flask/static/js/hotkeys.js
index 8759513..e29e657 100644
--- a/frontends/etiquette_flask/static/js/hotkeys.js
+++ b/frontends/etiquette_flask/static/js/hotkeys.js
@@ -1,4 +1,4 @@
-var hotkeys = {};
+const hotkeys = {};
hotkeys.HOTKEYS = {};
@@ -30,14 +30,14 @@ function register_hotkey(hotkey, action, description)
hotkey = hotkey.split(/\s+/g);
}
- let key = hotkey.pop();
+ const key = hotkey.pop();
modifiers = hotkey.map(word => word.toLocaleLowerCase());
- let ctrlKey = modifiers.includes("control") || modifiers.includes("ctrl");
- let shiftKey = modifiers.includes("shift");
- let altKey = modifiers.includes("alt");
+ const ctrlKey = modifiers.includes("control") || modifiers.includes("ctrl");
+ const shiftKey = modifiers.includes("shift");
+ const altKey = modifiers.includes("alt");
- let identifier = hotkeys.hotkey_identifier(key, ctrlKey, shiftKey, altKey);
- let human = hotkeys.hotkey_human(key, ctrlKey, shiftKey, altKey);
+ const identifier = hotkeys.hotkey_identifier(key, ctrlKey, shiftKey, altKey);
+ const human = hotkeys.hotkey_human(key, ctrlKey, shiftKey, altKey);
hotkeys.HOTKEYS[identifier] = {"action": action, "human": human, "description": description}
}
@@ -61,7 +61,7 @@ function show_all_hotkeys()
let lines = [];
for (const identifier in hotkeys.HOTKEYS)
{
- let line = hotkeys.HOTKEYS[identifier]["human"] + " : " + hotkeys.HOTKEYS[identifier]["description"];
+ const line = hotkeys.HOTKEYS[identifier]["human"] + " : " + hotkeys.HOTKEYS[identifier]["description"];
lines.push(line);
}
lines = lines.join("\n");
diff --git a/frontends/etiquette_flask/static/js/photo_clipboard.js b/frontends/etiquette_flask/static/js/photo_clipboard.js
index 4efa842..04dcd77 100644
--- a/frontends/etiquette_flask/static/js/photo_clipboard.js
+++ b/frontends/etiquette_flask/static/js/photo_clipboard.js
@@ -1,4 +1,4 @@
-var photo_clipboard = {};
+const photo_clipboard = {};
photo_clipboard.clipboard = new Set();
photo_clipboard.on_load_hooks = [];
@@ -17,7 +17,7 @@ photo_clipboard.load_clipboard =
function load_clipboard(event)
{
console.log("Loading photo clipboard from localstorage.");
- let stored = localStorage.getItem("photo_clipboard");
+ const stored = localStorage.getItem("photo_clipboard");
if (stored === null)
{
if (photo_clipboard.clipboard.size != 0)
@@ -42,7 +42,7 @@ photo_clipboard.save_clipboard =
function save_clipboard()
{
console.log("Saving photo clipboard to localstorage.");
- let serialized = JSON.stringify(Array.from(photo_clipboard.clipboard));
+ const serialized = JSON.stringify(Array.from(photo_clipboard.clipboard));
localStorage.setItem("photo_clipboard", serialized);
photo_clipboard.update_pagestate();
@@ -105,8 +105,8 @@ function apply_check_all()
Run through all the photo cards on the page and set their checkbox to the
correct value.
*/
- let checkboxes = document.getElementsByClassName("photo_card_selector_checkbox");
- for (let checkbox of checkboxes)
+ const checkboxes = document.getElementsByClassName("photo_card_selector_checkbox");
+ for (const checkbox of checkboxes)
{
photo_clipboard.apply_check(checkbox);
}
@@ -141,12 +141,12 @@ function on_photo_select(event)
}
else if (event.shiftKey && photo_clipboard.previous_photo_select)
{
- let current_photo_div = checkbox.parentElement;
- let previous_photo_div = photo_clipboard.previous_photo_select;
- let photo_divs = Array.from(current_photo_div.parentElement.getElementsByClassName("photo_card"));
+ const current_photo_div = checkbox.parentElement;
+ const previous_photo_div = photo_clipboard.previous_photo_select;
+ const photo_divs = Array.from(current_photo_div.parentElement.getElementsByClassName("photo_card"));
- let current_index = photo_divs.indexOf(current_photo_div);
- let previous_index = photo_divs.indexOf(previous_photo_div);
+ const current_index = photo_divs.indexOf(current_photo_div);
+ const previous_index = photo_divs.indexOf(previous_photo_div);
let slice;
if (current_index == previous_index)
@@ -155,12 +155,12 @@ function on_photo_select(event)
}
else
{
- let left = Math.min(previous_index, current_index);
- let right = Math.max(previous_index, current_index);
+ const left = Math.min(previous_index, current_index);
+ const right = Math.max(previous_index, current_index);
slice = photo_divs.slice(left, right + 1);
}
- for (let photo_div of slice)
+ for (const photo_div of slice)
{
action(photo_div.dataset.id);
}
@@ -168,7 +168,7 @@ function on_photo_select(event)
}
else
{
- let photo_div = checkbox.parentElement;
+ const photo_div = checkbox.parentElement;
action(photo_div.dataset.id);
photo_clipboard.previous_photo_select = photo_div;
}
@@ -178,8 +178,8 @@ function on_photo_select(event)
photo_clipboard.select_all_photos =
function select_all_photos()
{
- let photo_divs = Array.from(document.getElementsByClassName("photo_card"));
- for (let photo_div of photo_divs)
+ const photo_divs = Array.from(document.getElementsByClassName("photo_card"));
+ for (const photo_div of photo_divs)
{
photo_clipboard.clipboard.add(photo_div.dataset.id);
}
@@ -190,8 +190,8 @@ function select_all_photos()
photo_clipboard.unselect_all_photos =
function unselect_all_photos()
{
- let photo_divs = Array.from(document.getElementsByClassName("photo_card"));
- for (let photo_div of photo_divs)
+ const photo_divs = Array.from(document.getElementsByClassName("photo_card"));
+ for (const photo_div of photo_divs)
{
photo_clipboard.clipboard.delete(photo_div.dataset.id);
}
@@ -205,14 +205,14 @@ function unselect_all_photos()
photo_clipboard.clipboard_tray_collapse =
function clipboard_tray_collapse()
{
- let tray_body = document.getElementById("clipboard_tray_body");
+ const tray_body = document.getElementById("clipboard_tray_body");
tray_body.classList.add("hidden");
}
photo_clipboard.clipboard_tray_uncollapse =
function clipboard_tray_uncollapse()
{
- let tray_body = document.getElementById("clipboard_tray_body");
+ const tray_body = document.getElementById("clipboard_tray_body");
tray_body.classList.remove("hidden");
photo_clipboard.update_clipboard_tray();
}
@@ -223,7 +223,7 @@ function clipboard_tray_collapse_toggle()
/*
Show or hide the clipboard.
*/
- let tray_body = document.getElementById("clipboard_tray_body");
+ const tray_body = document.getElementById("clipboard_tray_body");
if (!tray_body)
{
return;
@@ -246,8 +246,8 @@ function ingest_toolbox_items()
The page may provide divs with the class "my_clipboard_tray_toolbox", and
we will migrate all the elements into the real clipboard tray toolbox.
*/
- let toolbox = document.getElementById("clipboard_tray_toolbox");
- let moreboxes = document.getElementsByClassName("my_clipboard_tray_toolbox");
+ const toolbox = document.getElementById("clipboard_tray_toolbox");
+ const moreboxes = document.getElementsByClassName("my_clipboard_tray_toolbox");
for (const morebox of moreboxes)
{
@@ -265,8 +265,8 @@ function on_tray_delete_button(event)
/*
Remove the clicked row from the clipboard.
*/
- let clipboard_line = event.target.parentElement;
- let photo_id = clipboard_line.dataset.id;
+ const clipboard_line = event.target.parentElement;
+ const photo_id = clipboard_line.dataset.id;
photo_clipboard.clipboard.delete(photo_id);
photo_clipboard.save_clipboard();
}
@@ -277,7 +277,7 @@ function update_clipboard_tray()
/*
Rebuild the rows if the tray is open.
*/
- let clipboard_tray = document.getElementById("clipboard_tray");
+ const clipboard_tray = document.getElementById("clipboard_tray");
if (clipboard_tray === null)
{
return;
@@ -288,24 +288,24 @@ function update_clipboard_tray()
photo_clipboard.clipboard_tray_collapse();
}
- let tray_lines = document.getElementById("clipboard_tray_lines");
+ const tray_lines = document.getElementById("clipboard_tray_lines");
if (!clipboard_tray.classList.contains("hidden"))
{
common.delete_all_children(tray_lines);
- let photo_ids = Array.from(photo_clipboard.clipboard);
+ const photo_ids = Array.from(photo_clipboard.clipboard);
photo_ids.sort();
for (const photo_id of photo_ids)
{
- let clipboard_line = document.createElement("div");
+ const clipboard_line = document.createElement("div");
clipboard_line.classList.add("clipboard_tray_line");
clipboard_line.dataset.id = photo_id;
- let clipboard_line_delete_button = document.createElement("button");
+ const clipboard_line_delete_button = document.createElement("button");
clipboard_line_delete_button.classList.add("remove_tag_button_perm");
clipboard_line_delete_button.classList.add("red_button");
clipboard_line_delete_button.onclick = photo_clipboard.on_tray_delete_button;
- let clipboard_line_link = document.createElement("a");
+ const clipboard_line_link = document.createElement("a");
clipboard_line_link.target = "_blank";
clipboard_line_link.href = "/photo/" + photo_id;
clipboard_line_link.innerText = photo_id;
@@ -328,7 +328,7 @@ function open_full_clipboard_tab()
photo_clipboard.update_clipboard_count =
function update_clipboard_count()
{
- let elements = document.getElementsByClassName("clipboard_count");
+ const elements = document.getElementsByClassName("clipboard_count");
for (const element of elements)
{
element.innerText = photo_clipboard.clipboard.size;
diff --git a/frontends/etiquette_flask/static/js/spinner.js b/frontends/etiquette_flask/static/js/spinner.js
index eeacd22..bf7f075 100644
--- a/frontends/etiquette_flask/static/js/spinner.js
+++ b/frontends/etiquette_flask/static/js/spinner.js
@@ -1,4 +1,4 @@
-var spinner = {};
+const spinner = {};
/*
In general, spinners are used for functions that launch a callback, and the
diff --git a/frontends/etiquette_flask/static/js/tag_autocomplete.js b/frontends/etiquette_flask/static/js/tag_autocomplete.js
index 9b7a6cd..951294e 100644
--- a/frontends/etiquette_flask/static/js/tag_autocomplete.js
+++ b/frontends/etiquette_flask/static/js/tag_autocomplete.js
@@ -1,4 +1,4 @@
-var tag_autocomplete = {};
+const tag_autocomplete = {};
tag_autocomplete.tagset = {"tags": [], "synonyms": {}};
@@ -19,13 +19,13 @@ function init_datalist()
common.delete_all_children(datalist);
for (const tag_name of tag_autocomplete.tagset["tags"])
{
- let option = document.createElement("option");
+ const option = document.createElement("option");
option.value = tag_name;
datalist.appendChild(option);
}
for (const synonym in tag_autocomplete.tagset["synonyms"])
{
- let option = document.createElement("option");
+ const option = document.createElement("option");
option.value = tag_autocomplete.tagset["synonyms"][synonym] + "+" + synonym;
datalist.appendChild(option);
}
@@ -54,8 +54,8 @@ function tagname_replacements(tagname)
tag_autocomplete.entry_with_tagname_replacements_hook =
function entry_with_tagname_replacements_hook(event)
{
- let cursor_position = event.target.selectionStart;
- let new_value = tag_autocomplete.tagname_replacements(event.target.value);
+ const cursor_position = event.target.selectionStart;
+ const new_value = tag_autocomplete.tagname_replacements(event.target.value);
if (new_value != event.target.value)
{
event.target.value = new_value;
@@ -114,7 +114,7 @@ tag_autocomplete.update_tagset =
function update_tagset()
{
console.log("Updating known tagset.");
- let url = "/all_tags.json";
+ const url = "/all_tags.json";
common.get(url, tag_autocomplete.update_tagset_callback);
}
diff --git a/frontends/etiquette_flask/templates/album.html b/frontends/etiquette_flask/templates/album.html
index 7315b50..e9ea68e 100644
--- a/frontends/etiquette_flask/templates/album.html
+++ b/frontends/etiquette_flask/templates/album.html
@@ -143,7 +143,7 @@ h2, h3
{% else %} {## Individual album ###################################################################}
@@ -308,7 +308,7 @@ ALBUM_ID = undefined;
{% endif %} {## Shared ############################################################################}
@@ -391,7 +391,7 @@ function create_child(title)
{
title = undefined;
}
- let parent_id = ALBUM_ID;
+ const parent_id = ALBUM_ID;
api.albums.create(title, parent_id, api.albums.callback_follow);
}
@@ -412,7 +412,7 @@ function get_album_card_from_child(element)
function on_album_drag_start(event)
{
- let album_card = get_album_card_from_child(event.target);
+ const album_card = get_album_card_from_child(event.target);
event.dataTransfer.setData("text/plain", album_card.id);
}
function on_album_drag_end(event)
@@ -424,11 +424,10 @@ function on_album_drag_over(event)
}
function on_album_drag_drop(event)
{
- let child_id = event.dataTransfer.getData("text");
- let child = document.getElementById(child_id);
- child_id = child.dataset.id;
- let parent = event.currentTarget;
- let parent_id = parent.dataset.id;
+ const child = document.getElementById(event.dataTransfer.getData("text"));
+ const child_id = child.dataset.id;
+ const parent = event.currentTarget;
+ const parent_id = parent.dataset.id;
event.dataTransfer.clearData();
if (child_id == parent_id)
@@ -436,8 +435,8 @@ function on_album_drag_drop(event)
return;
}
- let child_title = child.querySelector('.album_card_title').textContent.trim();
- let parent_title = parent.querySelector('.album_card_title').textContent.trim();
+ const child_title = child.querySelector('.album_card_title').textContent.trim();
+ const parent_title = parent.querySelector('.album_card_title').textContent.trim();
if (confirm(`Move\n${child_title}\ninto\n${parent_title}?`))
{
if (ALBUM_ID)
diff --git a/frontends/etiquette_flask/templates/bookmarks.html b/frontends/etiquette_flask/templates/bookmarks.html
index 4bf627f..207cadf 100644
--- a/frontends/etiquette_flask/templates/bookmarks.html
+++ b/frontends/etiquette_flask/templates/bookmarks.html
@@ -99,8 +99,8 @@
diff --git a/frontends/etiquette_flask/templates/login.html b/frontends/etiquette_flask/templates/login.html
index 6aeda83..0824e39 100644
--- a/frontends/etiquette_flask/templates/login.html
+++ b/frontends/etiquette_flask/templates/login.html
@@ -87,13 +87,13 @@ form h2