add list view to item list page

This commit is contained in:
Luke Pulverenti 2016-07-13 15:09:45 -04:00
parent 42840af961
commit d2b07a150a

View File

@ -112,6 +112,13 @@
html = libraryBrowser.getPosterViewHtml(posterOptions); html = libraryBrowser.getPosterViewHtml(posterOptions);
} }
else if (viewStyle == "List") {
html = libraryBrowser.getListViewHtml({
items: result.Items,
sortBy: query.SortBy
});
}
else if (viewStyle == "Thumb") { else if (viewStyle == "Thumb") {
posterOptions.preferThumb = true; posterOptions.preferThumb = true;
@ -259,7 +266,7 @@
var btnSelectView = view.querySelector('.btnSelectView'); var btnSelectView = view.querySelector('.btnSelectView');
btnSelectView.addEventListener('click', function (e) { btnSelectView.addEventListener('click', function (e) {
libraryBrowser.showLayoutMenu(e.target, getPageData().view, 'Poster,PosterCard,Thumb'.split(',')); libraryBrowser.showLayoutMenu(e.target, getPageData().view, 'List,Poster,PosterCard,Thumb'.split(','));
}); });
btnSelectView.addEventListener('layoutchange', function (e) { btnSelectView.addEventListener('layoutchange', function (e) {