diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index 3f00a02e09..4ca559ce3a 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -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", diff --git a/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js b/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js index 354242b8f9..45095fa66a 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js +++ b/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js @@ -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); diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js b/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js index 6af1a82587..1f2c80f0dd 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js +++ b/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js @@ -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', { diff --git a/dashboard-ui/bower_components/emby-webcomponents/indicators/indicators.js b/dashboard-ui/bower_components/emby-webcomponents/indicators/indicators.js index 5f64c1790f..71250246ac 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/indicators/indicators.js +++ b/dashboard-ui/bower_components/emby-webcomponents/indicators/indicators.js @@ -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; diff --git a/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.css b/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.css index f72120586d..ff8fc1f8dd 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.css +++ b/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.css @@ -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%; } diff --git a/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.js b/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.js index 436a8161e8..a1fe91967b 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.js +++ b/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.js @@ -159,12 +159,12 @@ define(['datetime', 'globalize', 'embyRouter', 'material-icons', 'css!./mediainf if (item.IsLive) { miscInfo.push({ - html: '
' + globalize.translate('sharedcomponents#AttributeLive') + '
' + html: '
' + globalize.translate('sharedcomponents#Live') + '
' }); } else if (item.IsPremiere) { miscInfo.push({ - html: '
' + globalize.translate('sharedcomponents#AttributePremiere') + '
' + html: '
' + globalize.translate('sharedcomponents#Premiere') + '
' }); } else if (item.IsSeries && !item.IsRepeat) { @@ -172,8 +172,17 @@ define(['datetime', 'globalize', 'embyRouter', 'material-icons', 'css!./mediainf html: '
' + globalize.translate('sharedcomponents#AttributeNew') + '
' }); } + else if (item.IsSeries && item.IsRepeat) { + miscInfo.push({ + html: '
' + globalize.translate('sharedcomponents#Repeat') + '
' + }); + } - 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 ''; diff --git a/dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingcreator.js b/dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingcreator.js index 4a3761beb1..3c8337fb8c 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingcreator.js +++ b/dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingcreator.js @@ -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); diff --git a/dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingcreator.template.html b/dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingcreator.template.html index 618ac9f0ce..f8594130be 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingcreator.template.html +++ b/dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingcreator.template.html @@ -8,7 +8,6 @@

-

@@ -107,7 +106,7 @@ ${HeaderBecomeProjectSupporter} - diff --git a/dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingeditor.js b/dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingeditor.js index eee5197750..896138d727 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingeditor.js +++ b/dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingeditor.js @@ -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 || ''; diff --git a/dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingeditor.template.html b/dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingeditor.template.html index 8b80a01e86..7de76696c1 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingeditor.template.html +++ b/dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingeditor.template.html @@ -14,7 +14,6 @@

-

diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/en-US.json b/dashboard-ui/bower_components/emby-webcomponents/strings/en-US.json index 98669d50a6..0c5935e793 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/en-US.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/en-US.json @@ -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", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json b/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json index d130616929..a6804e98e9 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json @@ -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", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json index 99f1677d2c..13dbd8034c 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json @@ -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", diff --git a/dashboard-ui/bower_components/iron-icon/.bower.json b/dashboard-ui/bower_components/iron-icon/.bower.json index 87e3dad5d3..f76855b27a 100644 --- a/dashboard-ui/bower_components/iron-icon/.bower.json +++ b/dashboard-ui/bower_components/iron-icon/.bower.json @@ -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" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/polymer/.bower.json b/dashboard-ui/bower_components/polymer/.bower.json index 25eb84c037..a96f0f050e 100644 --- a/dashboard-ui/bower_components/polymer/.bower.json +++ b/dashboard-ui/bower_components/polymer/.bower.json @@ -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" } \ No newline at end of file diff --git a/dashboard-ui/cinemamodeconfiguration.html b/dashboard-ui/cinemamodeconfiguration.html index c68d7b64b4..0ac5545bb4 100644 --- a/dashboard-ui/cinemamodeconfiguration.html +++ b/dashboard-ui/cinemamodeconfiguration.html @@ -71,7 +71,7 @@
- +
@@ -80,7 +80,7 @@
- +
diff --git a/dashboard-ui/components/imageeditor/imageeditor.js b/dashboard-ui/components/imageeditor/imageeditor.js index cfaee66117..3f3b3bfb86 100644 --- a/dashboard-ui/components/imageeditor/imageeditor.js +++ b/dashboard-ui/components/imageeditor/imageeditor.js @@ -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(); diff --git a/dashboard-ui/components/libraryoptionseditor/libraryoptionseditor.js b/dashboard-ui/components/libraryoptionseditor/libraryoptionseditor.js index 0130078518..a770b6a905 100644 --- a/dashboard-ui/components/libraryoptionseditor/libraryoptionseditor.js +++ b/dashboard-ui/components/libraryoptionseditor/libraryoptionseditor.js @@ -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'); diff --git a/dashboard-ui/components/medialibrarycreator/medialibrarycreator.js b/dashboard-ui/components/medialibrarycreator/medialibrarycreator.js index 45695dfee3..b81795dc4a 100644 --- a/dashboard-ui/components/medialibrarycreator/medialibrarycreator.js +++ b/dashboard-ui/components/medialibrarycreator/medialibrarycreator.js @@ -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() {