1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update external subs

This commit is contained in:
Luke Pulverenti 2015-09-12 12:39:24 -04:00
parent 0f37b99468
commit 10bcfa593b
13 changed files with 110 additions and 101 deletions

View file

@ -24,70 +24,64 @@
var html = '';
for (var i = 0, length = tuners.length; i < length; i++) {
if (tuners.length) {
html += '<div class="paperList">';
var tuner = tuners[i];
for (var i = 0, length = tuners.length; i < length; i++) {
html += '<tr>';
var tuner = tuners[i];
html += '<paper-icon-item>';
html += '<td>';
html += tuner.Name;
html += '</td>';
html += '<paper-fab class="listAvatar" style="background:#52B54B;" icon="live-tv" item-icon></paper-fab>';
html += '<td>';
html += tuner.SourceType;
html += '</td>';
html += '<paper-item-body two-line>';
html += '<td>';
html += '<div>';
html += tuner.Name;
html += '</div>';
if (tuner.Status == 'RecordingTv') {
if (tuner.ChannelName) {
html += '<div secondary>';
html += tuner.SourceType;
html += '</div>';
html += '<a href="itemdetails.html?id=' + tuner.ChannelId + '">';
html += Globalize.translate('StatusRecordingProgram').replace('{0}', tuner.ChannelName);
html += '</a>';
} else {
html += '<div secondary>';
if (tuner.Status == 'RecordingTv') {
if (tuner.ChannelName) {
html += Globalize.translate('StatusRecording');
html += '<a href="itemdetails.html?id=' + tuner.ChannelId + '">';
html += Globalize.translate('StatusRecordingProgram').replace('{0}', tuner.ChannelName);
html += '</a>';
} else {
html += Globalize.translate('StatusRecording');
}
}
}
else if (tuner.Status == 'LiveTv') {
else if (tuner.Status == 'LiveTv') {
if (tuner.ChannelName) {
if (tuner.ChannelName) {
html += '<a href="itemdetails.html?id=' + tuner.ChannelId + '">';
html += Globalize.translate('StatusWatchingProgram').replace('{0}', tuner.ChannelName);
html += '</a>';
} else {
html += '<a href="itemdetails.html?id=' + tuner.ChannelId + '">';
html += Globalize.translate('StatusWatchingProgram').replace('{0}', tuner.ChannelName);
html += '</a>';
} else {
html += Globalize.translate('StatusWatching');
html += Globalize.translate('StatusWatching');
}
}
}
else {
html += tuner.Status;
}
html += '</td>';
else {
html += tuner.Status;
}
html += '</div>';
html += '<td>';
if (tuner.ProgramName) {
html += tuner.ProgramName;
html += '</paper-item-body>';
html += '<paper-icon-button icon="refresh" data-tunerid="' + tuner.Id + '" title="' + Globalize.translate('ButtonResetTuner') + '" class="btnResetTuner"></paper-icon-button>';
html += '</paper-icon-item>';
}
html += '</td>';
html += '<td>';
html += tuner.Clients.join('<br/>');
html += '</td>';
html += '<td>';
html += '<paper-icon-button data-tunerid="' + tuner.Id + '" icon="refresh" class="btnResetTuner" title="' + Globalize.translate('ButtonResetTuner') + '"></paper-icon-button>';
html += '</td>';
html += '</tr>';
html += '</div>';
}
var elem = $('.tunersResultBody', page).html(html).parents('.tblTuners').table("refresh").trigger('create');
var elem = $('.tunerList', page).html(html);
$('.btnResetTuner', elem).on('click', function () {
@ -498,6 +492,7 @@
var page = this;
reload(page);
});
})(jQuery, document, window);