mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update cards
This commit is contained in:
parent
0659c5bdc1
commit
228cefadd8
19 changed files with 78 additions and 47 deletions
|
@ -1,4 +1,4 @@
|
|||
define(['dialogHelper', 'css!css/metadataeditor.css', 'emby-button', 'paper-icon-button-light'], function (dialogHelper) {
|
||||
define(['dialogHelper', 'loading', 'css!css/metadataeditor.css', 'emby-button', 'paper-icon-button-light'], function (dialogHelper, loading) {
|
||||
|
||||
var currentItem;
|
||||
var hasChanges = false;
|
||||
|
@ -14,13 +14,13 @@
|
|||
|
||||
function reload(page, item) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
loading.show();
|
||||
|
||||
if (item) {
|
||||
reloadItem(page, item);
|
||||
}
|
||||
else {
|
||||
ApiClient.getItem(Dashboard.getCurrentUserId(), currentItem.Id).then(function (item) {
|
||||
ApiClient.getItem(ApiClient.getCurrentUserId(), currentItem.Id).then(function (item) {
|
||||
reloadItem(page, item);
|
||||
});
|
||||
}
|
||||
|
@ -56,7 +56,7 @@
|
|||
renderStandardImages(page, item, imageInfos, providers);
|
||||
renderBackdrops(page, item, imageInfos, providers);
|
||||
renderScreenshots(page, item, imageInfos, providers);
|
||||
Dashboard.hideLoadingMsg();
|
||||
loading.hide();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -264,7 +264,7 @@
|
|||
|
||||
options = options || {};
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
loading.show();
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', 'components/imageeditor/imageeditor.template.html', true);
|
||||
|
@ -272,7 +272,7 @@
|
|||
xhr.onload = function (e) {
|
||||
|
||||
var template = this.response;
|
||||
ApiClient.getItem(Dashboard.getCurrentUserId(), itemId).then(function (item) {
|
||||
ApiClient.getItem(ApiClient.getCurrentUserId(), itemId).then(function (item) {
|
||||
|
||||
var dlg = dialogHelper.createDialog({
|
||||
size: 'fullscreen-border',
|
||||
|
@ -302,7 +302,7 @@
|
|||
// Has to be assigned a z-index after the call to .open()
|
||||
dlg.addEventListener('close', function () {
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
loading.hide();
|
||||
|
||||
if (hasChanges) {
|
||||
resolve();
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
function setContentType(parent, contentType) {
|
||||
|
||||
if (contentType == 'music' || contentType == 'tvshows' || contentType == 'movies' || contentType == 'homevideos' || contentType == 'musicvideos' || contentType == 'mixed') {
|
||||
if (contentType == 'music' || contentType == 'tvshows' || contentType == 'movies' || contentType == 'homevideos' || contentType == 'musicvideos' || contentType == 'mixed' || !contentType) {
|
||||
parent.querySelector('.chkArhiveAsMediaContainer').classList.remove('hide');
|
||||
} else {
|
||||
parent.querySelector('.chkArhiveAsMediaContainer').classList.add('hide');
|
||||
|
|
|
@ -65,7 +65,13 @@
|
|||
|
||||
var dlg = $(this).parents('.dialog')[0];
|
||||
|
||||
libraryoptionseditor.setContentType(dlg.querySelector('.libraryOptions'), value);
|
||||
libraryoptionseditor.setContentType(dlg.querySelector('.libraryOptions'), (value == 'mixed' ? '' : value));
|
||||
|
||||
if (value) {
|
||||
dlg.querySelector('.libraryOptions').classList.remove('hide');
|
||||
} else {
|
||||
dlg.querySelector('.libraryOptions').classList.add('hide');
|
||||
}
|
||||
|
||||
if (value == 'mixed') {
|
||||
return;
|
||||
|
@ -88,6 +94,7 @@
|
|||
|
||||
$('.collectionTypeFieldDescription', dlg).html(folderOption.message || '');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$('.btnAddFolder', page).on('click', onAddButtonClick);
|
||||
|
@ -183,7 +190,9 @@
|
|||
}
|
||||
|
||||
function initLibraryOptions(dlg) {
|
||||
libraryoptionseditor.embed(dlg.querySelector('.libraryOptions'));
|
||||
libraryoptionseditor.embed(dlg.querySelector('.libraryOptions')).then(function() {
|
||||
$('#selectCollectionType', dlg).trigger('change');
|
||||
});
|
||||
}
|
||||
|
||||
function editor() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue