fixes #715 - Support creating/editing collections (boxsets) in web client #715

This commit is contained in:
Luke Pulverenti 2014-03-07 13:48:55 -05:00
parent edc7f33329
commit f76d02d315
7 changed files with 38 additions and 32 deletions

View File

@ -329,7 +329,7 @@
}
}
.popupIdentifyForm, .identificationSearchResults {
.popupIdentify form, .identificationSearchResults {
overflow-y: auto;
}
@ -341,14 +341,14 @@
@media all and (min-height: 500px) {
.popupIdentifyForm, .identificationSearchResults {
.popupIdentify form, .identificationSearchResults {
height: 350px;
}
}
@media all and (min-height: 600px) {
.popupIdentifyForm, .identificationSearchResults {
.popupIdentify form, .identificationSearchResults {
height: 450px;
}
@ -359,7 +359,7 @@
@media all and (min-height: 700px) {
.popupIdentifyForm, .identificationSearchResults {
.popupIdentify form, .identificationSearchResults {
height: 550px;
}
@ -374,7 +374,7 @@
height: 600px;
}
.popupIdentifyForm, .identificationSearchResults {
.popupIdentify form, .identificationSearchResults {
height: 600px;
}
@ -389,7 +389,7 @@
height: 700px;
}
.popupIdentifyForm, .identificationSearchResults {
.popupIdentify form, .identificationSearchResults {
height: 700px;
}
}

View File

@ -23,7 +23,11 @@
<a id="btnEditImages" href="#" data-role="button">Images</a>
</div>
<div style="margin-top: -20px;">
<p style="margin-top: -20px;">
Add or remove any movies, series, albums, books or games you wish to group within this collection.
</p>
<div>
<button type="button" id="btnAddItem" data-icon="plus" data-inline="true" data-mini="true">Add</button>
<button type="button" id="btnRemoveItems" data-icon="delete" data-inline="true" data-mini="true" disabled="disabled">Remove</button>
</div>
@ -41,7 +45,7 @@
<div data-role="content">
<form class="popupIdentifyForm" style="max-width: initial;">
<form class="collectionItemSearchForm" style="max-width: initial;">
<div>
<label for="txtLookupName">Name:</label>
@ -50,7 +54,7 @@
<input type="text" id="txtLookupName" data-mini="true" required="required" />
</div>
<button type="submit" data-theme="b" data-icon="search" data-mini="true" data-inline="true" data-iconpos="notext">
<button type="submit" data-icon="search" data-mini="true" data-inline="true" data-iconpos="notext">
Search
</button>
</div>
@ -67,7 +71,7 @@
</div>
<script type="text/javascript">
$('.popupIdentifyForm').off('submit', EditCollectionItemsPage.onSearchFormSubmit).on('submit', EditCollectionItemsPage.onSearchFormSubmit);
$('.collectionItemSearchForm').off('submit', EditCollectionItemsPage.onSearchFormSubmit).on('submit', EditCollectionItemsPage.onSearchFormSubmit);
</script>
</div>
</body>

View File

@ -15,9 +15,6 @@
<a href="moviestudios.html">Studios</a>
</div>
</div>
<div id="boxsetTabs" class="itemTabs" style="display: none;">
<br />
</div>
<div id="trailerTabs" class="itemTabs" style="display: none;">
<div class="libraryViewNav">
<a href="moviesrecommended.html">Suggested</a>

View File

@ -119,14 +119,14 @@
userId: Dashboard.getCurrentUserId(),
searchTerm: searchTerm,
limit: 50,
limit: 30,
includePeople: false,
includeGenres: false,
includeStudios: false,
includeArtists: false,
IncludeItemTypes: "Movie,Series,Game,MusicAlbum"
IncludeItemTypes: "Movie,Series,Game,MusicAlbum,Book"
}).done(function (result) {

View File

@ -173,10 +173,6 @@
$('#gameSystemTabs', page).show();
}
if (item.Type == "BoxSet") {
$('#boxsetTabs', page).show();
}
if (item.Type == "Trailer") {
$('#trailerTabs', page).show();
}

View File

@ -92,7 +92,9 @@
html += '<a class="viewMenuLink viewMenuTextLink desktopViewMenuLink' + (view == 'games' ? selectedCssClass : '') + '" href="gamesrecommended.html">' + (view == 'games' ? selectedHtml : '') + '<span class="viewName">Games</span></a>';
}
html += '<a class="viewMenuLink viewMenuTextLink desktopViewMenuLink' + (view == 'boxsets' ? selectedCssClass : '') + '" href="collections.html">' + (view == 'boxsets' ? selectedHtml : '') + '<span class="viewName">Collections</span></a>';
if (counts.MovieCount || counts.SeriesCount || counts.SongCount || counts.GameCount) {
html += '<a class="viewMenuLink viewMenuTextLink desktopViewMenuLink' + (view == 'boxsets' ? selectedCssClass : '') + '" href="collections.html">' + (view == 'boxsets' ? selectedHtml : '') + '<span class="viewName">Collections</span></a>';
}
$('.viewMenuRemoteControlButton', page).before(html);
}

View File

@ -26,19 +26,26 @@
updateFilterControls(page);
var checkSortOption = $('.radioSortBy:checked', page);
$('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create');
if (result.TotalRecordCount) {
var checkSortOption = $('.radioSortBy:checked', page);
$('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create');
html = LibraryBrowser.getPosterViewHtml({
items: result.Items,
shape: "portrait",
context: 'movies',
useAverageAspectRatio: true,
showTitle: true,
centerText: true
});
html = LibraryBrowser.getPosterViewHtml({
items: result.Items,
shape: "portrait",
context: 'movies',
useAverageAspectRatio: true,
showTitle: true,
centerText: true
});
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
} else {
html += '<p>Collections allow you to enjoy personalized groupings of Movies, Series, Albums, Books and Games. Click the New button to start creating Collections.</p>';
}
$('#items', page).html(html).trigger('create').createPosterItemHoverMenu();
@ -99,7 +106,7 @@
$('#newCollectionPanel', page).panel('toggle');
$('#txtNewCollectionName', page).focus();
$('#txtNewCollectionName', page).val('').focus();
}
$(document).on('pageinit', "#boxsetsPage", function () {