feature: choose which noticeboard components to display with the link builder

also restyle noticeboard using flex
This commit is contained in:
Gary Sharp
2025-01-22 17:58:45 +11:00
parent 50603210b0
commit dee54bb6d7
12 changed files with 601 additions and 456 deletions
@@ -8,14 +8,16 @@
<h2>Report Preferences</h2> <h2>Report Preferences</h2>
<table> <table>
<tr> <tr>
<th style="width: 200px">Noticeboard Default Theme: <th style="width: 200px">
Noticeboard Default Theme:
</th> </th>
<td>@if (canConfig) <td>
@if (canConfig)
{ {
@Html.DropDownListFor(model => model.DefaultNoticeboardTheme, Model.DefaultNoticeboardThemeOptions().Select(o => new SelectListItem() { Value = o.Key, Text = o.Value })) @Html.DropDownListFor(model => model.DefaultNoticeboardTheme, Model.DefaultNoticeboardThemeOptions().Select(o => new SelectListItem() { Value = o.Key, Text = o.Value }))
@AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader() @AjaxHelpers.AjaxLoader()
<script type="text/javascript"> <script type="text/javascript">
$(function () { $(function () {
$element = $('#DefaultNoticeboardTheme'); $element = $('#DefaultNoticeboardTheme');
@@ -29,11 +31,11 @@
$('#Config_ReportPrefs_Preview').attr('class', 'theme-' + $(this).val()); $('#Config_ReportPrefs_Preview').attr('class', 'theme-' + $(this).val());
}); });
}); });
</script> </script>
} }
else else
{ {
@Model.DefaultNoticeboardThemeOptions().First(o => o.Key == Model.DefaultNoticeboardTheme).Value @Model.DefaultNoticeboardThemeOptions().First(o => o.Key == Model.DefaultNoticeboardTheme).Value
} }
<div id="Config_ReportPrefs_Preview" class="theme-@(Model.DefaultNoticeboardTheme)"> <div id="Config_ReportPrefs_Preview" class="theme-@(Model.DefaultNoticeboardTheme)">
<div class="heading">Noticeboard Heading</div> <div class="heading">Noticeboard Heading</div>
@@ -61,19 +63,27 @@
<h3>Report</h3> <h3>Report</h3>
<ul class="none"> <ul class="none">
<li> <li>
<input type="radio" id="Config_ReportPrefs_Builder_NTHDU" name="Report" class="themeable" data-url="@(Url.ActionAbsolute(MVC.Public.UserHeldDevices.Noticeboard()))" checked="checked" /><label for="Config_ReportPrefs_Builder_NTHDU">Technician Held Devices for Users (Noticeboard)</label> <input type="radio" id="Config_ReportPrefs_Builder_NTHDU" name="Report" class="themeable componentable" data-url="@(Url.ActionAbsolute(MVC.Public.UserHeldDevices.Noticeboard()))" checked="checked" /><label for="Config_ReportPrefs_Builder_NTHDU">Technician Held Devices for Users (Noticeboard)</label>
</li> </li>
<li> <li>
<input type="radio" id="Config_ReportPrefs_Builder_THDU" name="Report" data-url="@(Url.ActionAbsolute(MVC.Public.UserHeldDevices.Index()))" /><label for="Config_ReportPrefs_Builder_THDU">Technician Held Devices for Users (Report)</label> <input type="radio" id="Config_ReportPrefs_Builder_THDU" name="Report" data-url="@(Url.ActionAbsolute(MVC.Public.UserHeldDevices.Index()))" /><label for="Config_ReportPrefs_Builder_THDU">Technician Held Devices for Users (Report)</label>
</li> </li>
<li> <li>
<input type="radio" id="Config_ReportPrefs_Builder_NTHD" name="Report" class="themeable" data-url="@(Url.ActionAbsolute(MVC.Public.HeldDevices.Noticeboard()))" /><label for="Config_ReportPrefs_Builder_NTHD">Technician Held Devices (Noticeboard)</label> <input type="radio" id="Config_ReportPrefs_Builder_NTHD" name="Report" class="themeable componentable" data-url="@(Url.ActionAbsolute(MVC.Public.HeldDevices.Noticeboard()))" /><label for="Config_ReportPrefs_Builder_NTHD">Technician Held Devices (Noticeboard)</label>
</li> </li>
<li> <li>
<input type="radio" id="Config_ReportPrefs_Builder_THD" name="Report" data-url="@(Url.ActionAbsolute(MVC.Public.HeldDevices.Index()))" /><label for="Config_ReportPrefs_Builder_THD">Technician Held Devices (Report)</label> <input type="radio" id="Config_ReportPrefs_Builder_THD" name="Report" data-url="@(Url.ActionAbsolute(MVC.Public.HeldDevices.Index()))" /><label for="Config_ReportPrefs_Builder_THD">Technician Held Devices (Report)</label>
</li> </li>
</ul> </ul>
</div> </div>
<div class="components">
<h3>Show Components</h3>
<div id="Config_ReportPrefs_Builder_Components">
<label><input type="checkbox" value="inProcess" checked /> In Process</label>
<label><input type="checkbox" value="readyForReturn" checked /> Ready For Return</label>
<label><input type="checkbox" value="waitingForUserAction" checked /> Waiting For User Action</label>
</div>
</div>
<div class="theme"> <div class="theme">
<h3>Noticeboard Theme</h3> <h3>Noticeboard Theme</h3>
@Html.DropDownList("Config_ReportPrefs_Builder_Theme", new SelectListItem[] { new SelectListItem() { Value = "", Text = "<Default>", Selected = true } }.Concat(Model.DefaultNoticeboardThemeOptions().Select(o => new SelectListItem() { Value = o.Key, Text = o.Value }))) @Html.DropDownList("Config_ReportPrefs_Builder_Theme", new SelectListItem[] { new SelectListItem() { Value = "", Text = "<Default>", Selected = true } }.Concat(Model.DefaultNoticeboardThemeOptions().Select(o => new SelectListItem() { Value = o.Key, Text = o.Value })))
@@ -95,7 +105,8 @@
@foreach (var deviceProfile in Model.DeviceProfiles.Value) @foreach (var deviceProfile in Model.DeviceProfiles.Value)
{ {
<li> <li>
<input id="Config_ReportPrefs_Builder_DP_@(deviceProfile.Id)" type="checkbox" value="@deviceProfile.Id" /><label for="Config_ReportPrefs_Builder_DP_@(deviceProfile.Id)">@deviceProfile.Description</label></li> <input id="Config_ReportPrefs_Builder_DP_@(deviceProfile.Id)" type="checkbox" value="@deviceProfile.Id" /><label for="Config_ReportPrefs_Builder_DP_@(deviceProfile.Id)">@deviceProfile.Description</label>
</li>
} }
</ul> </ul>
</div> </div>
@@ -104,7 +115,8 @@
@foreach (var address in Model.OrganisationAddresses.Value) @foreach (var address in Model.OrganisationAddresses.Value)
{ {
<li> <li>
<input id="Config_ReportPrefs_Builder_OA_@(address.Id)" type="checkbox" value="@address.ShortName" /><label for="Config_ReportPrefs_Builder_OA_@(address.Id)">@address.Name (@address.ShortName)</label></li> <input id="Config_ReportPrefs_Builder_OA_@(address.Id)" type="checkbox" value="@address.ShortName" /><label for="Config_ReportPrefs_Builder_OA_@(address.Id)">@address.Name (@address.ShortName)</label>
</li>
} }
</ul> </ul>
</div> </div>
@@ -126,11 +138,21 @@
var filter = null; var filter = null;
var filterMethod = null; var filterMethod = null;
var filterValue = null; var filterValue = null;
let components = null;
var report = dialog.find('.report input:checked'); var report = dialog.find('.report input:checked');
if (report.length > 0) { if (report.length > 0) {
url = report.attr('data-url'); url = report.attr('data-url');
if (report.hasClass('componentable')) {
const checkedComponents = dialog.find('#Config_ReportPrefs_Builder_Components input:checked');
if (checkedComponents.length > 0 && checkedComponents.length < 3) {
components = checkedComponents.map(function () {
return this.value;
}).get().join(',');
}
}
if (report.hasClass('themeable')) { if (report.hasClass('themeable')) {
theme = dialog.find('.theme > select').val(); theme = dialog.find('.theme > select').val();
} }
@@ -147,17 +169,23 @@
.toArray().join(','); .toArray().join(',');
} }
if (!!theme || !!filter) { if (!!components || !!theme || !!filter) {
url += '?'; url += '?';
if (!!theme) if (!!components)
url += 'components=' + components;
if (!!theme) {
if (!url.endsWith('?'))
url += '&';
url += 'theme=' + theme; url += 'theme=' + theme;
}
if (!!theme && !!filter) if (!!filter) {
url += '&'; if (!url.endsWith('?'))
url += '&';
if (!!filter)
url += filter + filterMethod + '=' + filterValue; url += filter + filterMethod + '=' + filterValue;
}
} }
} }
@@ -182,8 +210,14 @@
}); });
dialog.find('.report').on('change', 'input', function () { dialog.find('.report').on('change', 'input', function () {
var $this = $(this); const $this = $(this);
var $theme = dialog.find('.theme'); const $components = dialog.find('.components');
const $theme = dialog.find('.theme');
if ($this.hasClass('componentable'))
$components.slideDown();
else
$components.slideUp();
if ($this.hasClass('themeable')) if ($this.hasClass('themeable'))
$theme.slideDown(); $theme.slideDown();
@@ -193,6 +227,8 @@
updateUrl(); updateUrl();
}); });
dialog.find('#Config_ReportPrefs_Builder_Components').on('change', 'input', updateUrl);
dialog.find('#Config_ReportPrefs_Builder_Theme').change(updateUrl); dialog.find('#Config_ReportPrefs_Builder_Theme').change(updateUrl);
dialog.find('#Config_ReportPrefs_Builder_Filter').change(function () { dialog.find('#Config_ReportPrefs_Builder_Filter').change(function () {
@@ -221,7 +257,7 @@
var $clipboard = $buttonpane.find('.fa-clipboard'); var $clipboard = $buttonpane.find('.fa-clipboard');
if (!!window.clipboardData) { if (!!window.clipboardData) {
$clipboard.click(function () { $clipboard.click(function () {
window.clipboardData.setData('Text', url); window.clipboardData.setData('Text', url);
@@ -65,59 +65,66 @@ WriteLiteral(">\r\n <h2>Report Preferences</h2>\r\n <table>\r\n <tr
WriteLiteral(" style=\"width: 200px\""); WriteLiteral(" style=\"width: 200px\"");
WriteLiteral(">Noticeboard Default Theme:\r\n </th>\r\n <td>"); WriteLiteral(">\r\n Noticeboard Default Theme:\r\n </th>\r\n <td" +
">\r\n");
#line 13 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 15 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
#line default
#line hidden
#line 15 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
if (canConfig) if (canConfig)
{ {
#line default
#line hidden
#line 15 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(Html.DropDownListFor(model => model.DefaultNoticeboardTheme, Model.DefaultNoticeboardThemeOptions().Select(o => new SelectListItem() { Value = o.Key, Text = o.Value })));
#line default
#line hidden
#line 15 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
#line default
#line hidden
#line 16 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default
#line hidden
#line 16 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
#line default #line default
#line hidden #line hidden
#line 17 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 17 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(AjaxHelpers.AjaxLoader()); Write(Html.DropDownListFor(model => model.DefaultNoticeboardTheme, Model.DefaultNoticeboardThemeOptions().Select(o => new SelectListItem() { Value = o.Key, Text = o.Value })));
#line default #line default
#line hidden #line hidden
#line 17 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 17 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
#line default
#line hidden
#line 18 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default #line default
#line hidden #line hidden
WriteLiteral(" <script");
#line 18 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
#line default
#line hidden
#line 19 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
#line 19 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
#line default
#line hidden
WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\""); WriteLiteral(" type=\"text/javascript\"");
@@ -131,7 +138,7 @@ WriteLiteral(@">
'"); '");
#line 25 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 27 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(Url.Action(MVC.API.JobPreferences.UpdateDefaultNoticeboardTheme())); Write(Url.Action(MVC.API.JobPreferences.UpdateDefaultNoticeboardTheme()));
@@ -144,28 +151,28 @@ WriteLiteral(@"',
$('#Config_ReportPrefs_Preview').attr('class', 'theme-' + $(this).val()); $('#Config_ReportPrefs_Preview').attr('class', 'theme-' + $(this).val());
}); });
}); });
</script> </script>
"); ");
#line 33 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 35 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
} }
else else
{ {
#line default #line default
#line hidden #line hidden
#line 36 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 38 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(Model.DefaultNoticeboardThemeOptions().First(o => o.Key == Model.DefaultNoticeboardTheme).Value); Write(Model.DefaultNoticeboardThemeOptions().First(o => o.Key == Model.DefaultNoticeboardTheme).Value);
#line default #line default
#line hidden #line hidden
#line 36 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 38 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
} }
@@ -175,15 +182,15 @@ WriteLiteral(" <div");
WriteLiteral(" id=\"Config_ReportPrefs_Preview\""); WriteLiteral(" id=\"Config_ReportPrefs_Preview\"");
WriteAttribute("class", Tuple.Create(" class=\"", 1694), Tuple.Create("\"", 1740) WriteAttribute("class", Tuple.Create(" class=\"", 1754), Tuple.Create("\"", 1800)
, Tuple.Create(Tuple.Create("", 1702), Tuple.Create("theme-", 1702), true) , Tuple.Create(Tuple.Create("", 1762), Tuple.Create("theme-", 1762), true)
#line 38 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 40 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
, Tuple.Create(Tuple.Create("", 1708), Tuple.Create<System.Object, System.Int32>(Model.DefaultNoticeboardTheme , Tuple.Create(Tuple.Create("", 1768), Tuple.Create<System.Object, System.Int32>(Model.DefaultNoticeboardTheme
#line default #line default
#line hidden #line hidden
, 1708), false) , 1768), false)
); );
WriteLiteral(">\r\n <div"); WriteLiteral(">\r\n <div");
@@ -274,13 +281,13 @@ WriteLiteral(" id=\"Config_ReportPrefs_Builder_NTHDU\"");
WriteLiteral(" name=\"Report\""); WriteLiteral(" name=\"Report\"");
WriteLiteral(" class=\"themeable\""); WriteLiteral(" class=\"themeable componentable\"");
WriteLiteral(" data-url=\""); WriteLiteral(" data-url=\"");
#line 64 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 66 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(Url.ActionAbsolute(MVC.Public.UserHeldDevices.Noticeboard())); Write(Url.ActionAbsolute(MVC.Public.UserHeldDevices.Noticeboard()));
#line default #line default
@@ -306,7 +313,7 @@ WriteLiteral(" name=\"Report\"");
WriteLiteral(" data-url=\""); WriteLiteral(" data-url=\"");
#line 67 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 69 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(Url.ActionAbsolute(MVC.Public.UserHeldDevices.Index())); Write(Url.ActionAbsolute(MVC.Public.UserHeldDevices.Index()));
@@ -328,13 +335,13 @@ WriteLiteral(" id=\"Config_ReportPrefs_Builder_NTHD\"");
WriteLiteral(" name=\"Report\""); WriteLiteral(" name=\"Report\"");
WriteLiteral(" class=\"themeable\""); WriteLiteral(" class=\"themeable componentable\"");
WriteLiteral(" data-url=\""); WriteLiteral(" data-url=\"");
#line 70 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 72 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(Url.ActionAbsolute(MVC.Public.HeldDevices.Noticeboard())); Write(Url.ActionAbsolute(MVC.Public.HeldDevices.Noticeboard()));
#line default #line default
@@ -358,7 +365,7 @@ WriteLiteral(" name=\"Report\"");
WriteLiteral(" data-url=\""); WriteLiteral(" data-url=\"");
#line 73 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 75 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(Url.ActionAbsolute(MVC.Public.HeldDevices.Index())); Write(Url.ActionAbsolute(MVC.Public.HeldDevices.Index()));
@@ -374,6 +381,35 @@ WriteLiteral(">Technician Held Devices (Report)</label>\r\n
"\n </ul>\r\n </div>\r\n " + "\n </ul>\r\n </div>\r\n " +
" <div"); " <div");
WriteLiteral(" class=\"components\"");
WriteLiteral(">\r\n <h3>Show Components</h3>\r\n " +
" <div");
WriteLiteral(" id=\"Config_ReportPrefs_Builder_Components\"");
WriteLiteral(">\r\n <label><input");
WriteLiteral(" type=\"checkbox\"");
WriteLiteral(" value=\"inProcess\"");
WriteLiteral(" checked /> In Process</label>\r\n <label><input");
WriteLiteral(" type=\"checkbox\"");
WriteLiteral(" value=\"readyForReturn\"");
WriteLiteral(" checked /> Ready For Return</label>\r\n <label><inp" +
"ut");
WriteLiteral(" type=\"checkbox\"");
WriteLiteral(" value=\"waitingForUserAction\"");
WriteLiteral(" checked /> Waiting For User Action</label>\r\n </div>\r\n" +
" </div>\r\n <div");
WriteLiteral(" class=\"theme\""); WriteLiteral(" class=\"theme\"");
WriteLiteral(">\r\n <h3>Noticeboard Theme</h3>\r\n"); WriteLiteral(">\r\n <h3>Noticeboard Theme</h3>\r\n");
@@ -381,7 +417,7 @@ WriteLiteral(">\r\n <h3>Noticeboard Theme</h3>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 79 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 89 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(Html.DropDownList("Config_ReportPrefs_Builder_Theme", new SelectListItem[] { new SelectListItem() { Value = "", Text = "<Default>", Selected = true } }.Concat(Model.DefaultNoticeboardThemeOptions().Select(o => new SelectListItem() { Value = o.Key, Text = o.Value })))); Write(Html.DropDownList("Config_ReportPrefs_Builder_Theme", new SelectListItem[] { new SelectListItem() { Value = "", Text = "<Default>", Selected = true } }.Concat(Model.DefaultNoticeboardThemeOptions().Select(o => new SelectListItem() { Value = o.Key, Text = o.Value }))));
@@ -459,13 +495,13 @@ WriteLiteral(" class=\"none\"");
WriteLiteral(">\r\n"); WriteLiteral(">\r\n");
#line 95 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 105 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
#line default #line default
#line hidden #line hidden
#line 95 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 105 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
foreach (var deviceProfile in Model.DeviceProfiles.Value) foreach (var deviceProfile in Model.DeviceProfiles.Value)
{ {
@@ -475,55 +511,55 @@ WriteLiteral(">\r\n");
WriteLiteral(" <li>\r\n " + WriteLiteral(" <li>\r\n " +
" <input"); " <input");
WriteAttribute("id", Tuple.Create(" id=\"", 6584), Tuple.Create("\"", 6638) WriteAttribute("id", Tuple.Create(" id=\"", 7290), Tuple.Create("\"", 7344)
, Tuple.Create(Tuple.Create("", 6589), Tuple.Create("Config_ReportPrefs_Builder_DP_", 6589), true) , Tuple.Create(Tuple.Create("", 7295), Tuple.Create("Config_ReportPrefs_Builder_DP_", 7295), true)
#line 98 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 108 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
, Tuple.Create(Tuple.Create("", 6619), Tuple.Create<System.Object, System.Int32>(deviceProfile.Id , Tuple.Create(Tuple.Create("", 7325), Tuple.Create<System.Object, System.Int32>(deviceProfile.Id
#line default #line default
#line hidden #line hidden
, 6619), false) , 7325), false)
); );
WriteLiteral(" type=\"checkbox\""); WriteLiteral(" type=\"checkbox\"");
WriteAttribute("value", Tuple.Create(" value=\"", 6655), Tuple.Create("\"", 6680) WriteAttribute("value", Tuple.Create(" value=\"", 7361), Tuple.Create("\"", 7386)
#line 98 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 108 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
, Tuple.Create(Tuple.Create("", 6663), Tuple.Create<System.Object, System.Int32>(deviceProfile.Id , Tuple.Create(Tuple.Create("", 7369), Tuple.Create<System.Object, System.Int32>(deviceProfile.Id
#line default #line default
#line hidden #line hidden
, 6663), false) , 7369), false)
); );
WriteLiteral(" /><label"); WriteLiteral(" /><label");
WriteAttribute("for", Tuple.Create(" for=\"", 6690), Tuple.Create("\"", 6745) WriteAttribute("for", Tuple.Create(" for=\"", 7396), Tuple.Create("\"", 7451)
, Tuple.Create(Tuple.Create("", 6696), Tuple.Create("Config_ReportPrefs_Builder_DP_", 6696), true) , Tuple.Create(Tuple.Create("", 7402), Tuple.Create("Config_ReportPrefs_Builder_DP_", 7402), true)
#line 98 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 108 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
, Tuple.Create(Tuple.Create("", 6726), Tuple.Create<System.Object, System.Int32>(deviceProfile.Id , Tuple.Create(Tuple.Create("", 7432), Tuple.Create<System.Object, System.Int32>(deviceProfile.Id
#line default #line default
#line hidden #line hidden
, 6726), false) , 7432), false)
); );
WriteLiteral(">"); WriteLiteral(">");
#line 98 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 108 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(deviceProfile.Description); Write(deviceProfile.Description);
#line default #line default
#line hidden #line hidden
WriteLiteral("</label></li>\r\n"); WriteLiteral("</label>\r\n </li>\r\n");
#line 99 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 110 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
} }
@@ -541,13 +577,13 @@ WriteLiteral(" class=\"none\"");
WriteLiteral(">\r\n"); WriteLiteral(">\r\n");
#line 104 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 115 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
#line default #line default
#line hidden #line hidden
#line 104 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 115 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
foreach (var address in Model.OrganisationAddresses.Value) foreach (var address in Model.OrganisationAddresses.Value)
{ {
@@ -557,46 +593,46 @@ WriteLiteral(">\r\n");
WriteLiteral(" <li>\r\n " + WriteLiteral(" <li>\r\n " +
" <input"); " <input");
WriteAttribute("id", Tuple.Create(" id=\"", 7299), Tuple.Create("\"", 7347) WriteAttribute("id", Tuple.Create(" id=\"", 8051), Tuple.Create("\"", 8099)
, Tuple.Create(Tuple.Create("", 7304), Tuple.Create("Config_ReportPrefs_Builder_OA_", 7304), true) , Tuple.Create(Tuple.Create("", 8056), Tuple.Create("Config_ReportPrefs_Builder_OA_", 8056), true)
#line 107 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 118 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
, Tuple.Create(Tuple.Create("", 7334), Tuple.Create<System.Object, System.Int32>(address.Id , Tuple.Create(Tuple.Create("", 8086), Tuple.Create<System.Object, System.Int32>(address.Id
#line default #line default
#line hidden #line hidden
, 7334), false) , 8086), false)
); );
WriteLiteral(" type=\"checkbox\""); WriteLiteral(" type=\"checkbox\"");
WriteAttribute("value", Tuple.Create(" value=\"", 7364), Tuple.Create("\"", 7390) WriteAttribute("value", Tuple.Create(" value=\"", 8116), Tuple.Create("\"", 8142)
#line 107 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 118 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
, Tuple.Create(Tuple.Create("", 7372), Tuple.Create<System.Object, System.Int32>(address.ShortName , Tuple.Create(Tuple.Create("", 8124), Tuple.Create<System.Object, System.Int32>(address.ShortName
#line default #line default
#line hidden #line hidden
, 7372), false) , 8124), false)
); );
WriteLiteral(" /><label"); WriteLiteral(" /><label");
WriteAttribute("for", Tuple.Create(" for=\"", 7400), Tuple.Create("\"", 7449) WriteAttribute("for", Tuple.Create(" for=\"", 8152), Tuple.Create("\"", 8201)
, Tuple.Create(Tuple.Create("", 7406), Tuple.Create("Config_ReportPrefs_Builder_OA_", 7406), true) , Tuple.Create(Tuple.Create("", 8158), Tuple.Create("Config_ReportPrefs_Builder_OA_", 8158), true)
#line 107 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 118 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
, Tuple.Create(Tuple.Create("", 7436), Tuple.Create<System.Object, System.Int32>(address.Id , Tuple.Create(Tuple.Create("", 8188), Tuple.Create<System.Object, System.Int32>(address.Id
#line default #line default
#line hidden #line hidden
, 7436), false) , 8188), false)
); );
WriteLiteral(">"); WriteLiteral(">");
#line 107 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 118 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(address.Name); Write(address.Name);
@@ -605,16 +641,16 @@ WriteLiteral(">");
WriteLiteral(" ("); WriteLiteral(" (");
#line 107 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 118 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
Write(address.ShortName); Write(address.ShortName);
#line default #line default
#line hidden #line hidden
WriteLiteral(")</label></li>\r\n"); WriteLiteral(")</label>\r\n </li>\r\n");
#line 108 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml" #line 120 "..\..\Areas\Config\Views\JobPreferences\Parts\Reports.cshtml"
} }
@@ -650,76 +686,94 @@ WriteLiteral("></i>\r\n </div>\r\n </div>\r\n
";\r\n\r\n function updateUrl() {\r\n " + ";\r\n\r\n function updateUrl() {\r\n " +
" var theme = null;\r\n var filter = null;\r\n " + " var theme = null;\r\n var filter = null;\r\n " +
" var filterMethod = null;\r\n var filter" + " var filterMethod = null;\r\n var filter" +
"Value = null;\r\n\r\n var report = dialog.find(\'.report i" + "Value = null;\r\n let components = null;\r\n\r\n " +
"nput:checked\');\r\n if (report.length > 0) {\r\n " + " var report = dialog.find(\'.report input:checked\');\r\n " +
" url = report.attr(\'data-url\');\r\n\r\n " + " if (report.length > 0) {\r\n url =" +
" if (report.hasClass(\'themeable\')) {\r\n " + " report.attr(\'data-url\');\r\n\r\n if (report.hasClass" +
" theme = dialog.find(\'.theme > select\').val();\r\n " + "(\'componentable\')) {\r\n const checkedComponent" +
" }\r\n\r\n filter = dialog.find(\'.filter > select\').v" + "s = dialog.find(\'#Config_ReportPrefs_Builder_Components input:checked\');\r\n " +
"al();\r\n\r\n if (!!filter) {\r\n " + " if (checkedComponents.length > 0 && checkedCompone" +
" filterMethod = dialog.find(\'.filter .method input:checked\').val();" + "nts.length < 3) {\r\n components = checkedC" +
"\r\n\r\n filterValue = dialog\r\n " + "omponents.map(function () {\r\n return " +
" .find(\'.filter .filter-\' + filter)\r\n " + "this.value;\r\n }).get().join(\',\');\r\n " +
" .find(\'input:checked\')\r\n " + " }\r\n }\r\n\r\n " +
" .map(function (index, element) { return $(element).val(); })\r\n " + " if (report.hasClass(\'themeable\')) {\r\n " +
" .toArray().join(\',\');\r\n }" + " theme = dialog.find(\'.theme > select\').val();\r\n " +
"\r\n\r\n if (!!theme || !!filter) {\r\n " + " }\r\n\r\n filter = dialog.find(\'.filter" +
" url += \'?\';\r\n\r\n if (!!the" + " > select\').val();\r\n\r\n if (!!filter) {\r\n " +
"me)\r\n url += \'theme=\' + theme;\r\n\r\n " + " filterMethod = dialog.find(\'.filter .method input:che" +
" if (!!theme && !!filter)\r\n " + "cked\').val();\r\n\r\n filterValue = dialog\r\n " +
" url += \'&\';\r\n\r\n if (!!filter)\r" + " .find(\'.filter .filter-\' + filter)\r\n " +
"\n url += filter + filterMethod + \'=\' + fi" + " .find(\'input:checked\')\r\n " +
"lterValue;\r\n }\r\n }\r\n\r\n" + " .map(function (index, element) { return $(element).val(); })\r\n " +
" $(\'#Config_ReportPrefs_Builder_Buttonpane\').find(\'te" + " .toArray().join(\',\');\r\n " +
"xtarea\').val(url);\r\n $(\'#Config_ReportPrefs_Builder_B" + " }\r\n\r\n if (!!components || !!theme || " +
"uttonpane\').find(\'.fa-external-link\').closest(\'a\').attr(\'href\', url);\r\n " + "!!filter) {\r\n url += \'?\';\r\n\r\n " +
" }\r\n\r\n $(\'#Config_ReportPrefs_Builder_Butto" + " if (!!components)\r\n u" +
"n\').click(function () {\r\n\r\n if (!dialog) {\r\n " + "rl += \'components=\' + components;\r\n\r\n if (!!t" +
" dialog = $(\'#Config_ReportPrefs_Builder\').dialog({\r\n " + "heme) {\r\n if (!url.endsWith(\'?\'))\r\n " +
" resizable: false,\r\n " + " url += \'&\';\r\n " +
" modal: true,\r\n autoOpen: false,\r\n " + " url += \'theme=\' + theme;\r\n }\r\n\r\n " +
" width: 550,\r\n m" + " if (!!filter) {\r\n " +
"axHeight: 520,\r\n buttons: {\r\n " + " if (!url.endsWith(\'?\'))\r\n " +
" Close: function () {\r\n " + "url += \'&\';\r\n url += filter + filterMetho" +
" dialog.dialog(\'close\');\r\n }\r\n " + "d + \'=\' + filterValue;\r\n }\r\n " +
" }\r\n });\r\n\r\n " + " }\r\n }\r\n\r\n $" +
" dialog.find(\'.report\').on(\'change\', \'input\', functio" + "(\'#Config_ReportPrefs_Builder_Buttonpane\').find(\'textarea\').val(url);\r\n " +
"n () {\r\n var $this = $(this);\r\n " + " $(\'#Config_ReportPrefs_Builder_Buttonpane\').find(\'.fa-externa" +
" var $theme = dialog.find(\'.theme\');\r\n\r\n " + "l-link\').closest(\'a\').attr(\'href\', url);\r\n }\r\n\r\n " +
" if ($this.hasClass(\'themeable\'))\r\n " + " $(\'#Config_ReportPrefs_Builder_Button\').click(function () {\r\n\r\n " +
" $theme.slideDown();\r\n else\r\n " + " if (!dialog) {\r\n dialog" +
" $theme.slideUp();\r\n\r\n " + " = $(\'#Config_ReportPrefs_Builder\').dialog({\r\n " +
" updateUrl();\r\n });\r\n\r\n " + " resizable: false,\r\n modal: true,\r\n " +
" dialog.find(\'#Config_ReportPrefs_Builder_Theme\').change(updateUr" + " autoOpen: false,\r\n " +
"l);\r\n\r\n dialog.find(\'#Config_ReportPrefs_Builder_" + " width: 550,\r\n maxHeight: 520,\r\n " +
"Filter\').change(function () {\r\n var $this = $" + " buttons: {\r\n Close" +
"(this);\r\n var $filter = dialog.find(\'.options" + ": function () {\r\n dialog.dialog(\'clos" +
"\');\r\n\r\n if (!$this.val())\r\n " + "e\');\r\n }\r\n " +
" $filter.slideUp();\r\n el" + " }\r\n });\r\n\r\n d" +
"se {\r\n $filter.find(\'.filter-option\').hid" + "ialog.find(\'.report\').on(\'change\', \'input\', function () {\r\n " +
"e();\r\n $filter.show();\r\n " + " const $this = $(this);\r\n const" +
" $filter.find(\'.filter-\' + $this.val()).slideDown();\r\n " + " $components = dialog.find(\'.components\');\r\n " +
" }\r\n\r\n updateU" + "const $theme = dialog.find(\'.theme\');\r\n\r\n if " +
"rl();\r\n });\r\n\r\n di" + "($this.hasClass(\'componentable\'))\r\n $comp" +
"alog.find(\'.filter .options\').on(\'click\', \'input\', updateUrl);\r\n\r\n " + "onents.slideDown();\r\n else\r\n " +
" var $buttonpane = dialog.closest(\'.ui-dialog\').children(\'.ui-d" + " $components.slideUp();\r\n\r\n " +
"ialog-buttonpane\');\r\n $buttonpane.attr(\'id\', \'Con" + " if ($this.hasClass(\'themeable\'))\r\n $" +
"fig_ReportPrefs_Builder_Buttonpane\').append(dialog.children(\'.output\'));\r\n\r\n " + "theme.slideDown();\r\n else\r\n " +
" $buttonpane.find(\'textarea\').focus(function () {\r\n " + " $theme.slideUp();\r\n\r\n u" +
" $(this).select();\r\n " + "pdateUrl();\r\n });\r\n\r\n " +
" });\r\n\r\n\r\n var $clipboard = $buttonpane.find(" + " dialog.find(\'#Config_ReportPrefs_Builder_Components\').on(\'change\', \'input\', " +
"\'.fa-clipboard\');\r\n \r\n " + "updateUrl);\r\n\r\n dialog.find(\'#Config_ReportPrefs_" +
" if (!!window.clipboardData) {\r\n $clipboa" + "Builder_Theme\').change(updateUrl);\r\n\r\n dialog.fin" +
"rd.click(function () {\r\n window.clipboard" + "d(\'#Config_ReportPrefs_Builder_Filter\').change(function () {\r\n " +
"Data.setData(\'Text\', url);\r\n alert(\'Link " + " var $this = $(this);\r\n var " +
"copied to Clipboard\');\r\n return false;\r\n " + "$filter = dialog.find(\'.options\');\r\n\r\n if (!$" +
" });\r\n } else {" + "this.val())\r\n $filter.slideUp();\r\n " +
"\r\n $clipboard.hide();\r\n " + " else {\r\n $fi" +
" }\r\n\r\n }\r\n\r\n dial" + "lter.find(\'.filter-option\').hide();\r\n $fi" +
"og.dialog(\'open\');\r\n\r\n updateUrl();\r\n\r\n " + "lter.show();\r\n $filter.find(\'.filter-\' + " +
" return false;\r\n });\r\n\r\n " + "$this.val()).slideDown();\r\n }\r\n\r\n " +
"});\r\n </script>\r\n </td>\r\n </tr>\r\n </table>\r\n" + " updateUrl();\r\n });\r\n\r\n " +
"</div>\r\n"); " dialog.find(\'.filter .options\').on(\'click\', \'input\'" +
", updateUrl);\r\n\r\n var $buttonpane = dialog.closes" +
"t(\'.ui-dialog\').children(\'.ui-dialog-buttonpane\');\r\n " +
" $buttonpane.attr(\'id\', \'Config_ReportPrefs_Builder_Buttonpane\').append(dialo" +
"g.children(\'.output\'));\r\n\r\n $buttonpane.find(\'tex" +
"tarea\').focus(function () {\r\n $(this).select(" +
");\r\n });\r\n\r\n\r\n var" +
" $clipboard = $buttonpane.find(\'.fa-clipboard\');\r\n\r\n " +
" if (!!window.clipboardData) {\r\n $clipboar" +
"d.click(function () {\r\n window.clipboardD" +
"ata.setData(\'Text\', url);\r\n alert(\'Link c" +
"opied to Clipboard\');\r\n return false;\r\n " +
" });\r\n } else {\r" +
"\n $clipboard.hide();\r\n " +
" }\r\n\r\n }\r\n\r\n dialo" +
"g.dialog(\'open\');\r\n\r\n updateUrl();\r\n\r\n " +
" return false;\r\n });\r\n\r\n }" +
");\r\n </script>\r\n </td>\r\n </tr>\r\n </table>\r\n<" +
"/div>\r\n");
} }
} }
@@ -284,6 +284,17 @@
$.each(queryStringParameters, function (key, value) { $.each(queryStringParameters, function (key, value) {
switch (key.toLowerCase()) { switch (key.toLowerCase()) {
case 'components':
const showComponents = value.split(",");
if (showComponents.length > 0) {
const components = ['inProcess', 'readyForReturn', 'waitingForUserAction'];
components.forEach(function (component) {
if (!showComponents.includes(component)) {
$('body').addClass('hide-' + component);
}
});
}
break;
case 'theme': // THEME case 'theme': // THEME
setTheme(value); setTheme(value);
fixedTheme = value; fixedTheme = value;
@@ -344,100 +344,109 @@ WriteLiteral("\', null, function (data) {\r\n\r\n var inProce
"ryStringParameters();\r\n\r\n if (queryStringParameters !== null) {\r\n" + "ryStringParameters();\r\n\r\n if (queryStringParameters !== null) {\r\n" +
" var filters = [];\r\n\r\n $.each(queryStringP" + " var filters = [];\r\n\r\n $.each(queryStringP" +
"arameters, function (key, value) {\r\n switch (key.toLowerC" + "arameters, function (key, value) {\r\n switch (key.toLowerC" +
"ase()) {\r\n case \'theme\': // THEME\r\n " + "ase()) {\r\n case \'components\':\r\n " +
" setTheme(value);\r\n fixedTheme = val" + " const showComponents = value.split(\",\");\r\n " +
"ue;\r\n break;\r\n case \'d" + " if (showComponents.length > 0) {\r\n const " +
"eviceaddressinclude\': // FILTER: Device Address Include\r\n " + "components = [\'inProcess\', \'readyForReturn\', \'waitingForUserAction\'];\r\n " +
" var deviceAddresses = value.split(\",\").map(function (v) { return v.toLo" + " components.forEach(function (component) {\r\n " +
"werCase(); });\r\n if (deviceAddresses.length > 0) " + " if (!showComponents.includes(component)) {\r\n " +
"{\r\n filters.push(function (heldDeviceItem) {\r" + " $(\'body\').addClass(\'hide-\' + component);\r\n" +
"\n // false if DeviceAddressShortName is n" + " }\r\n }" +
"ull\r\n if (!heldDeviceItem.DeviceAddressSh" + ");\r\n }\r\n break;\r\n " +
"ortName)\r\n return false;\r\n\r\n " + " case \'theme\': // THEME\r\n " +
" // true if DeviceAddressShortName is included\r\n " + " setTheme(value);\r\n fixedTheme = value;\r\n " +
" return $.inArray(heldDeviceItem.DeviceAddr" + " break;\r\n case \'deviceaddres" +
"essShortName.toLowerCase(), deviceAddresses) >= 0;\r\n " + "sinclude\': // FILTER: Device Address Include\r\n va" +
" });\r\n }\r\n " + "r deviceAddresses = value.split(\",\").map(function (v) { return v.toLowerCase(); " +
"break;\r\n case \'deviceaddressexclude\': // FILTER: Devi" + "});\r\n if (deviceAddresses.length > 0) {\r\n " +
"ce Address Exclude\r\n var deviceAddresses = value." + " filters.push(function (heldDeviceItem) {\r\n " +
"split(\",\").map(function (v) { return v.toLowerCase(); });\r\n " + " // false if DeviceAddressShortName is null\r\n " +
" if (deviceAddresses.length > 0) {\r\n " + " if (!heldDeviceItem.DeviceAddressShortName)\r\n " +
" filters.push(function (heldDeviceItem) {\r\n " + " return false;\r\n\r\n " +
" // true if DeviceAddressShortName is null\r\n " + " // true if DeviceAddressShortName is included\r\n " +
" if (!heldDeviceItem.DeviceAddressShortName)\r\n " + " return $.inArray(heldDeviceItem.DeviceAddressShortNam" +
" return true;\r\n\r\n // true " + "e.toLowerCase(), deviceAddresses) >= 0;\r\n });" +
"if DeviceAddressShortName is excluded\r\n r" + "\r\n }\r\n break;\r\n " +
"eturn $.inArray(heldDeviceItem.DeviceAddressShortName.toLowerCase(), deviceAddre" + " case \'deviceaddressexclude\': // FILTER: Device Address " +
"sses) < 0;\r\n });\r\n " + "Exclude\r\n var deviceAddresses = value.split(\",\")." +
" }\r\n break;\r\n case" + "map(function (v) { return v.toLowerCase(); });\r\n " +
" \'deviceprofileinclude\': // FILTER: Device Profile Include\r\n " + "if (deviceAddresses.length > 0) {\r\n filters.p" +
" var deviceProfiles = value.split(\",\").map(function (v) { return pars" + "ush(function (heldDeviceItem) {\r\n // true" +
"eInt(v); });\r\n if (deviceProfiles.length > 0) {\r\n" + " if DeviceAddressShortName is null\r\n if (" +
" filters.push(function (heldDeviceItem) {\r\n " + "!heldDeviceItem.DeviceAddressShortName)\r\n " +
" // true if DeviceProfileId is included\r\n " + " return true;\r\n\r\n // true if DeviceAd" +
" return $.inArray(heldDeviceItem.DeviceProf" + "dressShortName is excluded\r\n return $.inA" +
"ileId, deviceProfiles) >= 0;\r\n });\r\n " + "rray(heldDeviceItem.DeviceAddressShortName.toLowerCase(), deviceAddresses) < 0;\r" +
" }\r\n break;\r\n " + "\n });\r\n }\r\n " +
" case \'deviceprofileexclude\': // FILTER: Device Profile Exclude\r\n " + " break;\r\n case \'devicepro" +
" var deviceProfiles = value.split(\",\").map(function" + "fileinclude\': // FILTER: Device Profile Include\r\n " +
" (v) { return parseInt(v); });\r\n if (deviceProfil" + " var deviceProfiles = value.split(\",\").map(function (v) { return parseInt(v); })" +
"es.length > 0) {\r\n filters.push(function (hel" + ";\r\n if (deviceProfiles.length > 0) {\r\n " +
"dDeviceItem) {\r\n // true if DeviceProfile" + " filters.push(function (heldDeviceItem) {\r\n " +
"Id is excluded\r\n return $.inArray(heldDev" + " // true if DeviceProfileId is included\r\n " +
"iceItem.DeviceProfileId, deviceProfiles) < 0;\r\n " + " return $.inArray(heldDeviceItem.DeviceProfileId, devi" +
" });\r\n }\r\n break" + "ceProfiles) >= 0;\r\n });\r\n " +
";\r\n }\r\n });\r\n\r\n if " + " }\r\n break;\r\n " +
"(filters.length > 0)\r\n itemFilters = filters;\r\n " + " case \'deviceprofileexclude\': // FILTER: Device Profile Exclude\r\n " +
" else\r\n itemFilters = null;\r\n }\r\n" + " var deviceProfiles = value.split(\",\").map(function (v) { retu" +
" }\r\n\r\n function connectionError() {\r\n try {" + "rn parseInt(v); });\r\n if (deviceProfiles.length >" +
"\r\n $(\'body\').addClass(\'status-error\');\r\n $" + " 0) {\r\n filters.push(function (heldDeviceItem" +
".connection.hub.stop();\r\n } catch (e) {\r\n // I" + ") {\r\n // true if DeviceProfileId is exclu" +
"gnore\r\n }\r\n\r\n window.setTimeout(function () {\r\n " + "ded\r\n return $.inArray(heldDeviceItem.Dev" +
" window.location.reload(true);\r\n }, 10000);\r\n " + "iceProfileId, deviceProfiles) < 0;\r\n });\r\n " +
" }\r\n\r\n // Helpers\r\n function rotateArray(koArray, e" + " }\r\n break;\r\n " +
"lement) {\r\n var items = koArray();\r\n\r\n if (items.l" + " }\r\n });\r\n\r\n if (filters.le" +
"ength <= 1)\r\n return 0;\r\n\r\n if (element.height" + "ngth > 0)\r\n itemFilters = filters;\r\n e" +
"() < (element.parent().height() - 30)) {\r\n\r\n if (findUnsorted" + "lse\r\n itemFilters = null;\r\n }\r\n " +
"ArrayTopIndex(items) !== 0)\r\n koArray.sort(sortFunction);" + " }\r\n\r\n function connectionError() {\r\n try {\r\n " +
"\r\n\r\n // Don\'t rotate if small & sorted correctly\r\n " + " $(\'body\').addClass(\'status-error\');\r\n $.connection" +
" return;\r\n }\r\n\r\n // Move Last Item to Top\r" + ".hub.stop();\r\n } catch (e) {\r\n // Ignore\r\n " +
"\n var item = koArray.pop();\r\n koArray.unshift(item" + " }\r\n\r\n window.setTimeout(function () {\r\n " +
");\r\n }\r\n function removeItemFromArray(koArray, deviceSeria" + " window.location.reload(true);\r\n }, 10000);\r\n }\r\n" +
"lNumber) {\r\n var items = koArray();\r\n for (var i =" + "\r\n // Helpers\r\n function rotateArray(koArray, element) {\r\n" +
" 0; i < items.length; i++) {\r\n if (items[i].DeviceSerialNumbe" + " var items = koArray();\r\n\r\n if (items.length <= 1)" +
"r == deviceSerialNumber) {\r\n koArray.splice(i, 1);\r\n " + "\r\n return 0;\r\n\r\n if (element.height() < (eleme" +
" items = koArray();\r\n i--;\r\n " + "nt.parent().height() - 30)) {\r\n\r\n if (findUnsortedArrayTopInd" +
" }\r\n }\r\n }\r\n function findUnsortedA" + "ex(items) !== 0)\r\n koArray.sort(sortFunction);\r\n\r\n " +
"rrayTopIndex(items) {\r\n // Only one Item\r\n if (ite" + " // Don\'t rotate if small & sorted correctly\r\n re" +
"ms.length <= 1)\r\n return 0;\r\n\r\n for (var i = 1" + "turn;\r\n }\r\n\r\n // Move Last Item to Top\r\n " +
"; i < items.length; i++) {\r\n var s = sortFunction(items[i - 1" + " var item = koArray.pop();\r\n koArray.unshift(item);\r\n " +
"], items[i]);\r\n if (s > 0)\r\n return i;" + " }\r\n function removeItemFromArray(koArray, deviceSerialNumber) {\r" +
"\r\n }\r\n\r\n return 0;\r\n }\r\n fun" + "\n var items = koArray();\r\n for (var i = 0; i < ite" +
"ction findSortedInsertIndex(koArray, heldDeviceItem) {\r\n var item" + "ms.length; i++) {\r\n if (items[i].DeviceSerialNumber == device" +
"s = koArray();\r\n var startIndex = findUnsortedArrayTopIndex(items" + "SerialNumber) {\r\n koArray.splice(i, 1);\r\n " +
");\r\n for (var i = startIndex; i < items.length; i++) {\r\n " + " items = koArray();\r\n i--;\r\n }\r" +
" var s = sortFunction(heldDeviceItem, items[i]);\r\n " + "\n }\r\n }\r\n function findUnsortedArrayTopInde" +
"if (s <= 0)\r\n return i;\r\n }\r\n " + "x(items) {\r\n // Only one Item\r\n if (items.length <" +
" if (startIndex !== 0) {\r\n for (var i = 0; i < startIndex; " + "= 1)\r\n return 0;\r\n\r\n for (var i = 1; i < items" +
"i++) {\r\n var s = sortFunction(heldDeviceItem, items[i]);\r" + ".length; i++) {\r\n var s = sortFunction(items[i - 1], items[i]" +
"\n if (s <= 0)\r\n return i;\r\n " + ");\r\n if (s > 0)\r\n return i;\r\n " +
" }\r\n return startIndex;\r\n } el" + " }\r\n\r\n return 0;\r\n }\r\n function findS" +
"se {\r\n return -1;\r\n }\r\n }\r\n " + "ortedInsertIndex(koArray, heldDeviceItem) {\r\n var items = koArray" +
" function sortFunction(l, r) {\r\n return l.DeviceDescription.to" + "();\r\n var startIndex = findUnsortedArrayTopIndex(items);\r\n " +
"LowerCase() == r.DeviceDescription.toLowerCase() ? 0 : (l.DeviceDescription.toLo" + " for (var i = startIndex; i < items.length; i++) {\r\n " +
"werCase() < r.DeviceDescription.toLowerCase() ? -1 : 1)\r\n }\r\n " + "var s = sortFunction(heldDeviceItem, items[i]);\r\n if (s <= 0)" +
" function isInProcess(i) {\r\n return !i.ReadyForReturn && !i.Wa" + "\r\n return i;\r\n }\r\n if (star" +
"itingForUserAction;\r\n }\r\n function isReadyForReturn(i) {\r\n" + "tIndex !== 0) {\r\n for (var i = 0; i < startIndex; i++) {\r\n " +
" return i.ReadyForReturn && !i.WaitingForUserAction;\r\n " + " var s = sortFunction(heldDeviceItem, items[i]);\r\n " +
" }\r\n function isWaitingForUserAction(i) {\r\n return i.W" + " if (s <= 0)\r\n return i;\r\n " +
"aitingForUserAction;\r\n }\r\n function getQueryStringParamete" + " }\r\n return startIndex;\r\n } else {\r\n " +
"rs() {\r\n\r\n if (window.location.search.length === 0)\r\n " + " return -1;\r\n }\r\n }\r\n functio" +
" return null;\r\n\r\n var params = {};\r\n window" + "n sortFunction(l, r) {\r\n return l.DeviceDescription.toLowerCase()" +
".location.search.substr(1).split(\"&\").forEach(function (pair) {\r\n " + " == r.DeviceDescription.toLowerCase() ? 0 : (l.DeviceDescription.toLowerCase() <" +
" if (pair === \"\") return;\r\n var parts = pair.split(\"=\");\r" + " r.DeviceDescription.toLowerCase() ? -1 : 1)\r\n }\r\n functio" +
"\n params[parts[0]] = parts[1] && decodeURIComponent(parts[1]." + "n isInProcess(i) {\r\n return !i.ReadyForReturn && !i.WaitingForUse" +
"replace(/\\+/g, \" \"));\r\n });\r\n return params;\r\n " + "rAction;\r\n }\r\n function isReadyForReturn(i) {\r\n " +
" }\r\n\r\n init();\r\n });\r\n </script>\r\n</body>\r\n</html>"); " return i.ReadyForReturn && !i.WaitingForUserAction;\r\n }\r\n " +
" function isWaitingForUserAction(i) {\r\n return i.WaitingForUs" +
"erAction;\r\n }\r\n function getQueryStringParameters() {\r\n\r\n " +
" if (window.location.search.length === 0)\r\n ret" +
"urn null;\r\n\r\n var params = {};\r\n window.location.s" +
"earch.substr(1).split(\"&\").forEach(function (pair) {\r\n if (pa" +
"ir === \"\") return;\r\n var parts = pair.split(\"=\");\r\n " +
" params[parts[0]] = parts[1] && decodeURIComponent(parts[1].replace(/\\+" +
"/g, \" \"));\r\n });\r\n return params;\r\n }\r\n" +
"\r\n init();\r\n });\r\n </script>\r\n</body>\r\n</html>");
} }
} }
@@ -284,6 +284,17 @@
$.each(queryStringParameters, function (key, value) { $.each(queryStringParameters, function (key, value) {
switch (key.toLowerCase()) { switch (key.toLowerCase()) {
case 'components':
const showComponents = value.split(",");
if (showComponents.length > 0) {
const components = ['inProcess', 'readyForReturn', 'waitingForUserAction'];
components.forEach(function (component) {
if (!showComponents.includes(component)) {
$('body').addClass('hide-' + component);
}
});
}
break;
case 'theme': // THEME case 'theme': // THEME
setTheme(value); setTheme(value);
fixedTheme = value; fixedTheme = value;
@@ -344,100 +344,109 @@ WriteLiteral("\', null, function (data) {\r\n\r\n var inProce
"= getQueryStringParameters();\r\n\r\n if (queryStringParameters !== n" + "= getQueryStringParameters();\r\n\r\n if (queryStringParameters !== n" +
"ull) {\r\n var filters = [];\r\n\r\n $.each(quer" + "ull) {\r\n var filters = [];\r\n\r\n $.each(quer" +
"yStringParameters, function (key, value) {\r\n switch (key." + "yStringParameters, function (key, value) {\r\n switch (key." +
"toLowerCase()) {\r\n case \'theme\': // THEME\r\n " + "toLowerCase()) {\r\n case \'components\':\r\n " +
" setTheme(value);\r\n fixedThe" + " const showComponents = value.split(\",\");\r\n " +
"me = value;\r\n break;\r\n " + " if (showComponents.length > 0) {\r\n " +
" case \'deviceaddressinclude\': // FILTER: Device Address Include\r\n " + " const components = [\'inProcess\', \'readyForReturn\', \'waitingForUserAction\'];\r\n " +
" var deviceAddresses = value.split(\",\").map(function (v) { retur" + " components.forEach(function (component) {\r\n " +
"n v.toLowerCase(); });\r\n if (deviceAddresses.leng" + " if (!showComponents.includes(component)) {" +
"th > 0) {\r\n filters.push(function (heldDevice" + "\r\n $(\'body\').addClass(\'hide-\' + compo" +
"Item) {\r\n // false if DeviceAddressShortN" + "nent);\r\n }\r\n " +
"ame is null\r\n if (!heldDeviceItem.DeviceA" + " });\r\n }\r\n b" +
"ddressShortName)\r\n return false;\r\n\r\n " + "reak;\r\n case \'theme\': // THEME\r\n " +
" // true if DeviceAddressShortName is incl" + " setTheme(value);\r\n fixedTheme = value;" +
"uded\r\n return $.inArray(heldDeviceItem.De" + "\r\n break;\r\n case \'devi" +
"viceAddressShortName.toLowerCase(), deviceAddresses) >= 0;\r\n " + "ceaddressinclude\': // FILTER: Device Address Include\r\n " +
" });\r\n }\r\n " + " var deviceAddresses = value.split(\",\").map(function (v) { return v.toLower" +
" break;\r\n case \'deviceaddressexclude\': // FILT" + "Case(); });\r\n if (deviceAddresses.length > 0) {\r\n" +
"ER: Device Address Exclude\r\n var deviceAddresses " + " filters.push(function (heldDeviceItem) {\r\n " +
"= value.split(\",\").map(function (v) { return v.toLowerCase(); });\r\n " + " // false if DeviceAddressShortName is null" +
" if (deviceAddresses.length > 0) {\r\n " + "\r\n if (!heldDeviceItem.DeviceAddressShort" +
" filters.push(function (heldDeviceItem) {\r\n " + "Name)\r\n return false;\r\n\r\n " +
" // true if DeviceAddressShortName is null\r\n " + " // true if DeviceAddressShortName is included\r\n " +
" if (!heldDeviceItem.DeviceAddressShortName)\r\n " + " return $.inArray(heldDeviceItem.DeviceAddress" +
" return true;\r\n\r\n " + "ShortName.toLowerCase(), deviceAddresses) >= 0;\r\n " +
"// true if DeviceAddressShortName is excluded\r\n " + " });\r\n }\r\n bre" +
" return $.inArray(heldDeviceItem.DeviceAddressShortName.toLowerCase(), dev" + "ak;\r\n case \'deviceaddressexclude\': // FILTER: Device " +
"iceAddresses) < 0;\r\n });\r\n " + "Address Exclude\r\n var deviceAddresses = value.spl" +
" }\r\n break;\r\n " + "it(\",\").map(function (v) { return v.toLowerCase(); });\r\n " +
" case \'deviceprofileinclude\': // FILTER: Device Profile Include\r\n " + " if (deviceAddresses.length > 0) {\r\n f" +
" var deviceProfiles = value.split(\",\").map(function (v) { ret" + "ilters.push(function (heldDeviceItem) {\r\n " +
"urn parseInt(v); });\r\n if (deviceProfiles.length " + " // true if DeviceAddressShortName is null\r\n " +
"> 0) {\r\n filters.push(function (heldDeviceIte" + " if (!heldDeviceItem.DeviceAddressShortName)\r\n " +
"m) {\r\n // true if DeviceProfileId is incl" + " return true;\r\n\r\n // true if " +
"uded\r\n return $.inArray(heldDeviceItem.De" + "DeviceAddressShortName is excluded\r\n retu" +
"viceProfileId, deviceProfiles) >= 0;\r\n });\r\n " + "rn $.inArray(heldDeviceItem.DeviceAddressShortName.toLowerCase(), deviceAddresse" +
" }\r\n break;\r\n " + "s) < 0;\r\n });\r\n " +
" case \'deviceprofileexclude\': // FILTER: Device Profile Exc" + " }\r\n break;\r\n case \'d" +
"lude\r\n var deviceProfiles = value.split(\",\").map(" + "eviceprofileinclude\': // FILTER: Device Profile Include\r\n " +
"function (v) { return parseInt(v); });\r\n if (devi" + " var deviceProfiles = value.split(\",\").map(function (v) { return parseIn" +
"ceProfiles.length > 0) {\r\n filters.push(funct" + "t(v); });\r\n if (deviceProfiles.length > 0) {\r\n " +
"ion (heldDeviceItem) {\r\n // true if Devic" + " filters.push(function (heldDeviceItem) {\r\n " +
"eProfileId is excluded\r\n return $.inArray" + " // true if DeviceProfileId is included\r\n " +
"(heldDeviceItem.DeviceProfileId, deviceProfiles) < 0;\r\n " + " return $.inArray(heldDeviceItem.DeviceProfile" +
" });\r\n }\r\n " + "Id, deviceProfiles) >= 0;\r\n });\r\n " +
" break;\r\n }\r\n });\r\n\r\n " + " }\r\n break;\r\n " +
" if (filters.length > 0)\r\n itemFilters = filters;\r\n " + " case \'deviceprofileexclude\': // FILTER: Device Profile Exclude\r\n " +
" else\r\n itemFilters = null;\r\n " + " var deviceProfiles = value.split(\",\").map(function (v" +
" }\r\n }\r\n\r\n function connectionError() {\r\n " + ") { return parseInt(v); });\r\n if (deviceProfiles." +
" try {\r\n $(\'body\').addClass(\'status-error\');\r\n " + "length > 0) {\r\n filters.push(function (heldDe" +
" $.connection.hub.stop();\r\n } catch (e) {\r\n " + "viceItem) {\r\n // true if DeviceProfileId " +
" // Ignore\r\n }\r\n\r\n window.setTimeout(function (" + "is excluded\r\n return $.inArray(heldDevice" +
") {\r\n window.location.reload(true);\r\n }, 10000" + "Item.DeviceProfileId, deviceProfiles) < 0;\r\n " +
");\r\n }\r\n\r\n // Helpers\r\n function rotateArray(ko" + "});\r\n }\r\n break;\r\n" +
"Array, element) {\r\n var items = koArray();\r\n\r\n if " + " }\r\n });\r\n\r\n if (fi" +
"(items.length <= 1)\r\n return 0;\r\n\r\n if (elemen" + "lters.length > 0)\r\n itemFilters = filters;\r\n " +
"t.height() < (element.parent().height() - 30)) {\r\n\r\n if (find" + " else\r\n itemFilters = null;\r\n }\r\n " +
"UnsortedArrayTopIndex(items) !== 0)\r\n koArray.sort(sortFu" + " }\r\n\r\n function connectionError() {\r\n try {\r\n " +
"nction);\r\n\r\n // Don\'t rotate if small & sorted correctly\r\n " + " $(\'body\').addClass(\'status-error\');\r\n $.co" +
" return;\r\n }\r\n\r\n // Move Last Item" + "nnection.hub.stop();\r\n } catch (e) {\r\n // Igno" +
" to Top\r\n var item = koArray.pop();\r\n koArray.unsh" + "re\r\n }\r\n\r\n window.setTimeout(function () {\r\n " +
"ift(item);\r\n }\r\n function removeItemFromArray(koArray, Use" + " window.location.reload(true);\r\n }, 10000);\r\n " +
"rId) {\r\n var items = koArray();\r\n for (var i = 0; " + " }\r\n\r\n // Helpers\r\n function rotateArray(koArray, elem" +
"i < items.length; i++) {\r\n if (items[i].UserId == UserId) {\r\n" + "ent) {\r\n var items = koArray();\r\n\r\n if (items.leng" +
" koArray.splice(i, 1);\r\n items = k" + "th <= 1)\r\n return 0;\r\n\r\n if (element.height() " +
"oArray();\r\n i--;\r\n }\r\n " + "< (element.parent().height() - 30)) {\r\n\r\n if (findUnsortedArr" +
"}\r\n }\r\n function findUnsortedArrayTopIndex(items) {\r\n " + "ayTopIndex(items) !== 0)\r\n koArray.sort(sortFunction);\r\n\r" +
" // Only one Item\r\n if (items.length <= 1)\r\n " + "\n // Don\'t rotate if small & sorted correctly\r\n " +
" return 0;\r\n\r\n for (var i = 1; i < items.length; i++) {\r\n" + " return;\r\n }\r\n\r\n // Move Last Item to Top\r\n " +
" var s = sortFunction(items[i - 1], items[i]);\r\n " + " var item = koArray.pop();\r\n koArray.unshift(item);\r" +
" if (s > 0)\r\n return i;\r\n }\r\n\r\n " + "\n }\r\n function removeItemFromArray(koArray, UserId) {\r\n " +
" return 0;\r\n }\r\n function findSortedInsertIndex(" + " var items = koArray();\r\n for (var i = 0; i < items.l" +
"koArray, heldDeviceItem) {\r\n var items = koArray();\r\n " + "ength; i++) {\r\n if (items[i].UserId == UserId) {\r\n " +
" var startIndex = findUnsortedArrayTopIndex(items);\r\n for (var" + " koArray.splice(i, 1);\r\n items = koArray();\r\n" +
" i = startIndex; i < items.length; i++) {\r\n var s = sortFunct" + " i--;\r\n }\r\n }\r\n " +
"ion(heldDeviceItem, items[i]);\r\n if (s <= 0)\r\n " + " }\r\n function findUnsortedArrayTopIndex(items) {\r\n " +
" return i;\r\n }\r\n if (startIndex !== 0) {\r\n" + "// Only one Item\r\n if (items.length <= 1)\r\n re" +
" for (var i = 0; i < startIndex; i++) {\r\n " + "turn 0;\r\n\r\n for (var i = 1; i < items.length; i++) {\r\n " +
" var s = sortFunction(heldDeviceItem, items[i]);\r\n if " + " var s = sortFunction(items[i - 1], items[i]);\r\n if (" +
"(s <= 0)\r\n return i;\r\n }\r\n " + "s > 0)\r\n return i;\r\n }\r\n\r\n " +
" return startIndex;\r\n } else {\r\n re" + "return 0;\r\n }\r\n function findSortedInsertIndex(koArray, he" +
"turn -1;\r\n }\r\n }\r\n function sortFunction(l," + "ldDeviceItem) {\r\n var items = koArray();\r\n var sta" +
" r) {\r\n return l.UserIdFriendly.toLowerCase() == r.UserIdFriendly" + "rtIndex = findUnsortedArrayTopIndex(items);\r\n for (var i = startI" +
".toLowerCase() ? 0 : (l.UserIdFriendly.toLowerCase() < r.UserIdFriendly.toLowerC" + "ndex; i < items.length; i++) {\r\n var s = sortFunction(heldDev" +
"ase() ? -1 : 1)\r\n }\r\n function isInProcess(i) {\r\n " + "iceItem, items[i]);\r\n if (s <= 0)\r\n re" +
" return !i.ReadyForReturn && !i.WaitingForUserAction;\r\n }\r\n " + "turn i;\r\n }\r\n if (startIndex !== 0) {\r\n " +
" function isReadyForReturn(i) {\r\n return i.ReadyForReturn " + " for (var i = 0; i < startIndex; i++) {\r\n var s =" +
"&& !i.WaitingForUserAction;\r\n }\r\n function isWaitingForUse" + " sortFunction(heldDeviceItem, items[i]);\r\n if (s <= 0)\r\n " +
"rAction(i) {\r\n return i.WaitingForUserAction;\r\n }\r\n " + " return i;\r\n }\r\n " +
" function getQueryStringParameters() {\r\n\r\n if (window.loc" + " return startIndex;\r\n } else {\r\n return -1;\r\n " +
"ation.search.length === 0)\r\n return null;\r\n\r\n " + " }\r\n }\r\n function sortFunction(l, r) {\r\n " +
"var params = {};\r\n window.location.search.substr(1).split(\"&\").fo" + " return l.UserIdFriendly.toLowerCase() == r.UserIdFriendly.toLowerCas" +
"rEach(function (pair) {\r\n if (pair === \"\") return;\r\n " + "e() ? 0 : (l.UserIdFriendly.toLowerCase() < r.UserIdFriendly.toLowerCase() ? -1 " +
" var parts = pair.split(\"=\");\r\n params[parts[0]] = " + ": 1)\r\n }\r\n function isInProcess(i) {\r\n retu" +
"parts[1] && decodeURIComponent(parts[1].replace(/\\+/g, \" \"));\r\n }" + "rn !i.ReadyForReturn && !i.WaitingForUserAction;\r\n }\r\n fun" +
");\r\n return params;\r\n }\r\n\r\n init();\r\n " + "ction isReadyForReturn(i) {\r\n return i.ReadyForReturn && !i.Waiti" +
" });\r\n </script>\r\n</body>\r\n</html>\r\n"); "ngForUserAction;\r\n }\r\n function isWaitingForUserAction(i) " +
"{\r\n return i.WaitingForUserAction;\r\n }\r\n fu" +
"nction getQueryStringParameters() {\r\n\r\n if (window.location.searc" +
"h.length === 0)\r\n return null;\r\n\r\n var params " +
"= {};\r\n window.location.search.substr(1).split(\"&\").forEach(funct" +
"ion (pair) {\r\n if (pair === \"\") return;\r\n " +
"var parts = pair.split(\"=\");\r\n params[parts[0]] = parts[1] &&" +
" decodeURIComponent(parts[1].replace(/\\+/g, \" \"));\r\n });\r\n " +
" return params;\r\n }\r\n\r\n init();\r\n });\r\n " +
"</script>\r\n</body>\r\n</html>\r\n");
} }
} }
+5 -4
View File
@@ -1438,15 +1438,12 @@ h1.Config_DocumentTemplates {
background-color: #f0e277; background-color: #f0e277;
color: #000000; color: #000000;
} }
#Config_ReportPrefs_Builder .report { #Config_ReportPrefs_Builder > form > div {
margin-bottom: 10px; margin-bottom: 10px;
} }
#Config_ReportPrefs_Builder .report ul { #Config_ReportPrefs_Builder .report ul {
margin-left: 10px; margin-left: 10px;
} }
#Config_ReportPrefs_Builder .theme {
margin-bottom: 10px;
}
#Config_ReportPrefs_Builder .theme > select { #Config_ReportPrefs_Builder .theme > select {
margin-left: 10px; margin-left: 10px;
} }
@@ -1468,6 +1465,10 @@ h1.Config_DocumentTemplates {
#Config_ReportPrefs_Builder .filter div.options .method label { #Config_ReportPrefs_Builder .filter div.options .method label {
margin-right: 14px; margin-right: 14px;
} }
#Config_ReportPrefs_Builder #Config_ReportPrefs_Builder_Components {
display: flex;
justify-content: space-around;
}
#Config_ReportPrefs_Builder_Buttonpane { #Config_ReportPrefs_Builder_Buttonpane {
padding-right: 0.3em; padding-right: 0.3em;
} }
+8 -3
View File
@@ -1664,17 +1664,17 @@ h1.Config_DocumentTemplates {
} }
#Config_ReportPrefs_Builder { #Config_ReportPrefs_Builder {
.report { & > form > div {
margin-bottom: 10px; margin-bottom: 10px;
}
.report {
ul { ul {
margin-left: 10px; margin-left: 10px;
} }
} }
.theme { .theme {
margin-bottom: 10px;
& > select { & > select {
margin-left: 10px; margin-left: 10px;
} }
@@ -1703,6 +1703,11 @@ h1.Config_DocumentTemplates {
} }
} }
} }
#Config_ReportPrefs_Builder_Components {
display: flex;
justify-content: space-around;
}
} }
#Config_ReportPrefs_Builder_Buttonpane { #Config_ReportPrefs_Builder_Buttonpane {
File diff suppressed because one or more lines are too long
@@ -2714,16 +2714,15 @@ h4 {
div#page { div#page {
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
display: flex;
flex-direction: column;
width: 100%;
height: 100%; height: 100%;
} }
header, header,
#header { #header {
position: relative;
color: #fff; color: #fff;
background-color: #333; background-color: #333;
margin: 0;
padding: 0;
height: 34px;
} }
header #heading, header #heading,
#header #heading { #header #heading {
@@ -2758,29 +2757,30 @@ header #credits i,
display: none; display: none;
} }
#mainSection { #mainSection {
display: block; flex-grow: 1;
position: relative; display: flex;
height: calc(100% - 34px); flex-direction: row;
padding: 6px 6px 0 6px;
gap: 6px;
} }
#mainSection .list { #mainSection .list {
height: calc(100% - 25px); flex-grow: 1;
float: left; display: flex;
margin: 15px 0 0 6px; flex-direction: column;
} }
#mainSection .list h3 { #mainSection .list h3 {
font-family: "Segoe UI", Arial, Verdana, Tahoma, sans-serif; font-family: "Segoe UI", Arial, Verdana, Tahoma, sans-serif;
font-weight: lighter; font-weight: lighter;
font-stretch: condensed; font-stretch: condensed;
text-transform: uppercase; text-transform: uppercase;
margin-left: 10px; margin-left: 6px;
margin-bottom: 10px; margin-bottom: 4px;
font-size: 1.4em; font-size: 1.4em;
height: 30px;
color: #fff; color: #fff;
} }
#mainSection .list div.content { #mainSection .list div.content {
height: calc(100% - 30px);
overflow: hidden; overflow: hidden;
flex-grow: 1;
} }
#mainSection .list div.content div.noContent { #mainSection .list div.content div.noContent {
font-family: "Segoe UI", Arial, Verdana, Tahoma, sans-serif; font-family: "Segoe UI", Arial, Verdana, Tahoma, sans-serif;
@@ -2823,15 +2823,6 @@ header #credits i,
visibility: hidden; visibility: hidden;
font-size: 0; font-size: 0;
} }
#mainSection #inProcess {
width: calc(28% - 8px);
}
#mainSection #readyForReturn {
width: calc(36% - 8px);
}
#mainSection #waitingForUserAction {
width: calc(36% - 8px);
}
footer, footer,
#footer { #footer {
position: absolute; position: absolute;
@@ -2866,6 +2857,15 @@ body.status-error #statusError span {
body.status-error #mainSection { body.status-error #mainSection {
opacity: 0.3; opacity: 0.3;
} }
body.hide-inProcess #inProcess {
display: none !important;
}
body.hide-readyForReturn #readyForReturn {
display: none !important;
}
body.hide-waitingForUserAction #waitingForUserAction {
display: none !important;
}
/* Themes */ /* Themes */
body.theme-default { body.theme-default {
background: linear-gradient(to bottom, #165180, #1e6dab) left top repeat-x #1e6dab; background: linear-gradient(to bottom, #165180, #1e6dab) left top repeat-x #1e6dab;
@@ -24,16 +24,15 @@ h1, h2, h3, h4 {
div#page { div#page {
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
display: flex;
flex-direction: column;
width: 100%;
height: 100%; height: 100%;
} }
header, #header { header, #header {
position: relative;
color: @white; color: @white;
background-color: @HeaderBackgroundColour; background-color: @HeaderBackgroundColour;
margin: 0;
padding: 0;
height: 34px;
#heading { #heading {
margin-left: 4px; margin-left: 4px;
@@ -69,30 +68,31 @@ header, #header {
} }
#mainSection { #mainSection {
display: block; flex-grow: 1;
position: relative; display: flex;
height: calc(~"100% - 34px"); flex-direction: row;
padding: 6px 6px 0 6px;
gap: 6px;
.list { .list {
height: calc(~"100% - 25px"); flex-grow: 1;
float: left; display: flex;
margin: 15px 0 0 6px; flex-direction: column;
h3 { h3 {
font-family: @FontFamilyHeading; font-family: @FontFamilyHeading;
font-weight: @FontWeightHeading; font-weight: @FontWeightHeading;
font-stretch: @FontStretchHeading; font-stretch: @FontStretchHeading;
text-transform: uppercase; text-transform: uppercase;
margin-left: 10px; margin-left: 6px;
margin-bottom: 10px; margin-bottom: 4px;
font-size: 1.4em; font-size: 1.4em;
height: 30px;
color: @white; color: @white;
} }
div.content { div.content {
height: calc(~"100% - 30px");
overflow: hidden; overflow: hidden;
flex-grow: 1;
div.noContent { div.noContent {
font-family: @FontFamilyHeading; font-family: @FontFamilyHeading;
@@ -141,18 +141,6 @@ header, #header {
} }
} }
} }
#inProcess {
width: calc(~"28% - 8px");
}
#readyForReturn {
width: calc(~"36% - 8px");
}
#waitingForUserAction {
width: calc(~"36% - 8px");
}
} }
footer, #footer { footer, #footer {
@@ -163,39 +151,60 @@ footer, #footer {
display: block; display: block;
} }
body.status-connecting { body {
#statusConnecting {
display: inline-block;
color: @StatusAlert;
margin-left: 14px;
line-height: 34px;
span { &.status-connecting {
padding-left: 4px; #statusConnecting {
font-size: .8em; display: inline-block;
color: @StatusAlert;
margin-left: 14px;
line-height: 34px;
span {
padding-left: 4px;
font-size: .8em;
}
}
#mainSection {
display: none;
} }
} }
#mainSection { &.status-error {
display: none; #statusError {
} display: inline-block;
} color: @StatusAlert;
margin-left: 14px;
line-height: 34px;
body.status-error { span {
#statusError { padding-left: 4px;
display: inline-block; font-size: .8em;
color: @StatusAlert; }
margin-left: 14px; }
line-height: 34px;
span { #mainSection {
padding-left: 4px; opacity: 0.3;
font-size: .8em;
} }
} }
#mainSection { &.hide-inProcess {
opacity: 0.3; #inProcess {
display: none !important;
}
}
&.hide-readyForReturn {
#readyForReturn {
display: none !important;
}
}
&.hide-waitingForUserAction {
#waitingForUserAction {
display: none !important;
}
} }
} }
File diff suppressed because one or more lines are too long