diff --git a/layout.html b/layout.html index 7be0090..5a5bf21 100755 --- a/layout.html +++ b/layout.html @@ -511,6 +511,11 @@ template_clone.firstElementChild.setAttribute("data-duration", media_item_element.getAttribute("data-duration")); template_clone.firstElementChild.setAttribute("data-media-id", media_item_element.getAttribute("data-id")); + target.innerHTML = ""; + target.appendChild(template_clone); + fetch_item_tags(item_id); + const save_button = document.getElementById("media_item_editor_save_button"); + // populate EDL if it exists const thisRowEDL = media_item_element.getAttribute("data-edl-definition"); console.log("EDL for media:"); @@ -532,10 +537,6 @@ sort_inserts(); } - target.innerHTML = ""; - target.appendChild(template_clone); - fetch_item_tags(item_id); - const save_button = document.getElementById("media_item_editor_save_button"); save_button.addEventListener("click", (e) => { e.preventDefault(); const api_url = "update.php?id=" + item_id;