This commit is contained in:
Luke Pulverenti 2015-07-27 14:18:20 -04:00
commit 66a4e3975c
3 changed files with 68 additions and 18 deletions

View File

@ -74,8 +74,8 @@
<div id="exportReportBox">
<fieldset>
<label>${HeaderExport}</label>
<button type="button" name="btnReportExportCsv" id="btnReportExportCsv" data-icon="arrow-d">CSV</button>
<button type="button" name="btnReportExportExcel" id="btnReportExportExcel" data-icon="arrow-d">Excel</button>
<button type="button" name="btnReportExportCsv" id="btnReportExportCsv" data-icon="arrow-d">CSV</button>
</fieldset>
<br />
</div>

View File

@ -8,7 +8,8 @@
IncludeItemTypes: "Movie",
HasQueryLimit: true,
GroupBy: "None",
ReportView: "ReportData"
ReportView: "ReportData",
DisplayType: "Screen",
};
function getTable(result) {
@ -21,19 +22,21 @@
result.Headers.map(function (header) {
var cellHtml = '<th data-priority="' + 'persist' + '">';
if (header.SortField) {
cellHtml += '<a class="lnkColumnSort" href="#" data-sortfield="' + header.SortField + '" style="text-decoration:underline;">';
}
if (header.ShowHeaderLabel) {
if (header.SortField) {
cellHtml += '<a class="lnkColumnSort" href="#" data-sortfield="' + header.SortField + '" style="text-decoration:underline;">';
}
cellHtml += (header.Name || '&nbsp;');
if (header.SortField) {
cellHtml += '</a>';
if (header.SortField === defaultSortBy) {
cellHtml += (header.Name || '&nbsp;');
if (header.SortField) {
cellHtml += '</a>';
if (header.SortField === defaultSortBy) {
if (query.SortOrder === "Descending") {
cellHtml += '<span style="font-weight:bold;margin-left:5px;vertical-align:top;font-size:14px">&darr;</span>';
} else {
cellHtml += '<span style="font-weight:bold;margin-left:5px;vertical-align:top;font-size:14px;">&uarr;</span>';
if (query.SortOrder === "Descending") {
cellHtml += '<span style="font-weight:bold;margin-left:5px;vertical-align:top;font-size:14px">&darr;</span>';
} else {
cellHtml += '<span style="font-weight:bold;margin-left:5px;vertical-align:top;font-size:14px;">&uarr;</span>';
}
}
}
}
@ -125,6 +128,49 @@
html += '<div class="libraryReportIndicator clearLibraryReportIndicator"><div class="ui-icon-check ui-btn-icon-notext"></div></div>';
}
break;
case "LockDataImage":
if (rRow.HasLockData) {
html += '<img src="css/images/editor/lock.png" style="width:18px"/>';
}
break;
case "UnidentifiedImage":
if (rRow.IsUnidentified) {
html += '<div class="libraryReportIndicator"><div class="ui-icon-alert ui-btn-icon-notext"></div></div>';
}
break;
case "TagsPrimaryImage":
if (!rRow.HasImageTagsPrimary) {
html += '<a href="edititemimages.html?id=' + rRow.Id + '"><img src="css/images/editor/missingprimaryimage.png" title="Missing primary image." style="width:18px"/></a>';
}
break;
case "TagsBackdropImage":
if (!rRow.HasImageTagsBackdrop) {
if (rRow.RowType !== "Episode" && rRow.RowType !== "Season" && rRow.MediaType !== "Audio" && rRow.RowType !== "TvChannel" && rRow.RowType !== "MusicAlbum") {
html += '<a href="edititemimages.html?id=' + rRow.Id + '"><img src="css/images/editor/missingbackdrop.png" title="Missing backdrop image." style="width:18px"/></a>';
}
}
break;
case "TagsLogoImage":
if (!rRow.HasImageTagsLogo) {
if (rRow.RowType === "Movie" || rRow.RowType === "Trailer" || rRow.RowType === "Series" || rRow.RowType === "MusicArtist" || rRow.RowType === "BoxSet") {
html += '<a href="edititemimages.html?id=' + rRow.Id + '"><img src="css/images/editor/missinglogo.png" title="Missing logo image." style="width:18px"/></a>';
}
}
break;
case "UserPrimaryImage":
if (rRow.UserId) {
var userImage = ApiClient.getUserImageUrl(rRow.UserId, {
height: 24,
type: 'Primary'
});
if (userImage) {
html += '<img src="' + userImage + '" />';
} else {
html += '';
}
}
break;
case "StatusImage":
if (rRow.HasLockData) {
html += '<img src="css/images/editor/lock.png" style="width:18px"/>';
@ -226,7 +272,6 @@
var url = ApiClient.getUrl("Reports/Items/Download", query);
if (url) {
e.preventDefault(); //stop the browser from following
window.location.href = url;
}
}
@ -244,7 +289,7 @@
$('#selectReportGroup', page).append('<option value="None"></option>');
result.map(function (header) {
if (header.Visible && header.CanGroup) {
if ((header.DisplayType === "Screen" || header.DisplayType === "ScreenExport") && header.CanGroup) {
if (header.FieldName.length > 0) {
var option = '<option value="' + header.FieldName + '">' + header.Name + '</option>';
$('#selectReportGroup', page).append(option);
@ -479,7 +524,6 @@
var filtersLoaded;
function reloadFiltersIfNeeded(page) {
if (!filtersLoaded) {
filtersLoaded = true;
@ -1023,7 +1067,7 @@
var delimiter = '|';
result.map(function (item) {
if (item.Visible)
if ((item.DisplayType === "Screen" || item.DisplayType === "ScreenExport"))
filters = filters ? (filters + delimiter + item.FieldName) : item.FieldName;
});
if (!itemQuery.ReportColumns)

View File

@ -1494,5 +1494,11 @@
"ImportFavoriteChannelsHelp": "If enabled, only channels that are marked as favorite on the tuner device will be imported.",
"ButtonRepeat": "Repeat",
"LabelEnableThisTuner": "Enable this tuner",
"LabelEnableThisTunerHelp": "Uncheck to prevent importing channels from this tuner."
"LabelEnableThisTunerHelp": "Uncheck to prevent importing channels from this tuner.",
"HeaderLocked": "Locked",
"HeaderUnidentified": "Unidentified",
"HeaderImagePrimary": "Primary",
"HeaderImageBackdrop": "Backdrop",
"HeaderImageLogo": "Logo",
"HeaderUserPrimaryImage": "User Image"
}