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