1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update movie view

This commit is contained in:
Luke Pulverenti 2015-08-15 19:10:50 -04:00
parent 0154f42bfe
commit 5581539648
11 changed files with 111 additions and 480 deletions

View file

@ -15,10 +15,7 @@
return defaultValue;
}
// Chrome seems to have virtualization built-in and can handle large lists easily
var isChrome = $.browser.chrome;
return isChrome ? 200 : 100;
return 100;
},
getDefaultItemsView: function (view, mobileView) {
@ -2359,6 +2356,34 @@
return [20, 50, 100, 200, 300, 400, 500];
},
showLayoutMenu: function (button, currentLayout) {
// Add banner and list once all screens support them
var views = ['Poster', 'PosterCard', 'Thumb', 'ThumbCard'];
var menuItems = views.map(function (v) {
return {
name: Globalize.translate('Option' + v),
id: v,
ironIcon: currentLayout == v ? 'check' : null
};
});
require(['actionsheet'], function () {
ActionSheetElement.show({
items: menuItems,
positionTo: button,
callback: function (id) {
$(button).trigger('layoutchange', [id]);
}
});
});
},
getQueryPagingHtml: function (options) {
var startIndex = options.startIndex;
@ -2391,7 +2416,7 @@
html += '</span>';
}
if (showControls || options.viewButton || options.addSelectionButton || options.additionalButtonsHtml) {
if (showControls || options.viewButton || options.addLayoutButton || options.addSelectionButton || options.additionalButtonsHtml) {
html += '<div style="display:inline-block;margin-left:10px;">';
@ -2407,6 +2432,11 @@
html += '<paper-button raised class="subdued notext btnToggleSelections"><iron-icon icon="check"></iron-icon></paper-button>';
}
if (options.addLayoutButton) {
html += '<paper-button raised class="subdued notext btnChangeLayout" onclick="LibraryBrowser.showLayoutMenu(this, \'' + (options.currentLayout || '') + '\');"><iron-icon icon="view-comfy"></iron-icon></paper-button>';
}
if (options.viewButton) {
//html += '<paper-button raised class="subdued notext"><iron-icon icon="view-comfy"></iron-icon></paper-button>';