diff --git a/app/static/js/edits.js b/app/static/js/edits.js index 25fa002..6dcb1f5 100644 --- a/app/static/js/edits.js +++ b/app/static/js/edits.js @@ -197,6 +197,15 @@ async function loadEdit(id, args) { }) }) }) + if (data.layers[pandora.subtitleLayer]) { + var previous; + data.layers[pandora.subtitleLayer].forEach(annotation => { + if (previous) { + previous.out = annotation['in'] + } + previous = annotation + }) + } var value = [] pandora.layerKeys.forEach(layer => { if (!data.layers[layer]) { @@ -215,7 +224,11 @@ async function loadEdit(id, args) { `) }) - value.push('
' + html.join('\n') + '
') + var layerClass = "" + if (layerData.isSubtitles) { + layerClass = " is-subtitles" + } + value.push('
' + html.join('\n') + '
') }) data.value = value.join('\n') diff --git a/app/static/js/item.js b/app/static/js/item.js index 02c0c50..abd1ef9 100644 --- a/app/static/js/item.js +++ b/app/static/js/item.js @@ -112,7 +112,6 @@ async function loadData(id, args) { duration: duration }) }) - var value = [] if (data.layers[pandora.subtitleLayer]) { var previous; data.layers[pandora.subtitleLayer].forEach(annotation => { @@ -122,6 +121,7 @@ async function loadData(id, args) { previous = annotation }) } + var value = [] Object.keys(data.layers).forEach(layer => { var html = [] var layerData = getObjectById(pandora.site.layers, layer)