Conflicts:
	MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
This commit is contained in:
Tavares André 2015-04-20 19:07:29 +02:00
commit 581a105477
12 changed files with 314 additions and 14 deletions

View File

@ -22,6 +22,7 @@
background-color: rgba(0, 0, 0, .85);
z-index: 998;
display: none;
line-height: initial;
}
.cardOverlayInner {
@ -48,6 +49,13 @@
margin: 1px;
}
/*@media all and (max-width: 600px) {
.cardBox {
margin: 0;
}
}*/
.grayscale {
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
@ -168,6 +176,7 @@
padding: 5px 4px 2px;
text-shadow: none;
font-weight: 400;
line-height: initial;
}
.cardOverlayInner {

View File

@ -859,6 +859,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
color: #fff;
background: rgb(0, 143, 187);
background: rgba(0, 143, 187, .8);
line-height: initial;
}
.offlinePosterRibbon {
@ -887,6 +888,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
color: #fff;
background: rgb(82, 181, 75);
background: rgba(82, 181, 75, .8);
line-height: 16px;
}
.playedIndicator div:after {
@ -1022,10 +1024,12 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
.timelineHeader {
margin-bottom: .25em;
line-height: initial;
}
.itemsContainer {
margin: 0 auto;
line-height: 0;
}
.alphabetPicker {

View File

@ -36,6 +36,12 @@
<button id="btnDelete" type="button" data-icon="delete" data-mini="true" data-inline="true">${ButtonDelete}</button>
</div>
</div>
<div style="display: inline-block;vertical-align:middle;margin-left: 1em;" class="hide">
<div id="refreshLoading" style="display:none;">
<div class="circle1" style="top:-10px;"></div>
<div style="margin-top: -15px;"></div>
</div>
</div>
</div>
<div style="padding: 10px 0;">

View File

@ -40,6 +40,13 @@
<a href="moviestudios.html">${TabStudios}</a>
</div>
</div>
<div class="itemTabs photoTabs" style="display: none;">
<div class="libraryViewNav scopedLibraryViewNav">
<a href="photos.html" class="ui-btn-active lnkPhotoAlbums">${TabAlbums}</a>
<a href="photos.html?context=photos-photos" class="lnkPhotos">${TabPhotos}</a>
<a href="photos.html?context=photos-videos" class="lnkVideos">${TabVideos}</a>
</div>
</div>
<div id="tvShowsTabs" class="itemTabs" style="display: none;">
<div class="libraryViewNav scopedLibraryViewNav">
<a href="tvrecommended.html">${TabSuggestions}</a>

24
dashboard-ui/photos.html Normal file
View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<title>Emby</title>
</head>
<body>
<div id="photosPage" data-role="page" class="page libraryPage">
<div class="libraryViewNav scopedLibraryViewNav">
<a href="photos.html" class="ui-btn-active lnkPhotoAlbums">${TabAlbums}</a>
<a href="photos.html?context=photos-photos" class="lnkPhotos">${TabPhotos}</a>
<a href="photos.html?context=photos-videos" class="lnkVideos">${TabVideos}</a>
</div>
<div data-role="content">
<div class="viewSettings">
<div class="listTopPaging">
</div>
</div>
<div id="items" class="itemsContainer paddedItemsContainer" style="text-align:center;"></div>
</div>
</div>
</body>
</html>

View File

@ -1338,10 +1338,9 @@
function refreshWithOptions(page, options) {
ApiClient.refreshItem(currentItem.Id, options).done(function () {
$('#refreshLoading', page).show();
Dashboard.alert(Globalize.translate('MessageRefreshQueued'));
});
ApiClient.refreshItem(currentItem.Id, options);
}
function onWebSocketMessageReceived(e, data) {
@ -1352,8 +1351,11 @@
if (msg.Data.ItemsUpdated.indexOf(currentItem.Id) != -1) {
var page = $.mobile.activePage;
console.log('Item updated - reloading metadata');
reload($.mobile.activePage);
reload(page);
$('#refreshLoading', page).hide();
}
}
}

View File

@ -227,8 +227,7 @@
showTitle: showTitles,
centerText: true,
lazy: true,
autoThumb: true,
context: 'home'
autoThumb: true
});
html += '</div>';
}

View File

@ -254,7 +254,21 @@
$('a', elem).removeClass('ui-btn-active');
$('.lnkHomeLatest', page).addClass('ui-btn-active');
}
else if (context == 'movies' || item.Type == 'Movie' || context == 'movies-trailers') {
else if (context == 'photos' || context == 'photos-photos') {
elem = $('.photoTabs', page).show();
$('a', elem).removeClass('ui-btn-active');
$('.lnkHomeLatest', page).addClass('ui-btn-active');
if (context == 'photos-photos') {
$('.lnkPhotos', page).addClass('ui-btn-active');
}
else if (context == 'photos-videos') {
$('.lnkVideos', page).addClass('ui-btn-active');
} else {
$('.lnkPhotoAlbums', page).addClass('ui-btn-active');
}
}
else if (context == 'movies' || context == 'movies-trailers') {
elem = $('#movieTabs', page).show();
$('a', elem).removeClass('ui-btn-active');

View File

@ -484,10 +484,6 @@
return 'collections.html?topParentId=' + item.Id;
}
if (item.CollectionType == 'trailers') {
return "itemlist.html?parentId=" + item.Id;
}
if (item.CollectionType == 'tvshows') {
return 'tvrecommended.html?topParentId=' + item.Id;
}
@ -502,11 +498,17 @@
if (item.CollectionType == 'playlists') {
return 'playlists.html?topParentId=' + item.Id;
}
if (item.CollectionType == 'photos') {
return 'photos.html?topParentId=' + item.Id;
}
}
if (item.Type == 'CollectionFolder') {
return 'itemlist.html?topParentId=' + item.Id + '&parentid=' + item.Id;
}
if (item.Type == "PhotoAlbum" && context == 'photos') {
return "photos.html?parentId=" + id;
}
if (item.Type == "Playlist") {
return "playlistedit.html?id=" + id;
}

View File

@ -492,7 +492,7 @@
var invalidTypes = ['Person', 'Genre', 'MusicGenre', 'Studio', 'GameGenre', 'BoxSet', 'Playlist', 'UserView', 'CollectionFolder', 'Audio', 'Episode'];
return item.LocationType == 'FileSystem' && !item.CollectionType && invalidTypes.indexOf(item.Type) == -1;
return item.LocationType == 'FileSystem' && !item.CollectionType && invalidTypes.indexOf(item.Type) == -1 && item.MediaType != 'Photo';
}
};

View File

@ -0,0 +1,233 @@
(function ($, document) {
var view = LibraryBrowser.getDefaultItemsView('Poster', 'Poster');
// The base query options
var query = {
SortBy: "SortName",
SortOrder: "Ascending",
Fields: "PrimaryImageAspectRatio,SortName,SyncInfo",
StartIndex: 0,
ImageTypeLimit: 1,
EnableImageTypes: "Primary"
};
function getSavedQueryKey() {
return 'photos' + (query.ParentId || '');
}
function reloadItems(page) {
Dashboard.showLoadingMsg();
ApiClient.getItems(Dashboard.getCurrentUserId(), query).done(function (result) {
// Scroll back up so they can see the results from the beginning
$(document).scrollTop(0);
var html = '';
var pagingHtml = LibraryBrowser.getQueryPagingHtml({
startIndex: query.StartIndex,
limit: query.Limit,
totalRecordCount: result.TotalRecordCount,
viewButton: false,
showLimit: false
});
$('.listTopPaging', page).html(pagingHtml).trigger('create');
updateFilterControls(page);
// Poster
html = LibraryBrowser.getPosterViewHtml({
items: result.Items,
shape: "auto",
context: getParameterByName('context') || 'photos',
showTitle: false,
centerText: true,
lazy: true
});
var elem = $('#items', page).html(html).lazyChildren();
$(pagingHtml).appendTo(elem).trigger('create');
$('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit;
reloadItems(page);
});
$('.btnPreviousPage', page).on('click', function () {
query.StartIndex -= query.Limit;
reloadItems(page);
});
LibraryBrowser.saveQueryValues(getSavedQueryKey(), query);
Dashboard.hideLoadingMsg();
});
}
function updateFilterControls(page) {
// Reset form values using the last used query
$('.radioSortBy', page).each(function () {
this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase();
}).checkboxradio('refresh');
$('.radioSortOrder', page).each(function () {
this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase();
}).checkboxradio('refresh');
$('.chkStandardFilter', page).each(function () {
var filters = "," + (query.Filters || "");
var filterName = this.getAttribute('data-filter');
this.checked = filters.indexOf(',' + filterName) != -1;
}).checkboxradio('refresh');
}
var filtersLoaded;
function reloadFiltersIfNeeded(page) {
if (!filtersLoaded) {
filtersLoaded = true;
QueryFilters.loadFilters(page, Dashboard.getCurrentUserId(), query, function () {
reloadItems(page);
});
}
}
function setQueryPerContext(page) {
var context = getParameterByName('context');
$('.libraryViewNav a', page).removeClass('ui-btn-active');
if (context == 'photos-photos') {
query.Recursive = true;
query.MediaTypes = 'Photo';
$('.lnkPhotos', page).addClass('ui-btn-active');
}
else if (context == 'photos-videos') {
query.Recursive = true;
query.MediaTypes = 'Video';
$('.lnkVideos', page).addClass('ui-btn-active');
}
else {
query.Recursive = false;
query.MediaTypes = null;
$('.lnkPhotoAlbums', page).addClass('ui-btn-active');
}
query.ParentId = getParameterByName('parentId') || LibraryMenu.getTopParentId();
}
$(document).on('pageinit', "#photosPage", function () {
var page = this;
$('.viewPanel', page).on('panelopen', function () {
reloadFiltersIfNeeded(page);
});
$('.radioSortBy', this).on('click', function () {
query.SortBy = this.getAttribute('data-sortby');
query.StartIndex = 0;
reloadItems(page);
});
$('.radioSortOrder', this).on('click', function () {
query.SortOrder = this.getAttribute('data-sortorder');
query.StartIndex = 0;
reloadItems(page);
});
$('.chkStandardFilter', this).on('change', function () {
var filterName = this.getAttribute('data-filter');
var filters = query.Filters || "";
filters = (',' + filters).replace(',' + filterName, '').substring(1);
if (this.checked) {
filters = filters ? (filters + ',' + filterName) : filterName;
}
query.Filters = filters;
query.StartIndex = 0;
reloadItems(page);
});
$('#radioBasicFilters', this).on('change', function () {
if (this.checked) {
$('.basicFilters', page).show();
$('.advancedFilters', page).hide();
} else {
$('.basicFilters', page).hide();
}
});
$('#radioAdvancedFilters', this).on('change', function () {
if (this.checked) {
$('.advancedFilters', page).show();
$('.basicFilters', page).hide();
} else {
$('.advancedFilters', page).hide();
}
});
$('#selectPageSize', page).on('change', function () {
query.Limit = parseInt(this.value);
query.StartIndex = 0;
reloadItems(page);
});
}).on('pagebeforeshow', "#photosPage", function () {
var page = this;
setQueryPerContext(page);
var limit = LibraryBrowser.getDefaultPageSize();
// If the default page size has changed, the start index will have to be reset
if (limit != query.Limit) {
query.Limit = limit;
query.StartIndex = 0;
}
var viewKey = getSavedQueryKey();
LibraryBrowser.loadSavedQueryValues(viewKey, query);
QueryFilters.onPageShow(page, query);
LibraryBrowser.getSavedViewSetting(viewKey).done(function (val) {
if (val) {
$('#selectView', page).val(val).selectmenu('refresh').trigger('change');
} else {
reloadItems(page);
}
});
}).on('pageshow', "#photosPage", function () {
updateFilterControls(this);
});
})(jQuery, document);

View File

@ -93,7 +93,7 @@
<input type="hidden" name="cmd" id="ppCmd" value="_xclick">
<input type="hidden" name="business" value="donation@mediabrowser.tv">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_name" value="Media Browser Supporter">
<input type="hidden" name="item_name" value="Emby Supporter">
<input type="hidden" name="item_number" id="ppItemNo" value="MBSupporter">
<input type="hidden" name="notify_url" value="http://mb3admin.com/admin/service/services/ppipn.php">
<input type="hidden" name="return" id="paypalReturnUrl" value="#">