Merge pull request #8 from faush01/master

sorting, links and layout
This commit is contained in:
Luke 2019-01-20 01:26:04 -05:00 committed by Claus Vium
parent ddd714a3b3
commit 3b44fa285e
2 changed files with 10 additions and 9 deletions

View File

@ -169,7 +169,6 @@ namespace EmbyReports.Api.Data
HeaderMetadata.ImagePrimary,
HeaderMetadata.ImageBackdrop,
HeaderMetadata.ImageLogo,
HeaderMetadata.Path,
HeaderMetadata.Name,
HeaderMetadata.DateAdded,
HeaderMetadata.ReleaseDate,
@ -183,7 +182,8 @@ namespace EmbyReports.Api.Data
HeaderMetadata.Audio,
HeaderMetadata.Subtitles,
HeaderMetadata.Trailers,
HeaderMetadata.Specials
HeaderMetadata.Specials,
HeaderMetadata.Path
};
case ReportIncludeItemTypes.Book:
@ -252,7 +252,6 @@ namespace EmbyReports.Api.Data
HeaderMetadata.ImagePrimary,
HeaderMetadata.ImageBackdrop,
HeaderMetadata.ImageLogo,
HeaderMetadata.Path,
HeaderMetadata.Name,
HeaderMetadata.EpisodeSeries,
HeaderMetadata.Season,
@ -269,7 +268,8 @@ namespace EmbyReports.Api.Data
HeaderMetadata.Audio,
HeaderMetadata.Subtitles,
HeaderMetadata.Trailers,
HeaderMetadata.Specials
HeaderMetadata.Specials,
HeaderMetadata.Path
};
case ReportIncludeItemTypes.Video:
@ -361,8 +361,7 @@ namespace EmbyReports.Api.Data
case HeaderMetadata.Path:
option.Column = (i, r) => i.Path;
option.Header.ItemViewType = ItemViewType.Detail;
option.Header.SortField = "SortName";
option.Header.SortField = "Path,SortName";
break;
case HeaderMetadata.Name:
@ -389,6 +388,7 @@ namespace EmbyReports.Api.Data
option.Column = (i, r) => this.GetRuntimeDateTime(i.RunTimeTicks);
option.Header.HeaderFieldType = ReportFieldType.Minutes;
option.Header.SortField = "Runtime,SortName";
option.Header.CanGroup = false;
break;
case HeaderMetadata.PlayCount:
@ -585,7 +585,8 @@ namespace EmbyReports.Api.Data
var video = item as Video;
ReportRow rRow = new ReportRow
{
Id = item.Id.ToString("N"),
Id = item.InternalId.ToString(),
//GuidId = item.Id.ToString("N"),
HasLockData = item.IsLocked,
HasLocalTrailer = item.GetExtras(new[] { ExtraType.Trailer }).Any(),
HasImageTagsPrimary = item.ImageInfos != null && item.ImageInfos.Count(n => n.Type == ImageType.Primary) > 0,

View File

@ -1177,7 +1177,7 @@
cellHtml += (header.Name || ' ');
if (header.SortField) {
cellHtml += '</a>';
if (header.SortField === defaultSortBy) {
if (header.SortField === query.SortBy) {
if (query.SortOrder === "Descending") {
cellHtml += '<span style="font-weight:bold;margin-left:5px;vertical-align:top;">&darr;</span>';
@ -1256,7 +1256,7 @@
html += rItem.Name;
break;
case "Detail":
html += '<a is="emby-linkbutton" class="button-link" href="' + appRouter.getRouteUrl({ Id: id, ServerId: serverId }) + '">' + rItem.Name + '</a>';
html += '<a target="_blank" class="button-link" href="index.html#!/' + appRouter.getRouteUrl({ Id: id, ServerId: serverId }) + '">' + rItem.Name + '</a>';
break;
case "Edit":
html += '<a is="emby-linkbutton" class="button-link" href="edititemmetadata.html?id=' + rRow.Id + '">' + rItem.Name + '</a>';