mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
support null image encoder
This commit is contained in:
parent
6000b2ee0f
commit
b9ad8322dd
17 changed files with 214 additions and 44 deletions
|
@ -1800,7 +1800,7 @@
|
|||
* Adds a virtual folder
|
||||
* @param {String} name
|
||||
*/
|
||||
self.addVirtualFolder = function (name, type, refreshLibrary, initialPath) {
|
||||
self.addVirtualFolder = function (name, type, refreshLibrary, initialPaths) {
|
||||
|
||||
if (!name) {
|
||||
throw new Error("null name");
|
||||
|
@ -1822,9 +1822,10 @@
|
|||
return self.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
data: {
|
||||
Path: initialPath
|
||||
}
|
||||
data: JSON.stringify({
|
||||
Paths: initialPaths
|
||||
}),
|
||||
contentType: 'application/json'
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
html += '<div data-role="controlgroup" data-type="horizontal" style="display:inline-block;">';
|
||||
|
||||
html += '<paper-icon-button icon="arrow-back" title="' + Globalize.translate('ButtonPreviousPage') + '" class="btnPreviousPage" ' + (startIndex ? '' : 'disabled') + '></paper-icon-button>';
|
||||
html += '<paper-icon-button icon="arrow-forward" title="' + Globalize.translate('ButtonNextPage') + '" class="btnNextPage" ' + (startIndex + limit > totalRecordCount ? 'disabled' : '') + '></paper-icon-button>';
|
||||
html += '<paper-icon-button icon="arrow-forward" title="' + Globalize.translate('ButtonNextPage') + '" class="btnNextPage" ' + (startIndex + limit >= totalRecordCount ? 'disabled' : '') + '></paper-icon-button>';
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
|
|
|
@ -3,21 +3,28 @@
|
|||
var currentDeferred;
|
||||
var hasChanges;
|
||||
var currentOptions;
|
||||
var paths = [];
|
||||
|
||||
function onSubmit() {
|
||||
|
||||
if (paths.length == 0) {
|
||||
Dashboard.alert({
|
||||
message: Globalize.translate('PleaseAddAtLeastOneFolder')
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
var form = this;
|
||||
var dlg = $(form).parents('paper-dialog')[0];
|
||||
|
||||
var name = $('#txtValue', form).val();
|
||||
var type = $('#selectCollectionType', form).val();
|
||||
var path = $('#txtPath', form).val();
|
||||
|
||||
if (type == 'mixed') {
|
||||
type = null;
|
||||
}
|
||||
|
||||
ApiClient.addVirtualFolder(name, type, currentOptions.refresh, path).done(function () {
|
||||
ApiClient.addVirtualFolder(name, type, currentOptions.refresh, paths).done(function () {
|
||||
|
||||
hasChanges = true;
|
||||
PaperDialogHelper.close(dlg);
|
||||
|
@ -74,7 +81,13 @@
|
|||
}
|
||||
});
|
||||
|
||||
$('#btnSelectPath').on('click', function () {
|
||||
$('.btnAddFolder', page).on('click', onAddButtonClick);
|
||||
$('form', page).off('submit', onSubmit).on('submit', onSubmit);
|
||||
}
|
||||
|
||||
function onAddButtonClick() {
|
||||
|
||||
var page = $(this).parents('.editorContent')[0];
|
||||
|
||||
require(['directorybrowser'], function (directoryBrowser) {
|
||||
|
||||
|
@ -83,17 +96,75 @@
|
|||
picker.show({
|
||||
|
||||
callback: function (path) {
|
||||
|
||||
if (path) {
|
||||
$('#txtPath', page).val(path);
|
||||
addMediaLocation(page, path);
|
||||
}
|
||||
picker.close();
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$('form', page).off('submit', onSubmit).on('submit', onSubmit);
|
||||
function getFolderHtml(path, index) {
|
||||
|
||||
var html = '';
|
||||
|
||||
html += '<paper-icon-item role="menuitem" class="lnkPath">';
|
||||
|
||||
html += '<paper-fab class="listAvatar" style="background:#52B54B;" icon="folder" item-icon></paper-fab>';
|
||||
|
||||
html += '<paper-item-body>';
|
||||
html += path;
|
||||
html += '</paper-item-body>';
|
||||
|
||||
html += '<paper-icon-button icon="remove-circle" class="btnRemovePath" data-index="' + index + '"></paper-icon-button>';
|
||||
|
||||
html += '</paper-icon-item>';
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function renderPaths(page) {
|
||||
var foldersHtml = paths.map(getFolderHtml).join('');
|
||||
|
||||
var folderList = page.querySelector('.folderList');
|
||||
folderList.innerHTML = foldersHtml;
|
||||
|
||||
if (foldersHtml) {
|
||||
folderList.classList.remove('hide');
|
||||
} else {
|
||||
folderList.classList.add('hide');
|
||||
}
|
||||
|
||||
$(page.querySelectorAll('.btnRemovePath')).on('click', onRemoveClick);
|
||||
}
|
||||
|
||||
function addMediaLocation(page, path) {
|
||||
|
||||
if (paths.filter(function (p) {
|
||||
|
||||
return p.toLowerCase() == path.toLowerCase();
|
||||
|
||||
}).length == 0) {
|
||||
paths.push(path);
|
||||
renderPaths(page);
|
||||
}
|
||||
}
|
||||
|
||||
function onRemoveClick() {
|
||||
|
||||
var button = this;
|
||||
var index = parseInt(button.getAttribute('data-index'));
|
||||
|
||||
var location = paths[index];
|
||||
paths = paths.filter(function (p) {
|
||||
|
||||
return p.toLowerCase() != location.toLowerCase();
|
||||
});
|
||||
var page = $(this).parents('.editorContent')[0];
|
||||
renderPaths(page);
|
||||
}
|
||||
|
||||
function onDialogClosed() {
|
||||
|
@ -156,6 +227,8 @@
|
|||
|
||||
PaperDialogHelper.close(dlg);
|
||||
});
|
||||
|
||||
renderPaths(editorContent);
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -9,11 +9,16 @@
|
|||
<div>
|
||||
<paper-input type="text" id="txtValue" required="required" label="${LabelDisplayName}"></paper-input>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<paper-input type="text" id="txtPath" required="required" label="${LabelFolder}" style="display: inline-block;width:84%;"></paper-input>
|
||||
<paper-icon-button id="btnSelectPath" icon="search"></paper-icon-button>
|
||||
<div class="fieldDescription">${LabelAdditionalFoldersCanBeAddedHelp}</div>
|
||||
<h1 style="display:inline-block;vertical-align:middle;">${HeadersFolders}</h1>
|
||||
<paper-button raised class="btnAddFolder submit mini" style="margin-left:1em;" title="${ButtonAdd}">
|
||||
<iron-icon icon="add"></iron-icon>
|
||||
<span>${ButtonAdd}</span>
|
||||
</paper-button>
|
||||
</div>
|
||||
<div class="paperList folderList hide" style="padding: .7em 0;"></div>
|
||||
|
||||
<br />
|
||||
<div>
|
||||
<button type="submit" class="clearButton" data-role="none">
|
||||
|
|
|
@ -200,6 +200,10 @@
|
|||
background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0.75) 100%) !important; /* W3C */
|
||||
}
|
||||
|
||||
.cardContent .cardFooter:not(.fullCardFooter) {
|
||||
background: rgba(0, 0, 0, .5) !important;
|
||||
}
|
||||
|
||||
.lightCardFooter {
|
||||
background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%) !important; /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,0.7))) !important; /* Chrome,Safari4+ */
|
||||
|
@ -247,7 +251,7 @@
|
|||
}
|
||||
|
||||
.cardContent .cardFooter .cardText {
|
||||
font-size: 14px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.cardOverlayInner {
|
||||
|
|
|
@ -240,7 +240,8 @@
|
|||
|
||||
setBackdrops: setBackdrops,
|
||||
setBackdropUrl: setBackdropUrl,
|
||||
setDefault: setDefault
|
||||
setDefault: setDefault,
|
||||
clear: clearBackdrop
|
||||
};
|
||||
|
||||
})(jQuery, document);
|
|
@ -1,7 +1,5 @@
|
|||
(function ($, document) {
|
||||
|
||||
var view = LibraryBrowser.getDefaultItemsView('Poster', 'Poster');
|
||||
|
||||
var currentItem;
|
||||
|
||||
var data = {};
|
||||
|
@ -25,7 +23,7 @@
|
|||
|
||||
pageData.query.Filters = "";
|
||||
pageData.query.NameStartsWithOrGreater = '';
|
||||
pageData.view = LibraryBrowser.getDefaultItemsView('Poster', 'Poster');
|
||||
pageData.view = LibraryBrowser.getSavedView(key) || LibraryBrowser.getDefaultItemsView('Poster', 'Poster');
|
||||
|
||||
pageData.query.ParentId = getParameterByName('parentId');
|
||||
LibraryBrowser.loadSavedQueryValues(key, pageData.query);
|
||||
|
|
|
@ -2048,7 +2048,7 @@
|
|||
|
||||
html += '<div class="cardOverlayTarget"></div>';
|
||||
|
||||
if (item.LocationType == "Offline" || item.LocationType == "Virtual") {
|
||||
if (item.LocationType == "Virtual") {
|
||||
if (options.showLocationTypeIndicator !== false) {
|
||||
html += LibraryBrowser.getOfflineIndicatorHtml(item);
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@
|
|||
preferThumb: true,
|
||||
shape: getThumbShape(),
|
||||
overlayText: true,
|
||||
showTitle: true,
|
||||
showTitle: false,
|
||||
lazy: true,
|
||||
showDetailsMenu: true,
|
||||
overlayPlayButton: true
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
items: result.Items,
|
||||
shape: "square",
|
||||
context: getParameterByName('context') || 'photos',
|
||||
overlayText: tabIndex != 0,
|
||||
overlayText: true,
|
||||
lazy: true,
|
||||
coverImage: true,
|
||||
showTitle: tabIndex == 0,
|
||||
|
|
|
@ -244,6 +244,7 @@ var Dashboard = {
|
|||
|
||||
importCss: function (url) {
|
||||
|
||||
var originalUrl = url;
|
||||
url += "?v=" + window.dashboardVersion;
|
||||
|
||||
if (!Dashboard.importedCss) {
|
||||
|
@ -261,12 +262,21 @@ var Dashboard = {
|
|||
} else {
|
||||
var link = document.createElement('link');
|
||||
link.setAttribute('rel', 'stylesheet');
|
||||
link.setAttribute('data-url', originalUrl);
|
||||
link.setAttribute('type', 'text/css');
|
||||
link.setAttribute('href', url);
|
||||
document.head.appendChild(link);
|
||||
}
|
||||
},
|
||||
|
||||
removeStylesheet: function (url) {
|
||||
|
||||
var elem = document.querySelector('link[data-url=\'' + url + '\']');
|
||||
if (elem) {
|
||||
elem.parentNode.removeChild(elem);
|
||||
}
|
||||
},
|
||||
|
||||
showError: function (message) {
|
||||
|
||||
Dashboard.alert(message);
|
||||
|
|
|
@ -90,6 +90,12 @@
|
|||
$('.deviceAccess', page).show().html(html).trigger('create');
|
||||
|
||||
$('#chkEnableAllDevices', page).checked(user.Policy.EnableAllDevices).checkboxradio('refresh').trigger('change');
|
||||
|
||||
if (user.Policy.IsAdministrator) {
|
||||
page.querySelector('.deviceAccessContainer').classList.add('hide');
|
||||
} else {
|
||||
page.querySelector('.deviceAccessContainer').classList.remove('hide');
|
||||
}
|
||||
}
|
||||
|
||||
function loadUser(page, user, loggedInUser, mediaFolders, channels, devices) {
|
||||
|
|
|
@ -1539,7 +1539,6 @@
|
|||
"ButtonClear": "Clear",
|
||||
"ButtonEditImages": "Edit Images",
|
||||
"LabelFolder": "Folder:",
|
||||
"LabelAdditionalFoldersCanBeAddedHelp": "Additional folders can be added to this library after setting it up.",
|
||||
"HeadersFolders": "Folders",
|
||||
"LabelDisplayName": "Display name:"
|
||||
}
|
||||
|
|
|
@ -397,7 +397,7 @@
|
|||
"LabelPremiereProgram": "PREMIERE",
|
||||
"LabelHDProgram": "HD",
|
||||
"HeaderChangeFolderType": "Change Content Type",
|
||||
"HeaderChangeFolderTypeHelp": "To change the type, please remove and rebuild the folder with the new type.",
|
||||
"HeaderChangeFolderTypeHelp": "To change the type, please remove and rebuild the library with the new type.",
|
||||
"HeaderAlert": "Alert",
|
||||
"MessagePleaseRestart": "Please restart to finish updating.",
|
||||
"ButtonRestart": "Restart",
|
||||
|
@ -921,5 +921,6 @@
|
|||
"TryDragAndDropMessage": "To re-arrange playlist items, just drag and drop. Try it!",
|
||||
"HeaderTryMicrosoftEdge": "Try Microsoft Edge",
|
||||
"MessageTryMicrosoftEdge": "For a better experience on Windows 10, try the new Microsoft Edge Browser.",
|
||||
"ErrorAddingListingsToSchedulesDirect": "There was an error adding the lineup to your Schedules Direct account. Schedules Direct only allows a limited number of lineups per account. You may need to log into the Schedules Direct website and remove others listings from your account before proceeeding."
|
||||
"ErrorAddingListingsToSchedulesDirect": "There was an error adding the lineup to your Schedules Direct account. Schedules Direct only allows a limited number of lineups per account. You may need to log into the Schedules Direct website and remove others listings from your account before proceeeding.",
|
||||
"PleaseAddAtLeastOneFolder": "Please add at least one folder to this library by clicking the Add button."
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
color: #FF9100;
|
||||
}
|
||||
|
||||
.viewMenuBar {
|
||||
.viewMenuBar, .halloweenInfoButton {
|
||||
color: #FF9100 !important;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,25 @@
|
|||
(function () {
|
||||
|
||||
Dashboard.importCss('themes/halloween/style.css');
|
||||
|
||||
var lastSound = 0;
|
||||
var iconCreated;
|
||||
var destroyed;
|
||||
var currentSound;
|
||||
var cancelKey = 'cancelHalloween';
|
||||
var cancelValue = '5';
|
||||
|
||||
function onPageShow() {
|
||||
var page = this;
|
||||
|
||||
if (!destroyed) {
|
||||
|
||||
if (appStorage.getItem(cancelKey) == cancelValue) {
|
||||
|
||||
destroyed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
Dashboard.importCss('themes/halloween/style.css');
|
||||
|
||||
if (!$.browser.mobile) {
|
||||
|
||||
if (!page.classList.contains('itemDetailPage')) {
|
||||
|
@ -19,6 +32,64 @@
|
|||
playSound('http://github.com/MediaBrowser/Emby.Resources/raw/master/themes/halloween/howl.wav');
|
||||
}
|
||||
}
|
||||
|
||||
addIcon();
|
||||
}
|
||||
}
|
||||
|
||||
function addIcon() {
|
||||
|
||||
if (iconCreated) {
|
||||
return;
|
||||
}
|
||||
|
||||
iconCreated = true;
|
||||
|
||||
var elem = document.createElement('paper-icon-button');
|
||||
elem.icon = 'info';
|
||||
elem.classList.add('halloweenInfoButton');
|
||||
$(elem).on('click', onIconClick);
|
||||
|
||||
var viewMenuSecondary = document.querySelector('.viewMenuSecondary');
|
||||
|
||||
if (viewMenuSecondary) {
|
||||
viewMenuSecondary.insertBefore(elem, viewMenuSecondary.childNodes[0]);
|
||||
}
|
||||
}
|
||||
|
||||
function onIconClick() {
|
||||
|
||||
Dashboard.dialog({
|
||||
|
||||
title: "Happy Halloween",
|
||||
message: "Happy Halloween from the Emby Team. We hope your Halloween is spooktacular! Would you like to allow the Halloween theme to continue?",
|
||||
callback: function (result) {
|
||||
|
||||
if (result == 1) {
|
||||
destroyTheme();
|
||||
}
|
||||
},
|
||||
|
||||
buttons: [Globalize.translate('ButtonYes'), Globalize.translate('ButtonNo')]
|
||||
});
|
||||
}
|
||||
|
||||
function destroyTheme() {
|
||||
|
||||
destroyed = true;
|
||||
|
||||
var halloweenInfoButton = document.querySelector('.halloweenInfoButton');
|
||||
if (halloweenInfoButton) {
|
||||
halloweenInfoButton.parentNode.removeChild(halloweenInfoButton);
|
||||
}
|
||||
|
||||
if (currentSound) {
|
||||
currentSound.stop();
|
||||
}
|
||||
|
||||
Dashboard.removeStylesheet('themes/halloween/style.css');
|
||||
Backdrops.clear();
|
||||
appStorage.setItem(cancelKey, cancelValue);
|
||||
}
|
||||
|
||||
pageClassOn('pageshow', "libraryPage", onPageShow);
|
||||
|
@ -37,6 +108,7 @@
|
|||
});
|
||||
|
||||
sound.play();
|
||||
currentSound = sound;
|
||||
lastSound = new Date().getTime();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -45,8 +45,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="deviceAccessContainer hide">
|
||||
<br />
|
||||
<div>
|
||||
<div class="ui-controlgroup-label">${HeaderDeviceAccess}</div>
|
||||
<div>
|
||||
<label for="chkEnableAllDevices">${OptionEnableAccessFromAllDevices}</label>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue