Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit layout and fix some buttons #9

Merged
merged 15 commits into from
Sep 13, 2019
4 changes: 2 additions & 2 deletions Jellyfin.Plugin.Reports/Jellyfin.Plugin.Reports.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyVersion>3.0.0</AssemblyVersion>
<FileVersion>3.0.0</FileVersion>
<AssemblyVersion>4.0.0</AssemblyVersion>
<FileVersion>4.0.0</FileVersion>
<RootNamespace>Jellyfin.Plugin.Reports</RootNamespace>
</PropertyGroup>

Expand Down
59 changes: 27 additions & 32 deletions Jellyfin.Plugin.Reports/Web/reports.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div id="libraryReportManagerPage" data-role="page" class="page type-interior reportsPage pluginConfigurationPage" data-title="Reports" data-controller="__plugin/reportsjs">
<div id="libraryReportManagerPage" data-role="page" class="page type-interior reportsPage pluginConfigurationPage data-require="emby-input,emby-button,emby-checkbox,emby-select"" data-title="Reports" data-controller="__plugin/reportsjs">
<style>

/* "page" containers - full-screen views, one should always be in view post-pageload */
Expand Down Expand Up @@ -304,6 +304,12 @@
-webkit-overflow-scrolling: touch;
}

.reporContainer {
overflow-x: scroll;
overflow-y: hidden;
white-space: nowrap;
}

.tblLibraryReport img {
height: 18px;
margin-right: 10px;
Expand All @@ -316,15 +322,14 @@
<div class="content-primary">
<div style="text-align: center;">
<div class="viewControls">
<span style="margin-right: 10px; vertical-align: middle;">Report</span>
<div style="display: inline-block;">
<select data-mini="true" data-inline="true" id="selectViewType">
<div class="selectContainer selectContainer-inline">
<select is="emby-select" label="Report:" id="selectViewType">
<option value="ReportData">Media</option>
<option value="ReportActivities">Activity</option>
</select>
</div>
<div style="display: inline-block;" id="selectIncludeItemTypesBox">
<select data-mini="true" data-inline="true" id="selectIncludeItemTypes" name="selectIncludeItemTypes">
<div class="selectContainer selectContainer-inline" id="selectIncludeItemTypesBox">
<select is="emby-select" id="selectIncludeItemTypes" label="Mediatype:" name="selectIncludeItemTypes">
<option value="MusicAlbum">Albums</option>
<option value="MusicArtist">Artists</option>
<option value="Book">Books</option>
Expand All @@ -346,7 +351,6 @@
<div class="listTopPaging">
</div>
</div>
<br />
<div class="reporContainer" style="height:auto"></div>

<div class="listBottomPaging">
Expand All @@ -355,24 +359,21 @@
<div data-role="panel" id="viewPanel" class="viewPanel" data-position="right" data-display="overlay" data-position-fixed="true">
<form>
<div class="viewPanelTabs">
<a is="emby-button" href="#" id="tabView" data-role="button" class="viewTabButton ui-btn-active" data-tab="tabView">View</a>
<a is="emby-button" href="#" id="tabFilter" data-role="button" class="viewTabButton" data-tab="tabFilter">Filter</a>
<button is="emby-button" type="button" id="tabView" data-role="button" class="raised viewTabButton ui-btn-active" data-tab="tabView">View</button>
<button is="emby-button" type="button" id="tabFilter" data-role="button" class="raised viewTabButton" data-tab="tabFilter">Filter</button>
</div>



<br>
<div class="tabView viewTab" id="tabViewBox">
<br />
<div id="selectReportGroupingBox">
<label for="selectViewGrouping">Grouping</label>
<select id="selectReportGroup"></select>
<br />
<input type="checkbox" id="chkStartCollapsed" /> <label for="chkPlayed">Start Collapsed</label><br />
<h2>Settings</h2>
<div class="selectContainer" id="selectReportGroupingBox">
<select is="emby-select" id="selectReportGroup" label="Grouping:"></select>
</div>
<br />
<div id="selectPageSizeBox" style="display: none;">
<label for="selectPageSize">Page size</label>
<select id="selectPageSize" class="selectPageSize">
<label class="checkboxContainer">
<input is="emby-checkbox" type="checkbox" id="chkStartCollapsed" />
<span>Start Collapsed</span>
</label>
<div class="selectContainer" id="selectPageSizeBox" style="display: none;">
<select is="emby-select" id="selectPageSize" label="Page size:" class="selectPageSize">
<option value="20">20</option>
<option value="50">50</option>
<option value="100">100</option>
Expand All @@ -381,23 +382,17 @@
<option value="500">500</option>
<option value="-1">All</option>
</select>
<br />
<br />
</div>

<div id="exportReportBox">
<fieldset>
<label>Export</label>
<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>
<label>Export</label><br>
<button is="emby-button" type="button" class="raised block" name="btnReportExportExcel" id="btnReportExportExcel" data-icon="arrow-d">Excel</button>
<button is="emby-button" type="button" class="raised block" name="btnReportExportCsv" id="btnReportExportCsv" data-icon="arrow-d">CSV</button>
</fieldset>
</div>

<div data-role="collapsible" data-collapsed="true" class="reportsColumns" id="grpReportsColumns">
<h2>Columns</h2>
<button type="button" name="btnResetReportColumns" id="btnResetReportColumns" data-icon="refresh">Reset</button>
<br />
<br />
<button type="button" class="raised block" is="emby-button" name="btnResetReportColumns" id="btnResetReportColumns" data-icon="refresh">Reset</button>
<div class="filterOptions">
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions Jellyfin.Plugin.Reports/Web/reports.js
Original file line number Diff line number Diff line change
Expand Up @@ -1171,12 +1171,12 @@

if (header.ShowHeaderLabel) {
if (header.SortField) {
cellHtml += '<a class="lnkColumnSort button-link" is="emby-button" href="#" data-sortfield="' + header.SortField + '" style="text-decoration:underline;">';
cellHtml += '<button class="lnkColumnSort button-link" is="emby-button" data-sortfield="' + header.SortField + '" style="text-decoration:underline;">';
}

cellHtml += (header.Name || '&nbsp;');
if (header.SortField) {
cellHtml += '</a>';
cellHtml += '</button>';
if (header.SortField === query.SortBy) {

if (query.SortOrder === "Descending") {
Expand Down Expand Up @@ -1256,7 +1256,7 @@
html += rItem.Name;
break;
case "Detail":
html += '<a target="_blank" class="button-link" href="index.html#!/' + appRouter.getRouteUrl({ Id: id, ServerId: serverId }) + '">' + rItem.Name + '</a>';
html += '<a target="_blank" class="button-link" href="index.html#!/edititemmetadata.html?' + appRouter.getRouteUrl({ Id: id, ServerId: serverId }) + '"><i class="md-icon">mode_edit</i></a> <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-button" class="button-link" href="edititemmetadata.html?id=' + rRow.Id + '">' + rItem.Name + '</a>';
Expand Down Expand Up @@ -1378,7 +1378,7 @@
var selected = "None";

$('#selectReportGroup', page).find('option').remove().end();
$('#selectReportGroup', page).append('<option value="None"></option>');
$('#selectReportGroup', page).append('<option value="None">None</option>');

result.map(function (header) {
if ((header.DisplayType === "Screen" || header.DisplayType === "ScreenExport") && header.CanGroup) {
Expand Down Expand Up @@ -1668,7 +1668,7 @@
value = filter.FieldName;
checked = filter.Visible;
}

itemHtml += '<input id="' + id + '" type="checkbox" data-filter="' + value + '" class="' + cssClass + '"';
if (checked)
itemHtml += ' checked="checked" ';
Expand Down
2 changes: 1 addition & 1 deletion build.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: "jellyfin-plugin-reports"
guid: "d4312cd9-5c90-4f38-82e8-51da566790e8"
version: "3" # Please increment with each pull request
version: "4" # Please increment with each pull request
jellyfin_version: "10.3.0" # The earliest binary-compatible version
owner: "jellyfin"
nicename: "Reports"
Expand Down