update image editor
This commit is contained in:
parent
1bb7d85b87
commit
c5bfd529a2
4 changed files with 12 additions and 11 deletions
|
@ -1,10 +1,11 @@
|
|||
(function ($, window, document) {
|
||||
|
||||
var currentItemId;
|
||||
var currentItemType;
|
||||
var currentDeferred;
|
||||
var hasChanges = false;
|
||||
|
||||
var browsableImagePageSize = 10;
|
||||
var browsableImagePageSize = 20;
|
||||
var browsableImageStartIndex = 0;
|
||||
var browsableImageType = 'Primary';
|
||||
var selectedProvider;
|
||||
|
@ -152,10 +153,10 @@
|
|||
}
|
||||
else {
|
||||
|
||||
if (currentItem.Type == "Episode") {
|
||||
if (currentItemType == "Episode") {
|
||||
cssClass += " remoteBackdropImage";
|
||||
}
|
||||
else if (currentItem.Type == "MusicAlbum" || currentItem.Type == "MusicArtist") {
|
||||
else if (currentItemType == "MusicAlbum" || currentItemType == "MusicArtist") {
|
||||
cssClass += " remoteDiscImage";
|
||||
}
|
||||
else {
|
||||
|
@ -252,7 +253,7 @@
|
|||
});
|
||||
}
|
||||
|
||||
function showEditor(itemId) {
|
||||
function showEditor(itemId, itemType) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
|
@ -264,6 +265,7 @@
|
|||
}).done(function (template) {
|
||||
|
||||
currentItemId = itemId;
|
||||
currentItemType = itemType;
|
||||
|
||||
var dlg = document.createElement('paper-dialog');
|
||||
|
||||
|
@ -316,20 +318,19 @@
|
|||
}
|
||||
|
||||
window.ImageDownloader = {
|
||||
show: function (itemId, imageType) {
|
||||
show: function (itemId, itemType, imageType) {
|
||||
|
||||
var deferred = DeferredBuilder.Deferred();
|
||||
|
||||
currentDeferred = deferred;
|
||||
hasChanges = false;
|
||||
browsableImagePageSize = 10;
|
||||
browsableImageStartIndex = 0;
|
||||
browsableImageType = imageType || 'Primary';
|
||||
selectedProvider = null;
|
||||
|
||||
require(['components/paperdialoghelper'], function () {
|
||||
|
||||
showEditor(itemId);
|
||||
showEditor(itemId, itemType);
|
||||
});
|
||||
return deferred.promise();
|
||||
}
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
<option value="">${OptionAll}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div style="margin: 0; display: inline-block;">
|
||||
<div style="margin-left:1em; display: inline-block;">
|
||||
<label for="selectBrowsableImageType">${LabelImage}</label>
|
||||
</div>
|
||||
<div style="margin: 0; display: inline-block;">
|
||||
<div style="display: inline-block;">
|
||||
<select id="selectBrowsableImageType" name="selectBrowsableImageType" data-mini="true" data-inline="true">
|
||||
<option value="Primary">${OptionPrimary}</option>
|
||||
<option value="Art">${OptionArt}</option>
|
||||
|
|
|
@ -185,7 +185,7 @@
|
|||
function showImageDownloader(page, imageType) {
|
||||
require(['components/imagedownloader/imagedownloader'], function () {
|
||||
|
||||
ImageDownloader.show(currentItem.Id, imageType).done(function (hasChanges) {
|
||||
ImageDownloader.show(currentItem.Id, currentItem.Type, imageType).done(function (hasChanges) {
|
||||
|
||||
if (hasChanges) {
|
||||
reload(page);
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
.remoteImageDetails paper-icon-button {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 5px;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.remoteImageDetailText {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue