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

update closing of live streams

This commit is contained in:
Luke Pulverenti 2016-09-27 13:51:01 -04:00
parent 2efcbc740d
commit 3da30e8414
12 changed files with 48 additions and 35 deletions

View file

@ -8,6 +8,7 @@
white-space: nowrap;
width: 100%;
flex-shrink: 0;
display: flex;
}
.tvProgramSectionHeader {
@ -83,7 +84,7 @@
}
.channelTimeslotHeader {
float: left;
flex-shrink: 0;
}
.timeslotHeaders {
@ -93,15 +94,14 @@
.programContainer {
white-space: nowrap;
position: relative;
}
.programGridContainer {
margin-left: 12.2vw;
display: flex;
align-items: flex-start;
}
.channelPrograms {
white-space: nowrap;
position: relative;
contain: strict;
}
.timeslotHeadersInner {
@ -285,6 +285,12 @@
.channelPrograms, .channelHeaderCell {
height: 4em;
contain: strict;
}
.channelPrograms {
display: flex;
flex-direction: column;
}
.channelPrograms-tv, .channelHeaderCell-tv {
@ -307,10 +313,6 @@
background-color: #444;
}
.channelList {
float: left;
}
.programGrid {
padding-bottom: 4px;
}
@ -403,8 +405,13 @@
}
}
.channelList {
display: flex;
flex-direction: column;
}
.channelList, .programGrid {
height: auto !important;
contain: layout style;
}
.programCell, .channelHeaderCell, .btnSelectDate {

View file

@ -15,6 +15,7 @@
</div>
<div class="smoothScrollY guideVerticalScroller programContainer guideScroller" style="flex-grow: 1;">
<div class="channelList"></div>
<div class="programGridContainer programGrid smoothScrollX guideScroller" style="white-space: nowrap;">

View file

@ -245,8 +245,6 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan
if (options.showProgramTimeColumn) {
html += '<div class="listItemBody listItemBody-nogrow listItemBody-rightborder"><div class="listItemBodyText">';
html += datetime.getDisplayTime(datetime.parseISO8601Date(item.StartDate));
html += ' - ';
html += datetime.getDisplayTime(datetime.parseISO8601Date(item.EndDate));
html += '</div></div>';
}
@ -309,7 +307,8 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan
var mediaInfoClass = 'secondary listItemMediaInfo listItemBodyText';
html += '<div class="' + mediaInfoClass + '">' + mediaInfo.getPrimaryMediaInfoHtml(item, {
episodeTitle: false
episodeTitle: false,
originalAirDate: false
}) + '</div>';
}

View file

@ -190,7 +190,7 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', '
miscInfo.push(itemHelper.getDisplayName(item));
}
else if (item.PremiereDate) {
else if (item.PremiereDate && options.originalAirDate !== false) {
try {
date = datetime.parseISO8601Date(item.PremiereDate);

View file

@ -1,10 +1,10 @@
define(['dialogHelper', 'globalize', 'layoutManager', 'mediaInfo', 'apphost', 'connectionManager', 'require', 'loading', 'scrollHelper', 'imageLoader', 'scrollStyles', 'emby-button', 'emby-collapse', 'emby-input', 'paper-icon-button-light', 'css!./../formdialog', 'css!./recordingcreator', 'material-icons'], function (dialogHelper, globalize, layoutManager, mediaInfo, appHost, connectionManager, require, loading, scrollHelper, imageLoader) {
var currentDialog;
var recordingUpdated = false;
var recordingDeleted = false;
var currentItemId;
var currentServerId;
var currentResolve;
function deleteTimer(apiClient, timerId) {
@ -50,7 +50,6 @@
function closeDialog(isDeleted) {
recordingUpdated = true;
recordingDeleted = isDeleted;
dialogHelper.close(currentDialog);
@ -63,10 +62,9 @@
var apiClient = connectionManager.getApiClient(currentServerId);
apiClient.getLiveTvTimer(currentItemId).then(function (item) {
item.PrePaddingSeconds = form.querySelector('#txtPrePaddingMinutes').value * 60;
item.PostPaddingSeconds = form.querySelector('#txtPostPaddingMinutes').value * 60;
apiClient.updateLiveTvTimer(item);
apiClient.updateLiveTvTimer(item).then(currentResolve);
});
e.preventDefault();
@ -110,11 +108,11 @@
return new Promise(function (resolve, reject) {
recordingUpdated = false;
recordingDeleted = false;
currentServerId = serverId;
loading.show();
options = options || {};
currentResolve = resolve;
require(['text!./recordingeditor.template.html'], function (template) {
@ -150,22 +148,20 @@
currentDialog = dlg;
dlg.addEventListener('close', function () {
dlg.addEventListener('closing', function () {
if (!recordingDeleted) {
this.querySelector('.btnSubmit').click();
dlg.querySelector('.btnSubmit').click();
}
});
dlg.addEventListener('close', function () {
if (recordingUpdated) {
if (recordingDeleted) {
resolve({
updated: true,
deleted: recordingDeleted
deleted: true
});
} else {
reject();
}
});

View file

@ -832,9 +832,11 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'scrollStyles'], func
}
function onFrameClick(e) {
var focusableParent = focusManager.focusableParent(e.target);
if (focusableParent != document.activeElement) {
focusableParent.focus();
if (e.which == 1) {
var focusableParent = focusManager.focusableParent(e.target);
if (focusableParent != document.activeElement) {
focusableParent.focus();
}
}
}