mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
merge from dev
This commit is contained in:
parent
1c8f02ce0f
commit
33b01d778c
911 changed files with 34157 additions and 57125 deletions
|
@ -16,10 +16,10 @@
|
|||
ApiClient.getJSON(ApiClient.getUrl('Items/' + MetadataEditor.getCurrentItemId() + '/MetadataEditor')) :
|
||||
{};
|
||||
|
||||
$.when(promise1, promise2).done(function (response1, response2) {
|
||||
Promise.all([promise1, promise2]).then(function (responses) {
|
||||
|
||||
var item = response1[0];
|
||||
metadataEditorInfo = response2[0];
|
||||
var item = responses[0];
|
||||
metadataEditorInfo = responses[1];
|
||||
|
||||
currentItem = item;
|
||||
|
||||
|
@ -38,8 +38,8 @@
|
|||
|
||||
loadExternalIds(page, item, metadataEditorInfo.ExternalIdInfos);
|
||||
|
||||
Dashboard.populateLanguages($('#selectLanguage', page), languages);
|
||||
Dashboard.populateCountries($('#selectCountry', page), countries);
|
||||
populateLanguages(page.querySelector('#selectLanguage'), languages);
|
||||
populateCountries(page.querySelector('#selectCountry'), countries);
|
||||
|
||||
LibraryBrowser.renderName(item, $('.itemName', page), true);
|
||||
|
||||
|
@ -69,6 +69,38 @@
|
|||
});
|
||||
}
|
||||
|
||||
function populateCountries(select, allCountries) {
|
||||
|
||||
var html = "";
|
||||
|
||||
html += "<option value=''></option>";
|
||||
|
||||
for (var i = 0, length = allCountries.length; i < length; i++) {
|
||||
|
||||
var culture = allCountries[i];
|
||||
|
||||
html += "<option value='" + culture.TwoLetterISORegionName + "'>" + culture.DisplayName + "</option>";
|
||||
}
|
||||
|
||||
select.innerHTML = html;
|
||||
}
|
||||
|
||||
function populateLanguages(select, languages) {
|
||||
|
||||
var html = "";
|
||||
|
||||
html += "<option value=''></option>";
|
||||
|
||||
for (var i = 0, length = languages.length; i < length; i++) {
|
||||
|
||||
var culture = languages[i];
|
||||
|
||||
html += "<option value='" + culture.TwoLetterISOLanguageName + "'>" + culture.DisplayName + "</option>";
|
||||
}
|
||||
|
||||
select.innerHTML = html;
|
||||
}
|
||||
|
||||
function renderContentTypeOptions(page, metadataInfo) {
|
||||
|
||||
if (metadataInfo.ContentTypeOptions.length) {
|
||||
|
@ -280,7 +312,7 @@
|
|||
$('#fldYear', page).show();
|
||||
}
|
||||
|
||||
Dashboard.getCurrentUser().done(function (user) {
|
||||
Dashboard.getCurrentUser().then(function (user) {
|
||||
|
||||
if (LibraryBrowser.getMoreCommands(item, user).indexOf('identify') != -1) {
|
||||
|
||||
|
@ -895,13 +927,13 @@
|
|||
|
||||
Dashboard.alert(Globalize.translate('MessageItemSaved'));
|
||||
|
||||
MetadataEditor.getItemPromise().done(function (i) {
|
||||
MetadataEditor.getItemPromise().then(function (i) {
|
||||
page.trigger('itemsaved', [i]);
|
||||
bindItemChanged(page);
|
||||
});
|
||||
}
|
||||
|
||||
ApiClient.updateItem(item).done(function () {
|
||||
ApiClient.updateItem(item).then(function () {
|
||||
|
||||
var newContentType = $('#selectContentType', form).val() || '';
|
||||
|
||||
|
@ -915,7 +947,7 @@
|
|||
|
||||
type: 'POST'
|
||||
|
||||
}).done(function () {
|
||||
}).then(function () {
|
||||
afterContentTypeUpdated();
|
||||
});
|
||||
|
||||
|
@ -1088,7 +1120,7 @@
|
|||
|
||||
function showMoreMenu(page, elem) {
|
||||
|
||||
Dashboard.getCurrentUser().done(function (user) {
|
||||
Dashboard.getCurrentUser().then(function (user) {
|
||||
|
||||
var moreCommands = LibraryBrowser.getMoreCommands(currentItem, user);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue