Fix some Major issues

This commit is contained in:
MrTimscampi 2020-04-14 07:00:47 +02:00
parent a6a39c0ce1
commit ac69f29d5a
4 changed files with 21 additions and 20 deletions

View File

@ -109,8 +109,8 @@ define(['globalize', 'dom', 'emby-checkbox', 'emby-select', 'emby-input'], funct
html += '<div class="metadataFetcher" data-type="' + availableTypeOptions.Type + '">';
html += '<h3 class="checkboxListLabel">' + globalize.translate('LabelTypeMetadataDownloaders', globalize.translate(availableTypeOptions.Type)) + '</h3>';
html += '<div class="checkboxList paperList checkboxList-paperList">';
for (var i = 0; i < plugins.length; i++) {
var plugin = plugins[i];
plugins.array.forEach((plugin, index) => {
html += '<div class="listItem metadataFetcherItem sortableOption" data-pluginname="' + plugin.Name + '">';
var isChecked = libraryOptionsForType.MetadataFetchers ? -1 !== libraryOptionsForType.MetadataFetchers.indexOf(plugin.Name) : plugin.DefaultEnabled;
var checkedHtml = isChecked ? ' checked="checked"' : '';
@ -121,7 +121,8 @@ define(['globalize', 'dom', 'emby-checkbox', 'emby-select', 'emby-input'], funct
html += '</h3>';
html += '</div>';
i > 0 ? html += '<button type="button" is="paper-icon-button-light" title="' + globalize.translate('ButtonUp') + '" class="btnSortableMoveUp btnSortable" data-pluginindex="' + i + '"><span class="material-icons keyboard_arrow_up"></span></button>' : plugins.length > 1 && (html += '<button type="button" is="paper-icon-button-light" title="' + globalize.translate('ButtonDown') + '" class="btnSortableMoveDown btnSortable" data-pluginindex="' + i + '"><span class="material-icons keyboard_arrow_down"></span></button>'), html += '</div>';
}
});
html += '</div>';
html += '<div class="fieldDescription">' + globalize.translate('LabelMetadataDownloadersHelp') + '</div>';
html += '</div>';
@ -292,11 +293,15 @@ define(['globalize', 'dom', 'emby-checkbox', 'emby-select', 'emby-input'], funct
function showImageOptionsForType(type) {
require(['imageoptionseditor'], function(ImageOptionsEditor) {
var typeOptions = getTypeOptions(currentLibraryOptions, type);
typeOptions || (typeOptions = {
Type: type
}, currentLibraryOptions.TypeOptions.push(typeOptions));
if (!typeOptions) {
typeOptions = {
Type: type
};
}
currentLibraryOptions.TypeOptions.push(typeOptions);
var availableOptions = getTypeOptions(currentAvailableOptions || {}, type);
(new ImageOptionsEditor).show(type, typeOptions, availableOptions);
var imageOptionsEditor = new ImageOptionsEditor();
imageOptionsEditor.show(type, typeOptions, availableOptions);
});
}
@ -315,10 +320,15 @@ define(['globalize', 'dom', 'emby-checkbox', 'emby-select', 'emby-input'], funct
var list = dom.parentWithClass(li, 'paperList');
if (btnSortable.classList.contains('btnSortableMoveDown')) {
var next = li.nextSibling;
next && (li.parentNode.removeChild(li), next.parentNode.insertBefore(li, next.nextSibling));
if (next) {
li.parentNode.removeChild(li);
next.parentNode.insertBefore(li, next.nextSibling);
}
} else {
var prev = li.previousSibling;
prev && (li.parentNode.removeChild(li), prev.parentNode.insertBefore(li, prev));
if (prev) {
li.parentNode.removeChild(li);
prev.parentNode.insertBefore(li, prev);
}
Array.prototype.forEach.call(list.querySelectorAll('.sortableOption'), adjustSortableListElement);
}

View File

@ -791,11 +791,7 @@ define(['itemHelper', 'dom', 'layoutManager', 'dialogHelper', 'datetime', 'loadi
return a.Name;
}).join(';');
if (item.Type === 'Series') {
context.querySelector('#selectDisplayOrder').value = item.DisplayOrder || '';
} else {
context.querySelector('#selectDisplayOrder').value = item.DisplayOrder || '';
}
context.querySelector('#selectDisplayOrder').value = item.DisplayOrder || '';
context.querySelector('#txtArtist').value = (item.ArtistItems || []).map(function (a) {
return a.Name;

View File

@ -232,11 +232,7 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
html += '</div>';
}
html += '<h2>' + provider + '</h2>';
if (layoutManager.tv) {
html += '<div>';
} else {
html += '<div>';
}
html += '<div>';
lastProvider = provider;
}

View File

@ -260,7 +260,6 @@ define(["browser", "dom", "css!./navdrawer", "scrollStyles"], function (browser,
TouchMenuLA.prototype.showMask = function () {
mask.classList.remove("hide");
mask.offsetWidth;
mask.classList.add("backdrop");
};