mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
redesign series timer edit screen
This commit is contained in:
parent
67bfc785cb
commit
5e5ac0e975
8 changed files with 273 additions and 235 deletions
|
@ -138,7 +138,23 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', '
|
|||
}
|
||||
}
|
||||
|
||||
if (item.StartDate && item.Type !== 'Program') {
|
||||
if (item.Type === 'SeriesTimer') {
|
||||
if (item.RecordAnyTime) {
|
||||
|
||||
miscInfo.push(globalize.translate('sharedcomponents#Anytime'));
|
||||
} else {
|
||||
miscInfo.push(datetime.getDisplayTime(item.StartDate));
|
||||
}
|
||||
|
||||
if (item.RecordAnyChannel) {
|
||||
miscInfo.push(globalize.translate('sharedcomponents#AllChannels'));
|
||||
}
|
||||
else {
|
||||
miscInfo.push(item.ChannelName || globalize.translate('sharedcomponents#OneChannel'));
|
||||
}
|
||||
}
|
||||
|
||||
if (item.StartDate && item.Type !== 'Program' && item.Type !== 'SeriesTimer') {
|
||||
|
||||
try {
|
||||
date = datetime.parseISO8601Date(item.StartDate);
|
||||
|
|
|
@ -98,15 +98,24 @@
|
|||
|
||||
function reload(context, id) {
|
||||
|
||||
loading.show();
|
||||
currentItemId = id;
|
||||
|
||||
var apiClient = connectionManager.getApiClient(currentServerId);
|
||||
apiClient.getLiveTvSeriesTimer(id).then(function (result) {
|
||||
|
||||
renderTimer(context, result, apiClient);
|
||||
loading.show();
|
||||
if (typeof id === 'string') {
|
||||
currentItemId = id;
|
||||
|
||||
apiClient.getLiveTvSeriesTimer(id).then(function (result) {
|
||||
|
||||
renderTimer(context, result, apiClient);
|
||||
loading.hide();
|
||||
});
|
||||
} else if (id) {
|
||||
|
||||
currentItemId = id.Id;
|
||||
|
||||
renderTimer(context, id, apiClient);
|
||||
loading.hide();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function fillKeepUpTo(context) {
|
||||
|
@ -130,6 +139,10 @@
|
|||
|
||||
context.querySelector('.selectKeepUpTo').innerHTML = html;
|
||||
}
|
||||
|
||||
function onFieldChange(e) {
|
||||
this.querySelector('.btnSubmit').click();
|
||||
}
|
||||
|
||||
function embed(itemId, serverId, options) {
|
||||
|
||||
|
@ -163,9 +176,8 @@
|
|||
dlg.querySelector('.dialogContentInner').className = '';
|
||||
dlg.classList.remove('hide');
|
||||
|
||||
dlg.addEventListener('change', function () {
|
||||
dlg.querySelector('.btnSubmit').click();
|
||||
});
|
||||
dlg.removeEventListener('change', onFieldChange);
|
||||
dlg.addEventListener('change', onFieldChange);
|
||||
|
||||
currentDialog = dlg;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<div class="formDialogContent smoothScrollY">
|
||||
<div class="dialogContentInner dialog-content-centered" style="padding-top:2em;">
|
||||
|
||||
<form>
|
||||
<form style="max-width: none;">
|
||||
<div class="selectContainer">
|
||||
<select is="emby-select" class="selectShowType" label="${LabelRecord}">
|
||||
<option value="new">${NewEpisodesOnly}</option>
|
||||
|
@ -18,7 +18,7 @@
|
|||
|
||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||
<label>
|
||||
<input type="checkbox" is="emby-checkbox" class="chkSkipEpisodesInLibrary"/>
|
||||
<input type="checkbox" is="emby-checkbox" class="chkSkipEpisodesInLibrary" />
|
||||
<span>${SkipEpisodesAlreadyInMyLibrary}</span>
|
||||
</label>
|
||||
<div class="fieldDescription checkboxFieldDescription">${SkipEpisodesAlreadyInMyLibraryHelp}</div>
|
||||
|
@ -39,8 +39,7 @@
|
|||
</div>
|
||||
|
||||
<div class="selectContainer">
|
||||
<select is="emby-select" class="selectKeepUpTo" label="${LabelKeepUpTo}">
|
||||
</select>
|
||||
<select is="emby-select" class="selectKeepUpTo" label="${LabelKeepUpTo}"></select>
|
||||
</div>
|
||||
|
||||
<div class="inputContainer">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue