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

move completely to fetch

This commit is contained in:
Luke Pulverenti 2015-11-28 03:07:44 -05:00
parent ee899a7332
commit 9932bc3eb5
168 changed files with 948 additions and 945 deletions

View file

@ -35,7 +35,7 @@
var url = 'Providers/Subtitles/Subtitles/' + id;
ApiClient.get(ApiClient.getUrl(url)).done(function (result) {
ApiClient.get(ApiClient.getUrl(url)).then(function (result) {
$('.subtitleContent', page).html(result);
@ -54,7 +54,7 @@
type: "POST",
url: ApiClient.getUrl(url)
}).done(function () {
}).then(function () {
Dashboard.alert(Globalize.translate('MessageDownloadQueued'));
});
@ -78,7 +78,7 @@
type: "DELETE",
url: ApiClient.getUrl(url)
}).done(function () {
}).then(function () {
reload(page, itemId);
});
@ -291,7 +291,7 @@
var url = ApiClient.getUrl('Items/' + currentItem.Id + '/RemoteSearch/Subtitles/' + language);
ApiClient.fetchJSON(url).then(function (results) {
ApiClient.getJSON(url).then(function (results) {
renderSearchResults(page, results);
});
@ -331,13 +331,12 @@
Dashboard.showLoadingMsg();
HttpClient.send({
var xhr = new XMLHttpRequest();
xhr.open('GET', 'components/subtitleeditor/subtitleeditor.template.html', true);
type: 'GET',
url: 'components/subtitleeditor/subtitleeditor.template.html'
}).done(function (template) {
xhr.onload = function (e) {
var template = this.response;
ApiClient.getItem(Dashboard.getCurrentUserId(), itemId).then(function (item) {
var dlg = PaperDialogHelper.createDialog();
@ -365,7 +364,7 @@
var editorContent = dlg.querySelector('.editorContent');
reload(editorContent, item);
ApiClient.getCultures().done(function (languages) {
ApiClient.getCultures().then(function (languages) {
fillLanguages(editorContent, languages);
});
@ -375,7 +374,9 @@
PaperDialogHelper.close(dlg);
});
});
});
}
xhr.send();
}
function onDialogClosed() {