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
|
@ -14,12 +14,12 @@
|
|||
},
|
||||
"devDependencies": {},
|
||||
"ignore": [],
|
||||
"version": "1.4.198",
|
||||
"_release": "1.4.198",
|
||||
"version": "1.4.200",
|
||||
"_release": "1.4.200",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.4.198",
|
||||
"commit": "53c25fdedfc4a7ae750ce403a779bd8f5cb1f7c3"
|
||||
"tag": "1.4.200",
|
||||
"commit": "37218220cf08f35c9a86ca1a59bd945351ae6cb4"
|
||||
},
|
||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||
"_target": "^1.2.1",
|
||||
|
|
|
@ -1398,9 +1398,9 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
|||
}
|
||||
}
|
||||
|
||||
function onUserDataChanged(userData) {
|
||||
function onUserDataChanged(userData, scope) {
|
||||
|
||||
var cards = document.querySelectorAll('.card-withuserdata[data-id="' + userData.ItemId + '"]');
|
||||
var cards = (scope || document.body).querySelectorAll('.card-withuserdata[data-id="' + userData.ItemId + '"]');
|
||||
|
||||
for (var i = 0, length = cards.length; i < length; i++) {
|
||||
updateUserData(cards[i], userData);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(['itemShortcuts', 'connectionManager', 'layoutManager', 'browser', 'dom', 'loading', 'registerElement'], function (itemShortcuts, connectionManager, layoutManager, browser, dom, loading) {
|
||||
define(['itemShortcuts', 'connectionManager', 'layoutManager', 'browser', 'dom', 'loading', 'serverNotifications', 'events', 'registerElement'], function (itemShortcuts, connectionManager, layoutManager, browser, dom, loading, serverNotifications, events) {
|
||||
|
||||
var ItemsContainerProtoType = Object.create(HTMLDivElement.prototype);
|
||||
|
||||
|
@ -174,6 +174,15 @@
|
|||
});
|
||||
};
|
||||
|
||||
function onUserDataChanged(e, apiClient, userData) {
|
||||
|
||||
var itemsContainer = this;
|
||||
|
||||
require(['cardBuilder'], function (cardBuilder) {
|
||||
cardBuilder.onUserDataChanged(userData, itemsContainer);
|
||||
});
|
||||
}
|
||||
|
||||
ItemsContainerProtoType.attachedCallback = function () {
|
||||
|
||||
this.addEventListener('click', onClick);
|
||||
|
@ -193,6 +202,10 @@
|
|||
}
|
||||
|
||||
itemShortcuts.on(this, getShortcutOptions());
|
||||
|
||||
var userDataHandler = onUserDataChanged.bind(this);
|
||||
events.on(serverNotifications, 'UserDataChanged', userDataHandler);
|
||||
this.userDataHandler = userDataHandler;
|
||||
};
|
||||
|
||||
ItemsContainerProtoType.detachedCallback = function () {
|
||||
|
@ -204,6 +217,12 @@
|
|||
this.removeEventListener('contextmenu', onContextMenu);
|
||||
this.removeEventListener('contextmenu', disableEvent);
|
||||
itemShortcuts.off(this, getShortcutOptions());
|
||||
|
||||
var userDataHandler = this.userDataHandler;
|
||||
if (userDataHandler) {
|
||||
events.off(serverNotifications, 'UserDataChanged', userDataHandler);
|
||||
this.userDataHandler = null;
|
||||
}
|
||||
};
|
||||
|
||||
document.registerElement('emby-itemscontainer', {
|
||||
|
|
|
@ -32,7 +32,7 @@ define(['css!./indicators.css', 'material-icons'], function () {
|
|||
return getProgressHtml(item.CompletionPercentage, options);
|
||||
}
|
||||
|
||||
var userData = item.UserData;
|
||||
var userData = options ? (options.userData || item.UserData) : item.UserData;
|
||||
if (userData) {
|
||||
var pct = userData.PlayedPercentage;
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
color: #fff;
|
||||
text-transform: uppercase;
|
||||
background: #EF6C00;
|
||||
padding: .2em .5em;
|
||||
border-radius: .25em;
|
||||
font-size: 94%;
|
||||
padding: .16em .6em;
|
||||
border-radius: .15em;
|
||||
font-size: 82%;
|
||||
}
|
||||
|
|
|
@ -159,12 +159,12 @@ define(['datetime', 'globalize', 'embyRouter', 'material-icons', 'css!./mediainf
|
|||
|
||||
if (item.IsLive) {
|
||||
miscInfo.push({
|
||||
html: '<div class="mediaInfoProgramAttribute mediaInfoItem">' + globalize.translate('sharedcomponents#AttributeLive') + '</div>'
|
||||
html: '<div class="mediaInfoProgramAttribute mediaInfoItem">' + globalize.translate('sharedcomponents#Live') + '</div>'
|
||||
});
|
||||
}
|
||||
else if (item.IsPremiere) {
|
||||
miscInfo.push({
|
||||
html: '<div class="mediaInfoProgramAttribute mediaInfoItem">' + globalize.translate('sharedcomponents#AttributePremiere') + '</div>'
|
||||
html: '<div class="mediaInfoProgramAttribute mediaInfoItem">' + globalize.translate('sharedcomponents#Premiere') + '</div>'
|
||||
});
|
||||
}
|
||||
else if (item.IsSeries && !item.IsRepeat) {
|
||||
|
@ -172,8 +172,17 @@ define(['datetime', 'globalize', 'embyRouter', 'material-icons', 'css!./mediainf
|
|||
html: '<div class="mediaInfoProgramAttribute mediaInfoItem">' + globalize.translate('sharedcomponents#AttributeNew') + '</div>'
|
||||
});
|
||||
}
|
||||
else if (item.IsSeries && item.IsRepeat) {
|
||||
miscInfo.push({
|
||||
html: '<div class="mediaInfoProgramAttribute mediaInfoItem">' + globalize.translate('sharedcomponents#Repeat') + '</div>'
|
||||
});
|
||||
}
|
||||
|
||||
if (item.PremiereDate) {
|
||||
if (item.IsSeries && item.EpisodeTitle) {
|
||||
miscInfo.push(item.EpisodeTitle);
|
||||
}
|
||||
|
||||
else if (item.PremiereDate) {
|
||||
|
||||
try {
|
||||
date = datetime.parseISO8601Date(item.PremiereDate);
|
||||
|
@ -438,9 +447,6 @@ define(['datetime', 'globalize', 'embyRouter', 'material-icons', 'css!./mediainf
|
|||
if (options.interactive == null) {
|
||||
options.interactive = false;
|
||||
}
|
||||
if (item.Type == 'Program') {
|
||||
return getProgramInfoHtml(item, options);
|
||||
}
|
||||
|
||||
return getMediaInfoHtml(item, options);
|
||||
}
|
||||
|
@ -452,7 +458,7 @@ define(['datetime', 'globalize', 'embyRouter', 'material-icons', 'css!./mediainf
|
|||
options.interactive = false;
|
||||
}
|
||||
if (item.Type == 'Program') {
|
||||
return getMediaInfoHtml(item, options);
|
||||
return getProgramInfoHtml(item, options);
|
||||
}
|
||||
|
||||
return '';
|
||||
|
|
|
@ -269,7 +269,6 @@
|
|||
function renderRecording(context, defaultTimer, program, apiClient) {
|
||||
|
||||
context.querySelector('.itemName').innerHTML = program.Name;
|
||||
context.querySelector('.itemEpisodeName').innerHTML = program.EpisodeTitle || '';
|
||||
|
||||
context.querySelector('.itemMiscInfoPrimary').innerHTML = mediaInfo.getPrimaryMediaInfoHtml(program);
|
||||
context.querySelector('.itemMiscInfoSecondary').innerHTML = mediaInfo.getSecondaryMediaInfoHtml(program);
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<form class="dialogContentInner dialog-content-centered">
|
||||
|
||||
<h1 class="itemName dialogContentTitle"></h1>
|
||||
<p class="itemEpisodeName"></p>
|
||||
<p class="itemMiscInfoPrimary" style="display: flex; align-items: center; flex-wrap: wrap;"></p>
|
||||
<p class="itemMiscInfoSecondary" style="display: flex; align-items: center; flex-wrap: wrap;"></p>
|
||||
|
||||
|
@ -107,7 +106,7 @@
|
|||
<span>${HeaderBecomeProjectSupporter}</span>
|
||||
</button>
|
||||
</div>
|
||||
<button is="emby-button" type="submit" class="raised btnSubmit block" autofocus>
|
||||
<button is="emby-button" type="submit" class="raised btnSubmit block">
|
||||
<i class="md-icon recordingDialogSubmitIcon">fiber_manual_record</i>
|
||||
<span>${Record}</span>
|
||||
</button>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
var programInfo = item.ProgramInfo || {};
|
||||
|
||||
context.querySelector('.itemName').innerHTML = item.Name;
|
||||
context.querySelector('.itemEpisodeName').innerHTML = programInfo.EpisodeTitle || '';
|
||||
|
||||
context.querySelector('.itemGenres').innerHTML = (programInfo.Genres || []).join(' / ');
|
||||
context.querySelector('.itemOverview').innerHTML = programInfo.Overview || '';
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
<div class="formDialogContent smoothScrollY">
|
||||
<div class="dialogContentInner dialog-content-centered">
|
||||
<h1 class="itemName dialogContentTitle"></h1>
|
||||
<p class="itemEpisodeName"></p>
|
||||
<p class="itemMiscInfoPrimary" style="display: flex; align-items: center; flex-wrap: wrap;"></p>
|
||||
<p class="itemMiscInfoSecondary" style="display: flex; align-items: center; flex-wrap: wrap;"></p>
|
||||
<p class="itemGenres"></p>
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
"ServerUpdateNeeded": "This Emby Server needs to be updated. To download the latest version, please visit {0}",
|
||||
"LiveTvGuideRequiresUnlock": "The Live TV Guide is currently limited to {0} channels. Click the unlock button to learn how to enjoy the full experience.",
|
||||
"AttributeNew": "New",
|
||||
"AttributePremiere": "Premiere",
|
||||
"AttributeLive": "Live",
|
||||
"Premiere": "Premiere",
|
||||
"Live": "Live",
|
||||
"Repeat": "Repeat",
|
||||
"TrackCount": "{0} tracks",
|
||||
"ItemCount": "{0} items",
|
||||
"ValueSeriesYearToPresent": "{0}-Present",
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
"Favorite": "\u0422\u0430\u04a3\u0434\u0430\u0443\u043b\u044b",
|
||||
"Like": "\u04b0\u043d\u0430\u0439\u0434\u044b",
|
||||
"Dislike": "\u04b0\u043d\u0430\u043c\u0430\u0439\u0434\u044b",
|
||||
"RefreshDialogHelp": "\u041c\u0435\u0442\u0430\u0434\u0435\u0440\u0435\u043a\u0442\u0435\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043b\u0435\u0440 \u043c\u0435\u043d Emby Server \u0431\u0430\u049b\u044b\u043b\u0430\u0443 \u0442\u0430\u049b\u0442\u0430\u0441\u044b\u043d\u0434\u0430 \u049b\u043e\u0441\u044b\u043b\u0493\u0430\u043d \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u049b\u044b\u0437\u043c\u0435\u0442\u0442\u0435\u0440\u0456 \u043d\u0435\u0433\u0456\u0437\u0456\u043d\u0434\u0435 \u0436\u0430\u04a3\u0493\u044b\u0440\u0442\u044b\u043b\u0430\u0434\u044b.",
|
||||
"RefreshDialogHelp": "\u041c\u0435\u0442\u0430\u0434\u0435\u0440\u0435\u043a\u0442\u0435\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043b\u0435\u0440 \u043c\u0435\u043d Emby Server \u0442\u0430\u049b\u0442\u0430\u0441\u044b\u043d\u0434\u0430 \u049b\u043e\u0441\u044b\u043b\u0493\u0430\u043d \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u049b\u044b\u0437\u043c\u0435\u0442\u0442\u0435\u0440\u0456 \u043d\u0435\u0433\u0456\u0437\u0456\u043d\u0434\u0435 \u0436\u0430\u04a3\u0493\u044b\u0440\u0442\u044b\u043b\u0430\u0434\u044b.",
|
||||
"Open": "\u0410\u0448\u0443",
|
||||
"Play": "\u041e\u0439\u043d\u0430\u0442\u0443",
|
||||
"Queue": "\u041a\u0435\u0437\u0435\u043a\u043a\u0435",
|
||||
|
@ -153,7 +153,7 @@
|
|||
"LabelOriginalTitle": "\u0411\u0430\u0441\u0442\u0430\u043f\u049b\u044b \u0430\u0442\u0430\u0443\u044b:",
|
||||
"LabelSortTitle": "\u0410\u0442\u0430\u0443 \u0431\u043e\u0439\u044b\u043d\u0448\u0430 \u0441\u04b1\u0440\u044b\u043f\u0442\u0430\u0443",
|
||||
"LabelDateAdded": "\u04ae\u0441\u0442\u0435\u043b\u0433\u0435\u043d \u043a\u04af\u043d\u0456",
|
||||
"ConfigureDateAdded": "\u04ae\u0441\u0442\u0435\u043b\u0433\u0435\u043d \u043a\u04af\u043d\u0456 Emby Server \u0411\u0430\u049b\u044b\u043b\u0430\u0443 \u0442\u0430\u049b\u0442\u0430\u0441\u044b\u043d\u0434\u0430\u0493\u044b \u0422\u0430\u0441\u044b\u0493\u044b\u0448\u0445\u0430\u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043b\u0435\u0440\u0456\u043d\u0434\u0435 \u0430\u043d\u044b\u049b\u0442\u0430\u043b\u0430\u0434\u044b",
|
||||
"ConfigureDateAdded": "\u04ae\u0441\u0442\u0435\u043b\u0433\u0435\u043d \u043a\u04af\u043d\u0456 Emby Server \u0442\u0430\u049b\u0442\u0430\u0441\u044b\u043d\u0434\u0430\u0493\u044b \u0422\u0430\u0441\u044b\u0493\u044b\u0448\u0445\u0430\u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043b\u0435\u0440\u0456\u043d\u0434\u0435 \u0430\u043d\u044b\u049b\u0442\u0430\u043b\u0430\u0434\u044b",
|
||||
"LabelStatus": "\u041a\u04af\u0439:",
|
||||
"LabelArtists": "\u041e\u0440\u044b\u043d\u0434\u0430\u0443\u0448\u044b\u043b\u0430\u0440:",
|
||||
"LabelArtistsHelp": "\u0411\u0456\u0440\u043d\u0435\u0448\u0443\u0456\u043d (;) \u0430\u0440\u049b\u044b\u043b\u044b \u0431\u04e9\u043b\u0456\u04a3\u0456\u0437",
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
"Favorite": "\u0418\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435",
|
||||
"Like": "\u041d\u0440\u0430\u0432\u0438\u0442\u0441\u044f",
|
||||
"Dislike": "\u041d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f",
|
||||
"RefreshDialogHelp": "\u041f\u043e\u0434\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 \u0438\u043d\u0444\u043e\u043f\u0430\u043d\u0435\u043b\u0438 Emby Server \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0443\u0441\u043b\u0443\u0433\u0430\u043c\u0438.",
|
||||
"RefreshDialogHelp": "\u041f\u043e\u0434\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0438 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0443\u0441\u043b\u0443\u0433\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0432 \u041f\u0430\u043d\u0435\u043b\u0438 Emby Server.",
|
||||
"Open": "\u041e\u0442\u043a\u0440\u044b\u0442\u044c",
|
||||
"Play": "\u0412\u043e\u0441\u043f\u0440.",
|
||||
"Queue": "\u0412 \u043e\u0447\u0435\u0440\u0435\u0434\u044c...",
|
||||
|
@ -153,7 +153,7 @@
|
|||
"LabelOriginalTitle": "\u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435:",
|
||||
"LabelSortTitle": "\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e:",
|
||||
"LabelDateAdded": "\u0414\u0430\u0442\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f:",
|
||||
"ConfigureDateAdded": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0434\u0430\u0442\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0418\u043d\u0444\u043e\u043f\u0430\u043d\u0435\u043b\u0438 Emby Server \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u041c\u0435\u0434\u0438\u0430\u0442\u0435\u043a\u0438",
|
||||
"ConfigureDateAdded": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0434\u0430\u0442\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u041f\u0430\u043d\u0435\u043b\u0438 Emby Server \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u041c\u0435\u0434\u0438\u0430\u0442\u0435\u043a\u0438",
|
||||
"LabelStatus": "\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435:",
|
||||
"LabelArtists": "\u0418\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u0438:",
|
||||
"LabelArtistsHelp": "\u0414\u043b\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u00ab;\u00bb",
|
||||
|
|
|
@ -32,14 +32,14 @@
|
|||
"web-component-tester": "^4.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"homepage": "https://github.com/polymerelements/iron-icon",
|
||||
"homepage": "https://github.com/PolymerElements/iron-icon",
|
||||
"_release": "1.0.10",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.10",
|
||||
"commit": "f4e146da4982ff96bb25db85290c09e8de4ec734"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/iron-icon.git",
|
||||
"_source": "git://github.com/PolymerElements/iron-icon.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "polymerelements/iron-icon"
|
||||
"_originalSource": "PolymerElements/iron-icon"
|
||||
}
|
|
@ -32,14 +32,14 @@
|
|||
"iron-component-page": "polymerElements/iron-component-page#^1.1.6"
|
||||
},
|
||||
"private": true,
|
||||
"homepage": "https://github.com/polymer/polymer",
|
||||
"homepage": "https://github.com/Polymer/polymer",
|
||||
"_release": "1.6.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.6.1",
|
||||
"commit": "1f197d9d7874b1e5808b2a5c26f34446a7d912fc"
|
||||
},
|
||||
"_source": "git://github.com/polymer/polymer.git",
|
||||
"_source": "git://github.com/Polymer/polymer.git",
|
||||
"_target": "^1.1.0",
|
||||
"_originalSource": "polymer/polymer"
|
||||
"_originalSource": "Polymer/polymer"
|
||||
}
|
|
@ -71,7 +71,7 @@
|
|||
<div class="inputContainer">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<div style="flex-grow:1;">
|
||||
<input is="emby-input" id="txtCustomIntrosPath" label="${LabelCustomIntrosPath}" required="required" autocomplete="off" />
|
||||
<input is="emby-input" id="txtCustomIntrosPath" label="${LabelCustomIntrosPath}" autocomplete="off" />
|
||||
</div>
|
||||
<button type="button" is="paper-icon-button-light" id="btnSelectCustomIntrosPath" class="autoSize" title="${ButtonSelectDirectory}"><i class="md-icon">search</i></button>
|
||||
</div>
|
||||
|
@ -80,7 +80,7 @@
|
|||
<div class="inputContainer">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<div style="flex-grow:1;">
|
||||
<input is="emby-input" id="txtCodecIntrosPath" label="${LabelCodecIntrosPath}" required="required" autocomplete="off" />
|
||||
<input is="emby-input" id="txtCodecIntrosPath" label="${LabelCodecIntrosPath}" autocomplete="off" />
|
||||
</div>
|
||||
<button type="button" is="paper-icon-button-light" id="btnSelectCodecIntrosPath" class="autoSize" title="${ButtonSelectDirectory}"><i class="md-icon">search</i></button>
|
||||
</div>
|
||||
|
|
|
@ -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