This commit is contained in:
Louis Vézina 2020-01-03 22:24:40 -05:00
parent c1a0db8025
commit bb0fce1259
1 changed files with 30 additions and 2 deletions

View File

@ -159,8 +159,36 @@
}, },
{"data": "episode"}, {"data": "episode"},
{"data": "title"}, {"data": "title"},
{"data": "subtitles[, ]"}, {"data": "subtitles",
{"data": "missing_subtitles[, ]"}, "render": function (data) {
if (data !== 'None') {
var languages = '';
data.forEach(appendFunc);
return languages;
} else {
return null;
}
function appendFunc(value) {
languages = languages + '<span class="badge badge-secondary" data-toggle="tooltip" data-placement="right" title="' + value[0].name + '">' + value[0].code2 + '</span> ';
}
}
},
{"data": "missing_subtitles",
"render": function (data) {
if (data !== 'None') {
var languages = '';
data.forEach(appendFunc);
return languages;
} else {
return null;
}
function appendFunc(value) {
languages = languages + '<span class="badge badge-secondary" data-toggle="tooltip" data-placement="right" title="' + value.name + '">' + value.code2 + '</span> ';
}
}
},
{"data": "title"}, {"data": "title"},
{"data": "title"} {"data": "title"}
] ]