mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
update single recording editor
This commit is contained in:
parent
a6a50ab5d4
commit
749cd7dbb3
@ -14,12 +14,12 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.4.325",
|
"version": "1.4.326",
|
||||||
"_release": "1.4.325",
|
"_release": "1.4.326",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.4.325",
|
"tag": "1.4.326",
|
||||||
"commit": "f11f822888ef812064c9a2677dc5c639e82cbb9f"
|
"commit": "2f0db5f0b27eccd17c1a451bde9ae537d083a89d"
|
||||||
},
|
},
|
||||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "^1.2.1",
|
"_target": "^1.2.1",
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
var currentDialog;
|
var currentDialog;
|
||||||
var recordingDeleted = false;
|
var recordingDeleted = false;
|
||||||
|
var recordingUpdated = false;
|
||||||
var currentItemId;
|
var currentItemId;
|
||||||
var currentServerId;
|
var currentServerId;
|
||||||
var currentResolve;
|
|
||||||
|
|
||||||
function deleteTimer(apiClient, timerId) {
|
function deleteTimer(apiClient, timerId) {
|
||||||
|
|
||||||
@ -44,7 +44,10 @@
|
|||||||
apiClient.getLiveTvTimer(currentItemId).then(function (item) {
|
apiClient.getLiveTvTimer(currentItemId).then(function (item) {
|
||||||
item.PrePaddingSeconds = form.querySelector('#txtPrePaddingMinutes').value * 60;
|
item.PrePaddingSeconds = form.querySelector('#txtPrePaddingMinutes').value * 60;
|
||||||
item.PostPaddingSeconds = form.querySelector('#txtPostPaddingMinutes').value * 60;
|
item.PostPaddingSeconds = form.querySelector('#txtPostPaddingMinutes').value * 60;
|
||||||
apiClient.updateLiveTvTimer(item).then(currentResolve);
|
apiClient.updateLiveTvTimer(item).then(function () {
|
||||||
|
recordingUpdated = true;
|
||||||
|
closeDialog(false);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@ -92,7 +95,6 @@
|
|||||||
currentServerId = serverId;
|
currentServerId = serverId;
|
||||||
loading.show();
|
loading.show();
|
||||||
options = options || {};
|
options = options || {};
|
||||||
currentResolve = resolve;
|
|
||||||
|
|
||||||
require(['text!./recordingeditor.template.html'], function (template) {
|
require(['text!./recordingeditor.template.html'], function (template) {
|
||||||
|
|
||||||
@ -122,26 +124,21 @@
|
|||||||
|
|
||||||
dlg.innerHTML = html;
|
dlg.innerHTML = html;
|
||||||
|
|
||||||
if (options.enableCancel === false) {
|
if (!options.enableCancel) {
|
||||||
dlg.querySelector('.formDialogFooter').classList.add('hide');
|
dlg.querySelector('.btnCancelRecording').classList.add('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
currentDialog = dlg;
|
currentDialog = dlg;
|
||||||
|
|
||||||
dlg.addEventListener('closing', function () {
|
|
||||||
|
|
||||||
if (!recordingDeleted) {
|
|
||||||
dlg.querySelector('.btnSubmit').click();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
dlg.addEventListener('close', function () {
|
dlg.addEventListener('close', function () {
|
||||||
|
|
||||||
if (recordingDeleted) {
|
if (recordingDeleted || recordingUpdated) {
|
||||||
resolve({
|
resolve({
|
||||||
updated: true,
|
updated: recordingUpdated,
|
||||||
deleted: true
|
deleted: recordingDeleted
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
reject();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
<br />
|
<br />
|
||||||
|
|
||||||
<div class="formDialogFooter">
|
<div class="formDialogFooter">
|
||||||
<button is="emby-button" type="submit" class="raised btnSubmit block formDialogFooterItem button-submit hide">
|
<button is="emby-button" type="submit" class="raised btnSubmit block formDialogFooterItem button-submit">
|
||||||
<span>${Save}</span>
|
<span>${Save}</span>
|
||||||
</button>
|
</button>
|
||||||
<button is="emby-button" type="button" class="raised btnCancelRecording block formDialogFooterItem button-cancel" style="white-space:nowrap;">
|
<button is="emby-button" type="button" class="raised btnCancelRecording block formDialogFooterItem button-cancel" style="white-space:nowrap;">
|
||||||
|
Loading…
Reference in New Issue
Block a user