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

update season queries

This commit is contained in:
Luke Pulverenti 2016-08-18 01:56:10 -04:00
parent 84ff91f0ad
commit 16e3e4f358
7 changed files with 85 additions and 30 deletions

View file

@ -23,7 +23,7 @@
require(['toast'], function (toast) {
toast(Globalize.translate('MessagePleaseSelectDeviceToSyncTo'));
});
return;
return false;
}
var options = {
@ -55,9 +55,14 @@
dialogHelper.close(dlg);
require(['toast'], function (toast) {
toast(Globalize.translate('MessageSyncJobCreated'));
var msg = target == ApiClient.deviceId() ? Globalize.translate('MessageDownloadScheduled') : Globalize.translate('MessageSyncJobCreated');
toast(msg);
});
});
return true;
}
function setJobValues(job, form) {
@ -221,7 +226,7 @@
return new Promise(function (resolve, reject) {
requirejs(["registrationservices", 'dialogHelper', 'formDialogStyle'], function (registrationServices, dialogHelper) {
require(["registrationservices", 'dialogHelper', 'formDialogStyle'], function (registrationServices, dialogHelper) {
registrationServices.validateFeature('sync').then(function () {
showSyncMenuInternal(dialogHelper, options).then(resolve, reject);
@ -289,10 +294,12 @@
dlg.innerHTML = html;
document.body.appendChild(dlg);
var submitted = false;
$('form', dlg).on('submit', function () {
submitJob(dlg, userId, options, this, dialogHelper);
submitted = submitJob(dlg, userId, options, this, dialogHelper);
return false;
});
@ -308,7 +315,12 @@
dialogOptionsFn: getTargetDialogOptionsFn(dialogOptionsQuery)
});
return promise;
return promise.then(function () {
if (submitted) {
return Promise.resolve();
}
return Promise.reject();
});
});
}