Skip to content

Commit

Permalink
fix regression of tag retention support when obsoleting movies (#1708)
Browse files Browse the repository at this point in the history
  • Loading branch information
Masterjun3 authored Oct 4, 2023
1 parent 5ad4d02 commit 6c29e17
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions TASVideos/Pages/Submissions/Publish.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,6 @@
let originalDescription = "@Model.Submission.MovieMarkup";
const obsoletionModel = document.getElementById("@Html.IdFor(m => m.Submission.MovieToObsolete)");
const descriptionModel = document.getElementById("@Html.IdFor(m => m.Submission.MovieMarkup)");
const dblClickEvent = new MouseEvent('dblclick', {
'view': window,
'bubbles': true,
'cancelable': true
});
descriptionModel.onchange = function() {
originalDescription = descriptionModel.value;
Expand All @@ -181,15 +176,12 @@
descriptionModel.value = t.markup;
originalDescription = oldValue;
document.getElementById(`${selectedTagsId}removeAllBtn`).click();
document.getElementById("obsoleted-by").innerHTML = t.title ? t.title : "Unknown publication";
for (let i in t.tags) {
const tagItem = document.querySelector(`[name='AvailableTags'] option[value="${t.tags[i]}"]`);
tagItem.selected = true;
for (let option of document.querySelectorAll(`#${selectedTagsId} option`)) {
option.selected = t.tags.includes(Number(option.value));
}
document.getElementById(`${selectedTagsId}addBtn`).click();
engageSelectImprover('@Html.IdFor(m => m.Submission.SelectedTags)');
});
}
</script>
Expand Down

0 comments on commit 6c29e17

Please sign in to comment.