diff --git a/Disco.Web/Areas/API/Controllers/DeviceFlagController.cs b/Disco.Web/Areas/API/Controllers/DeviceFlagController.cs index 090ec0aa..49ca7e7f 100644 --- a/Disco.Web/Areas/API/Controllers/DeviceFlagController.cs +++ b/Disco.Web/Areas/API/Controllers/DeviceFlagController.cs @@ -397,6 +397,7 @@ namespace Disco.Web.Areas.API.Controllers return RedirectToAction(MVC.Config.Logging.TaskStatus(taskStatus.SessionId)); } [DiscoAuthorizeAll(Claims.Config.DeviceFlag.Configure, Claims.Device.Actions.AddFlags, Claims.Device.Actions.RemoveFlags, Claims.Device.ShowFlagAssignments)] + [HttpPost, ValidateAntiForgeryToken] public virtual ActionResult AssignedDevices(int id) { if (id < 0) diff --git a/Disco.Web/Areas/API/Controllers/ExpressionsController.cs b/Disco.Web/Areas/API/Controllers/ExpressionsController.cs index 0cb3cb15..b1865901 100644 --- a/Disco.Web/Areas/API/Controllers/ExpressionsController.cs +++ b/Disco.Web/Areas/API/Controllers/ExpressionsController.cs @@ -9,14 +9,16 @@ namespace Disco.Web.Areas.API.Controllers { public partial class ExpressionsController : AuthorizedDatabaseController { - [HttpPost, DiscoAuthorize(Claims.DiscoAdminAccount)] + [DiscoAuthorize(Claims.DiscoAdminAccount)] + [HttpPost, ValidateAntiForgeryToken] public virtual ActionResult ValidateExpression(string Expression) { var part = new EvaluateExpressionPart(Expression); return Json(Models.Expressions.ValidateExpressionModel.FromEvaluateExpressionPart(part)); } - [HttpPost, DiscoAuthorize(Claims.Config.Show), ValidateAntiForgeryToken] + [DiscoAuthorize(Claims.Config.Show)] + [HttpPost, ValidateAntiForgeryToken] public virtual ActionResult TypeDescriptor(string type, bool staticMembersOnly = false) { if (string.IsNullOrWhiteSpace(type)) diff --git a/Disco.Web/Areas/API/Controllers/SystemController.cs b/Disco.Web/Areas/API/Controllers/SystemController.cs index 8f9592b2..332d0cbe 100644 --- a/Disco.Web/Areas/API/Controllers/SystemController.cs +++ b/Disco.Web/Areas/API/Controllers/SystemController.cs @@ -308,6 +308,7 @@ namespace Disco.Web.Areas.API.Controllers } [DiscoAuthorizeAny(Claims.Config.System.ConfigureActiveDirectory, Claims.Config.DeviceProfile.Configure)] + [HttpPost, ValidateAntiForgeryToken] public virtual ActionResult DomainOrganisationalUnits() { var domainOUs = ActiveDirectory.RetrieveADOrganisationalUnitStructure() diff --git a/Disco.Web/Areas/API/Controllers/UserFlagController.cs b/Disco.Web/Areas/API/Controllers/UserFlagController.cs index 3b70088b..1b7ec5ca 100644 --- a/Disco.Web/Areas/API/Controllers/UserFlagController.cs +++ b/Disco.Web/Areas/API/Controllers/UserFlagController.cs @@ -402,6 +402,7 @@ namespace Disco.Web.Areas.API.Controllers return RedirectToAction(MVC.Config.Logging.TaskStatus(taskStatus.SessionId)); } [DiscoAuthorizeAll(Claims.Config.UserFlag.Configure, Claims.User.Actions.AddFlags, Claims.User.Actions.RemoveFlags, Claims.User.ShowFlagAssignments)] + [HttpPost, ValidateAntiForgeryToken] public virtual ActionResult AssignedUsers(int id) { if (id < 0) diff --git a/Disco.Web/Areas/Config/Views/DeviceFlag/Show.cshtml b/Disco.Web/Areas/Config/Views/DeviceFlag/Show.cshtml index 7f20a509..d82d9d12 100644 --- a/Disco.Web/Areas/Config/Views/DeviceFlag/Show.cshtml +++ b/Disco.Web/Areas/Config/Views/DeviceFlag/Show.cshtml @@ -771,7 +771,7 @@ -
+
Enter multiple Device Serial Numbers separated by <new line>, commas (,) or semicolons (;). @@ -846,18 +846,24 @@ $form.attr('action', $form.attr('data-overrideaction')); assignDialog.addClass('loading'); - $.getJSON('@Url.Action(MVC.API.DeviceFlag.AssignedDevices(Model.DeviceFlag.Id))', function (response, result) { + const body = new FormData(); + body.append('__RequestVerificationToken', document.body.dataset.antiforgery); + fetch(assignDialog.attr('data-assignedurl'), { + method: 'POST', + body: body + }).then(r => { assignDialog.removeClass('loading'); - - if (result != 'success') { - alert('Unable to load current assignments:\n' + response); + if (!r.ok) { + alert('Unable to load current assignments:\n' + r.statusText); assignDialog.dialog('close'); } else { - if (!!response) { - assignDeviceSerialNumbers.val(response.join('\n')); - } else { - assignDeviceSerialNumbers.val(''); - } + r.json().then(j => { + if (!j) { + assignDeviceSerialNumbers.val(''); + } else { + assignDeviceSerialNumbers.val(j.join('\n')); + } + }) } }); } diff --git a/Disco.Web/Areas/Config/Views/DeviceFlag/Show.generated.cs b/Disco.Web/Areas/Config/Views/DeviceFlag/Show.generated.cs index c22c1ba0..b0b3e335 100644 --- a/Disco.Web/Areas/Config/Views/DeviceFlag/Show.generated.cs +++ b/Disco.Web/Areas/Config/Views/DeviceFlag/Show.generated.cs @@ -2357,6 +2357,17 @@ WriteLiteral(" class=\"dialog\""); WriteLiteral(" title=\"Bulk Assign Devices\""); +WriteLiteral(" data-assignedurl=\""); + + + #line 774 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + Write(Url.Action(MVC.API.DeviceFlag.AssignedDevices(Model.DeviceFlag.Id))); + + + #line default + #line hidden +WriteLiteral("\""); + WriteLiteral(">\r\n \r\n $(function () {\r\n "ers.closest(\'form\');\r\n if (mode == \"Override\") {\r\n " + " $form.attr(\'action\', $form.attr(\'data-overrideaction\'));\r\n\r" + "\n assignDialog.addClass(\'loading\');\r\n " + -" $.getJSON(\'"); +" const body = new FormData();\r\n body.appen" + +"d(\'__RequestVerificationToken\', document.body.dataset.antiforgery);\r\n " + +" fetch(assignDialog.attr(\'data-assignedurl\'), {\r\n " + +" method: \'POST\',\r\n body: body\r\n " + +" }).then(r => {\r\n assign" + +"Dialog.removeClass(\'loading\');\r\n if (!r.ok) {\r\n " + +" alert(\'Unable to load current assignments:\\n\' " + +"+ r.statusText);\r\n assignDialog.dialog(\'close" + +"\');\r\n } else {\r\n " + +" r.json().then(j => {\r\n if (!j) {\r\n " + +" assignDeviceSerialNumbers.val(\'\');\r\n " + +" } else {\r\n " + +" assignDeviceSerialNumbers.val(j.join(\'\\n\'));\r\n " + +" }\r\n })\r\n " + +" }\r\n });\r\n }\r\n " + +" else // Assume Add\r\n {\r\n " + +" $form.attr(\'action\', $form.attr(\'data-addaction\'));\r\n " + +" }\r\n\r\n assignDialog.dialog(\'open\');\r\n " + +" }\r\n\r\n $(\'#Config_DeviceFlags_BulkAssign_Button\').cli" + +"ck(function () {\r\n showModeDialog();\r\n " + +" return false;\r\n });\r\n });\r\n \r\n"); - #line 849 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" - Write(Url.Action(MVC.API.DeviceFlag.AssignedDevices(Model.DeviceFlag.Id))); - - - #line default - #line hidden -WriteLiteral(@"', function (response, result) { - assignDialog.removeClass('loading'); - - if (result != 'success') { - alert('Unable to load current assignments:\n' + response); - assignDialog.dialog('close'); - } else { - if (!!response) { - assignDeviceSerialNumbers.val(response.join('\n')); - } else { - assignDeviceSerialNumbers.val(''); - } - } - }); - } - else // Assume Add - { - $form.attr('action', $form.attr('data-addaction')); - } - - assignDialog.dialog('open'); - } - - $('#Config_DeviceFlags_BulkAssign_Button').click(function () { - showModeDialog(); - return false; - }); - }); - -"); - - - #line 878 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 884 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } @@ -2517,7 +2511,7 @@ WriteLiteral(@"', function (response, result) { WriteLiteral(" "); - #line 879 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 885 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" if (canDelete) { @@ -2545,13 +2539,13 @@ WriteLiteral(" title=\"Delete this Device Flag?\""); WriteLiteral(">\r\n"); - #line 883 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 889 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 883 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 889 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" using (Html.BeginForm(MVC.API.DeviceFlag.Delete(Model.DeviceFlag.Id, true))) { @@ -2559,14 +2553,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 885 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 891 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 885 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 891 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } @@ -2581,13 +2575,13 @@ WriteLiteral(">\r\n This item will be permanently deleted "covered.
\r\n
\r\n"); - #line 891 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 897 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" #line default #line hidden - #line 891 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 897 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" if (Model.CurrentAssignmentCount > 0) { @@ -2597,7 +2591,7 @@ WriteLiteral(">\r\n This item will be permanently deleted WriteLiteral(" "); - #line 893 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 899 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Model.CurrentAssignmentCount); @@ -2606,7 +2600,7 @@ WriteLiteral(" "); WriteLiteral(" device"); - #line 893 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 899 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Model.CurrentAssignmentCount != 1 ? "s are" : " is"); @@ -2619,7 +2613,7 @@ WriteLiteral("
\r\n"); WriteLiteral("
\r\n"); - #line 896 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 902 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } @@ -2660,7 +2654,7 @@ WriteLiteral(@"> "); - #line 926 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 932 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } @@ -2669,7 +2663,7 @@ WriteLiteral(@"> WriteLiteral(" "); - #line 927 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 933 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" if (canShowDevices) { @@ -2677,14 +2671,14 @@ WriteLiteral(" "); #line default #line hidden - #line 929 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 935 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" Write(Html.ActionLinkButton(string.Format("Show {0} device{1}", Model.CurrentAssignmentCount, (Model.CurrentAssignmentCount == 1 ? null : "s")), MVC.Search.Query(Model.DeviceFlag.Id.ToString(), "DeviceFlag"), "Config_DeviceFlags_Actions_ShowDevices_Button")); #line default #line hidden - #line 929 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 935 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } @@ -2694,7 +2688,7 @@ WriteLiteral(" "); WriteLiteral("
\r\n"); - #line 932 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" + #line 938 "..\..\Areas\Config\Views\DeviceFlag\Show.cshtml" } diff --git a/Disco.Web/Areas/Config/Views/DeviceProfile/Show.cshtml b/Disco.Web/Areas/Config/Views/DeviceProfile/Show.cshtml index 597b67f7..fc270384 100644 --- a/Disco.Web/Areas/Config/Views/DeviceProfile/Show.cshtml +++ b/Disco.Web/Areas/Config/Views/DeviceProfile/Show.cshtml @@ -561,8 +561,8 @@ @Model.FriendlyOrganisationalUnitName
- Change@AjaxHelpers.AjaxLoader() -
+ @AjaxHelpers.AjaxLoader() +
@AjaxHelpers.AjaxLoader() Loading Organisational Units
@@ -580,9 +580,9 @@ \r\n"); - #line 633 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" - Write(Url.Action(MVC.API.System.DomainOrganisationalUnits())); - - - #line default - #line hidden -WriteLiteral("\', null, function (data) {\r\n $loading.hide" + -"();\r\n\r\n // Make \'Domains\' unselectable\r\n " + -" $.each(data, function (i, node) {\r\n " + -" node.unselectable = true;\r\n " + -" });\r\n\r\n ouTree =" + -" $ouTree.fancytree({\r\n source: data,\r" + -"\n checkbox: false,\r\n " + -" selectMode: 1,\r\n " + -" keyboard: false,\r\n fx: null\r\n " + -" }).fancytree(\'getTree\');\r\n\r\n " + -" ouTree.$container.css(\'position\', \'relative\');\r\n\r\n " + -" // Set Buttons\r\n " + -" $dialog.dialog(\'option\', \'buttons\', {\r\n " + -" \'Use Default Computers Container\': function () {\r\n " + -" var $this = $(this);\r\n " + -" $this.css(\'overflow\', \'hidden\');\r\n " + -" $this.dialog(\"disable\");\r\n " + -" $this.dialog(\"option\", \"buttons\", null);\r\n " + -" ouSet(\'\');\r\n " + -" },\r\n \'Save\': function () {\r\n " + -" var node = ouTree.getActiveNode();\r" + -"\n if (node && node.key.substr(0, " + -"3).toLowerCase() == \'ou=\') {\r\n " + -" var $this = $(this);\r\n $thi" + -"s.css(\'overflow\', \'hidden\');\r\n " + -" $this.dialog(\"disable\");\r\n " + -"$this.dialog(\"option\", \"buttons\", null);\r\n " + -" ouSet(node.key);\r\n " + -"} else {\r\n alert(\'Select an O" + -"rganisational Unit to Save\')\r\n }\r" + -"\n }\r\n " + -" });\r\n\r\n // Expand\r\n " + -" expandAndFocusNode(ouValue);\r\n\r\n " + -" ouTree.options.fx = { height: \"toggle\", duration: 200 };\r\n " + -" });\r\n }\r\n " + -" $dialog.dialog(\'open\');\r\n\r\n " + -" $enforceCheckbox.prop(\'checked\', $(\'#DeviceProfile_EnforceOrganisationalUnit\'" + -").prop(\'checked\'));\r\n\r\n if (ouTree) {\r\n " + -" // Expand\r\n expandA" + -"ndFocusNode(ouValue);\r\n }\r\n\r\n " + -" return false;\r\n };\r\n\r\n " + -" $(\'#changeOrganisationalUnit\').click(ouChange);\r\n " + -" });\r\n \r\n"); - - - #line 695 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 694 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } else { @@ -1998,7 +2001,7 @@ WriteLiteral(">\r\n \r\n"); WriteLiteral(" "); - #line 700 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 699 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Model.FriendlyOrganisationalUnitName); @@ -2007,7 +2010,7 @@ WriteLiteral(" "); WriteLiteral("\r\n \r\n
\r\n"); - #line 703 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 702 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2016,7 +2019,7 @@ WriteLiteral("\r\n \r\n
\ WriteLiteral(" "); - #line 704 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 703 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (!Model.OrganisationalUnitExists) { @@ -2039,7 +2042,7 @@ WriteLiteral(">The Organisational Unit could not be found.\r\n "
\r\n"); - #line 711 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 710 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2052,13 +2055,13 @@ WriteLiteral(" style=\"margin-top: 8px;\""); WriteLiteral(">\r\n"); - #line 713 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 712 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 713 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 712 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canConfig) { @@ -2074,7 +2077,7 @@ WriteLiteral(" type=\"checkbox\""); WriteLiteral(" "); - #line 715 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 714 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Model.DeviceProfile.EnforceOrganisationalUnit ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty)); @@ -2094,7 +2097,7 @@ WriteLiteral(@"> '"); - #line 721 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 720 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Url.Action(MVC.API.DeviceProfile.UpdateEnforceOrganisationalUnit(Model.DeviceProfile.Id))); @@ -2105,7 +2108,7 @@ WriteLiteral("\',\r\n \'EnforceOrganisational " \r\n"); - #line 726 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 725 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } else { @@ -2122,7 +2125,7 @@ WriteLiteral(" type=\"checkbox\""); WriteLiteral(" "); - #line 729 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 728 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Model.DeviceProfile.EnforceOrganisationalUnit ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty)); @@ -2131,7 +2134,7 @@ WriteLiteral(" "); WriteLiteral(" disabled=\"disabled\" />\r\n"); - #line 730 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 729 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2147,7 +2150,7 @@ WriteLiteral(">\r\n Enforce Organisational Unit\r\n WriteLiteral(" "); - #line 734 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 733 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -2178,13 +2181,13 @@ WriteLiteral(@">When an Active Directory account is provisioned it will be p "); - #line 748 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 747 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 748 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 747 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canConfig && (Model.CertificateProviders.Count > 0 || Model.CertificateAuthorityProviders.Count > 0)) { @@ -2194,20 +2197,20 @@ WriteLiteral(@">When an Active Directory account is provisioned it will be p WriteLiteral("
\r\n"); - #line 751 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 750 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 751 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 750 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(AjaxHelpers.AjaxLoader("DeviceProfile_CertificateProviders")); #line default #line hidden - #line 751 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 750 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2217,7 +2220,7 @@ WriteLiteral("
\r\n"); WriteLiteral(" "); - #line 753 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 752 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canConfig && Model.CertificateProviders.Count > 0) { @@ -2242,7 +2245,7 @@ WriteLiteral(@"> fetch('"); - #line 766 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 765 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Url.Action(MVC.API.DeviceProfile.UpdateCertificateProviders(Model.DeviceProfile.Id))); @@ -2268,7 +2271,7 @@ WriteLiteral(@"', { "); - #line 783 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 782 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2277,7 +2280,7 @@ WriteLiteral(@"', { WriteLiteral(" "); - #line 784 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 783 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canConfig && Model.CertificateProviders.Count > 0) { @@ -2302,7 +2305,7 @@ WriteLiteral(@"> fetch('"); - #line 797 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 796 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Url.Action(MVC.API.DeviceProfile.UpdateCertificateAuthorityProviders(Model.DeviceProfile.Id))); @@ -2328,7 +2331,7 @@ WriteLiteral(@"', { "); - #line 814 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 813 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2338,13 +2341,13 @@ WriteLiteral(" \r\n \r\n

Devic "tes

\r\n"); - #line 818 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 817 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 818 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 817 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canConfig && Model.CertificateProviders.Count > 0) { @@ -2352,14 +2355,14 @@ WriteLiteral(" \r\n \r\n

Devic #line default #line hidden - #line 820 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 819 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(CommonHelpers.CheckBoxList("DeviceProfile_CertificateProviders", "DeviceProfile_CertificateProviders", Model.CertificateProviders.ToSelectListItems(Model.DeviceProfile.GetCertificateProviders()))); #line default #line hidden - #line 820 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 819 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } else @@ -2379,7 +2382,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral("><None Allocated>\r\n"); - #line 829 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 828 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } else { @@ -2390,13 +2393,13 @@ WriteLiteral("><None Allocated>\r\n"); WriteLiteral("
    \r\n"); - #line 833 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 832 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 833 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 832 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" foreach (var certificateProvider in certificateProviders) { @@ -2406,7 +2409,7 @@ WriteLiteral("
      \r\n"); WriteLiteral("
    • "); - #line 835 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 834 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(certificateProvider.Name); @@ -2415,7 +2418,7 @@ WriteLiteral("
    • "); WriteLiteral("
    • \r\n"); - #line 836 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 835 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2424,7 +2427,7 @@ WriteLiteral("\r\n"); WriteLiteral("
    \r\n"); - #line 838 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 837 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } } @@ -2438,13 +2441,13 @@ WriteLiteral(" style=\"margin-top: 4px;\""); WriteLiteral(">Authority Certificates

\r\n"); - #line 841 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 840 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 841 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 840 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canConfig && Model.CertificateAuthorityProviders.Count > 0) { @@ -2452,14 +2455,14 @@ WriteLiteral(">Authority Certificates\r\n"); #line default #line hidden - #line 843 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 842 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(CommonHelpers.CheckBoxList("DeviceProfile_CertificateAuthorityProviders", "DeviceProfile_CertificateAuthorityProviders", Model.CertificateAuthorityProviders.ToSelectListItems(Model.DeviceProfile.GetCertificateAuthorityProviders()))); #line default #line hidden - #line 843 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 842 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } else @@ -2479,7 +2482,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral("><None Allocated>\r\n"); - #line 852 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 851 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } else { @@ -2490,13 +2493,13 @@ WriteLiteral("><None Allocated>\r\n"); WriteLiteral("
    \r\n"); - #line 856 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 855 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 856 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 855 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" foreach (var certificateProvider in certificateProviders) { @@ -2506,7 +2509,7 @@ WriteLiteral("
      \r\n"); WriteLiteral("
    • "); - #line 858 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 857 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(certificateProvider.Name); @@ -2515,7 +2518,7 @@ WriteLiteral("
    • "); WriteLiteral("
    • \r\n"); - #line 859 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 858 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2524,7 +2527,7 @@ WriteLiteral("\r\n"); WriteLiteral("
    \r\n"); - #line 861 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 860 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } } @@ -2534,7 +2537,7 @@ WriteLiteral("
\r\n"); WriteLiteral(" "); - #line 863 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 862 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canViewPlugins) { @@ -2555,21 +2558,21 @@ WriteLiteral(" class=\"fa fa-info-circle\""); WriteLiteral(">View the (Url.Action(MVC.Config.Plugins.Install()) + #line 866 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" +, Tuple.Create(Tuple.Create("", 49701), Tuple.Create(Url.Action(MVC.Config.Plugins.Install()) #line default #line hidden -, 49627), false) +, 49701), false) ); WriteLiteral(">Plugin Catalogue to discover and install certificate provider plugins.\r\n " + "

\r\n
\r\n"); - #line 870 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 869 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2579,13 +2582,13 @@ WriteLiteral(" \r\n \r\n \r\n " Provision Wireless Profiles:\r\n"); - #line 876 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 875 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 876 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 875 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canConfig && Model.WirelessProfileProviders.Count > 0) { @@ -2595,20 +2598,20 @@ WriteLiteral(" \r\n \r\n \r\n WriteLiteral("
\r\n"); - #line 879 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 878 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 879 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 878 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(AjaxHelpers.AjaxLoader("DeviceProfile_WirelessProfileProviders")); #line default #line hidden - #line 879 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 878 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" @@ -2632,7 +2635,7 @@ WriteLiteral(@"> fetch('"); - #line 891 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 890 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Url.Action(MVC.API.DeviceProfile.UpdateWirelessProfileProviders(Model.DeviceProfile.Id))); @@ -2658,7 +2661,7 @@ WriteLiteral(@"', { "); - #line 908 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 907 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2667,13 +2670,13 @@ WriteLiteral(@"', { WriteLiteral(" \r\n \r\n"); - #line 911 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 910 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 911 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 910 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canConfig && Model.WirelessProfileProviders.Count > 0) { @@ -2681,14 +2684,14 @@ WriteLiteral(" \r\n \r\n"); #line default #line hidden - #line 913 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 912 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(CommonHelpers.CheckBoxList("DeviceProfile_WirelessProfileProviders", "DeviceProfile_WirelessProfileProviders", Model.WirelessProfileProviders.ToSelectListItems(Model.DeviceProfile.GetWirelessProfileProviders()))); #line default #line hidden - #line 913 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 912 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } else @@ -2708,7 +2711,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral("><None Allocated>\r\n"); - #line 922 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 921 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } else { @@ -2719,13 +2722,13 @@ WriteLiteral("><None Allocated>\r\n"); WriteLiteral(" \r\n"); WriteLiteral(" "); - #line 933 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 932 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canViewPlugins) { @@ -2784,21 +2787,21 @@ WriteLiteral(" class=\"fa fa-info-circle\""); WriteLiteral(">View the (Url.Action(MVC.Config.Plugins.Install()) + #line 936 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" +, Tuple.Create(Tuple.Create("", 53359), Tuple.Create(Url.Action(MVC.Config.Plugins.Install()) #line default #line hidden -, 53285), false) +, 53359), false) ); WriteLiteral(">Plugin Catalogue to discover and install wireless profile provider plugins.\r" + "\n

\r\n \r\n"); - #line 940 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 939 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2807,13 +2810,13 @@ WriteLiteral(">Plugin Catalogue to discover and install wireless profile pro WriteLiteral(" \r\n \r\n"); - #line 943 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 942 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 943 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 942 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (hideAdvanced) { @@ -2847,7 +2850,7 @@ WriteLiteral(@">Show Advanced Options "); - #line 959 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 958 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2863,7 +2866,7 @@ WriteLiteral(">\r\n \r\n Linked Groups:\r\n WriteLiteral(" "); - #line 966 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 965 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel() { CanConfigure = canConfig, @@ -2881,7 +2884,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 974 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 973 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel() { CanConfigure = canConfig, @@ -2897,13 +2900,13 @@ WriteLiteral(" "); WriteLiteral("\r\n"); - #line 982 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 981 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 982 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 981 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canConfig) { @@ -2911,14 +2914,14 @@ WriteLiteral("\r\n"); #line default #line hidden - #line 984 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 983 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupShared)); #line default #line hidden - #line 984 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 983 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2928,7 +2931,7 @@ WriteLiteral("\r\n"); WriteLiteral(" \r\n \r\n \r\n \r\n\r\n"); - #line 991 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 990 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.Partial(MVC.Config.Shared.Views._DeviceGroupDocumentBulkGenerate, Model)); @@ -2941,13 +2944,13 @@ WriteLiteral(" class=\"actionBar\""); WriteLiteral(">\r\n"); - #line 993 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 992 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 993 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 992 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (Model.CanDecommission) { @@ -2973,13 +2976,13 @@ WriteLiteral(" title=\"Profile Device Decommission\""); WriteLiteral(">\r\n"); - #line 997 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 996 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 997 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 996 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" using (Html.BeginForm(MVC.API.Device.DeviceProfileDecommission(Model.DeviceProfile.Id))) { @@ -2987,14 +2990,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 999 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 998 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 999 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 998 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" @@ -3019,13 +3022,13 @@ WriteLiteral(" class=\"none\""); WriteLiteral(">\r\n"); - #line 1005 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1004 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 1005 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1004 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" foreach (DecommissionReasons decommissionReason in Enum.GetValues(typeof(DecommissionReasons)).Cast().OrderBy(r => r.ToString())) { @@ -3036,33 +3039,33 @@ WriteLiteral("
  • \r\n WriteLiteral(" type=\"radio\""); -WriteAttribute("id", Tuple.Create(" id=\"", 56980), Tuple.Create("\"", 57052) -, Tuple.Create(Tuple.Create("", 56985), Tuple.Create("DeviceProfile_Decommission_Dialog_Reason_", 56985), true) +WriteAttribute("id", Tuple.Create(" id=\"", 57054), Tuple.Create("\"", 57126) +, Tuple.Create(Tuple.Create("", 57059), Tuple.Create("DeviceProfile_Decommission_Dialog_Reason_", 57059), true) - #line 1008 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" - , Tuple.Create(Tuple.Create("", 57026), Tuple.Create((int)decommissionReason + #line 1007 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + , Tuple.Create(Tuple.Create("", 57100), Tuple.Create((int)decommissionReason #line default #line hidden -, 57026), false) +, 57100), false) ); WriteLiteral("\r\n name=\"decommissionReason\""); -WriteAttribute("value", Tuple.Create(" value=\"", 57119), Tuple.Create("\"", 57153) +WriteAttribute("value", Tuple.Create(" value=\"", 57193), Tuple.Create("\"", 57227) - #line 1009 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" -, Tuple.Create(Tuple.Create("", 57127), Tuple.Create((int)decommissionReason + #line 1008 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" +, Tuple.Create(Tuple.Create("", 57201), Tuple.Create((int)decommissionReason #line default #line hidden -, 57127), false) +, 57201), false) ); WriteLiteral(" "); - #line 1009 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1008 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write((decommissionReason == DecommissionReasons.EndOfLife) ? "checked=\"checked\"" : string.Empty); @@ -3070,21 +3073,21 @@ WriteLiteral(" "); #line hidden WriteLiteral(" />\r\n ((int)decommissionReason + #line 1009 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + , Tuple.Create(Tuple.Create("", 57414), Tuple.Create((int)decommissionReason #line default #line hidden -, 57340), false) +, 57414), false) ); WriteLiteral(">"); - #line 1010 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1009 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(decommissionReason.ReasonMessage()); @@ -3093,7 +3096,7 @@ WriteLiteral(">"); WriteLiteral("\r\n
  • \r\n"); - #line 1012 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1011 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -3112,7 +3115,7 @@ WriteLiteral(" />\r\n Unassign devices users\r\n "\r\n \r\n"); - #line 1020 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1019 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -3156,7 +3159,7 @@ WriteLiteral(@"> "); - #line 1051 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1050 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -3165,7 +3168,7 @@ WriteLiteral(@"> WriteLiteral(" "); - #line 1052 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1051 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canDelete) { @@ -3193,13 +3196,13 @@ WriteLiteral(" title=\"Delete this Device Profile?\""); WriteLiteral(">\r\n"); - #line 1056 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1055 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 1056 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1055 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" using (Html.BeginForm(MVC.API.DeviceProfile.Delete(Model.DeviceProfile.Id, true))) { @@ -3207,14 +3210,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 1058 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1057 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 1058 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1057 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -3262,7 +3265,7 @@ WriteLiteral(@"> "); - #line 1092 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1091 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -3271,7 +3274,7 @@ WriteLiteral(@"> WriteLiteral(" "); - #line 1093 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1092 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (Authorization.Has(Claims.Device.Actions.Export)) { @@ -3279,14 +3282,14 @@ WriteLiteral(" "); #line default #line hidden - #line 1095 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1094 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.DeviceExportTypes.Profile, Model.DeviceProfile.Id))); #line default #line hidden - #line 1095 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1094 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -3296,7 +3299,7 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 1097 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1096 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (Authorization.Has(Claims.Device.Search) && Model.DeviceCount > 0) { @@ -3304,14 +3307,14 @@ WriteLiteral(" "); #line default #line hidden - #line 1099 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1098 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.ActionLinkButton(string.Format("View {0} Device{1}", Model.DeviceCount, (Model.DeviceCount != 1 ? "s" : null)), MVC.Search.Query(Model.DeviceProfile.Id.ToString(), "DeviceProfile"))); #line default #line hidden - #line 1099 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1098 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } diff --git a/Disco.Web/Areas/Config/Views/SystemConfig/Index.cshtml b/Disco.Web/Areas/Config/Views/SystemConfig/Index.cshtml index e32bd9f2..26f1e6c8 100644 --- a/Disco.Web/Areas/Config/Views/SystemConfig/Index.cshtml +++ b/Disco.Web/Areas/Config/Views/SystemConfig/Index.cshtml @@ -545,9 +545,9 @@ {

    - Update +
    -
    +
    @AjaxHelpers.AjaxLoader() Loading Organisational Units
    @@ -589,7 +589,7 @@ } } - function update() { + async function update() { if (!$dialog) { $dialog = $('#Config_System_AD_SearchScope_Dialog').dialog({ @@ -608,51 +608,55 @@ $dialog.css('overflow', 'visible'); $tree.css('height', '100%'); - $.getJSON('@(Url.Action(MVC.API.System.DomainOrganisationalUnits()))', null, function (data) { - $loading.hide(); + const body = new FormData(); + body.append('__RequestVerificationToken', document.body.dataset.antiforgery); + const response = await fetch($dialog.attr('data-url'), { + method: 'POST', + body: body + }); + const data = await response.json(); + $loading.hide(); - tree = $tree.fancytree({ - source: data, - checkbox: true, - selectMode: 2, - keyboard: false, - fx: null - }).fancytree('getTree'); + tree = $tree.fancytree({ + source: data, + checkbox: true, + selectMode: 2, + keyboard: false, + fx: null + }).fancytree('getTree'); - tree.$container.css('position', 'relative'); + tree.$container.css('position', 'relative'); - // Set Buttons - $dialog.dialog('option', 'buttons', { - 'Search Entire Directory': function () { - var $this = $(this); - $this.css('overflow', 'hidden'); - $this.dialog("disable"); - $this.dialog("option", "buttons", null); + // Set Buttons + $dialog.dialog('option', 'buttons', { + 'Search Entire Directory': function () { + var $this = $(this); + $this.css('overflow', 'hidden'); + $this.dialog("disable"); + $this.dialog("option", "buttons", null); - var $form = $dialog.find('form'); - $form.submit(); - }, - 'Save': function () { - var $this = $(this); - $this.css('overflow', 'hidden'); - $this.dialog("disable"); - $this.dialog("option", "buttons", null); + var $form = $dialog.find('form'); + $form.submit(); + }, + 'Save': function () { + var $this = $(this); + $this.css('overflow', 'hidden'); + $this.dialog("disable"); + $this.dialog("option", "buttons", null); - var nodes = tree.getSelectedNodes(); - var $form = $dialog.find('form'); - $.each(nodes, function (i, node) { - $('').attr({ 'type': 'hidden', 'name': 'Containers', 'value': node.key }).appendTo($form); - }); - $form.submit(); - } - }); - - // Select & Expand - selectDistinguishedNames(); - - tree.options.fx = { height: "toggle", duration: 200 }; + var nodes = tree.getSelectedNodes(); + var $form = $dialog.find('form'); + $.each(nodes, function (i, node) { + $('').attr({ 'type': 'hidden', 'name': 'Containers', 'value': node.key }).appendTo($form); + }); + $form.submit(); + } }); + // Select & Expand + selectDistinguishedNames(); + + tree.options.fx = { height: "toggle", duration: 200 }; } selectDistinguishedNames(); diff --git a/Disco.Web/Areas/Config/Views/SystemConfig/Index.generated.cs b/Disco.Web/Areas/Config/Views/SystemConfig/Index.generated.cs index 4e805918..092b13fb 100644 --- a/Disco.Web/Areas/Config/Views/SystemConfig/Index.generated.cs +++ b/Disco.Web/Areas/Config/Views/SystemConfig/Index.generated.cs @@ -1963,15 +1963,15 @@ WriteLiteral(" "); #line default #line hidden WriteLiteral("
    \r\n
    \r\n " + -" Update\r\n
    \r\n"); +WriteLiteral(">Update\r\n
    \r\n"); WriteLiteral("
    \r\n"); - #line 676 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 680 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" if (canConfigProxy) { using (Html.BeginForm(MVC.API.System.UpdateProxySettings())) @@ -2138,14 +2144,14 @@ WriteLiteral(" \r\n\r\n\r\n\r\n \r\n \r\n #line default #line hidden - #line 680 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 684 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 680 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 684 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" @@ -2168,7 +2174,7 @@ WriteLiteral(">\r\n Address:\r\n WriteLiteral(" "); - #line 689 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 693 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.EditorFor(m => m.ProxyAddress)); @@ -2179,7 +2185,7 @@ WriteLiteral("
    \r\n"); WriteLiteral(" "); - #line 690 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 694 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.ValidationMessageFor(m => m.ProxyAddress)); @@ -2196,7 +2202,7 @@ WriteLiteral(">\r\n Port:\r\n \r\ WriteLiteral(" "); - #line 698 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 702 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.EditorFor(m => m.ProxyPort)); @@ -2207,7 +2213,7 @@ WriteLiteral("
    \r\n"); WriteLiteral(" "); - #line 699 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 703 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.ValidationMessageFor(m => m.ProxyPort)); @@ -2224,7 +2230,7 @@ WriteLiteral(">\r\n Username:\r\n m.ProxyUsername)); @@ -2235,7 +2241,7 @@ WriteLiteral("
    \r\n"); WriteLiteral(" "); - #line 708 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 712 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.ValidationMessageFor(m => m.ProxyUsername)); @@ -2252,7 +2258,7 @@ WriteLiteral(">\r\n Password:\r\n m.ProxyPassword)); @@ -2263,7 +2269,7 @@ WriteLiteral("
    \r\n"); WriteLiteral(" "); - #line 717 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 721 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.ValidationMessageFor(m => m.ProxyPassword)); @@ -2286,7 +2292,7 @@ WriteLiteral(" class=\"button small\""); WriteLiteral(">Save Proxy Settings"); - #line 725 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 729 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -2314,7 +2320,7 @@ WriteLiteral("\r\n -"); - - - #line 888 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 894 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } @@ -2560,7 +2554,7 @@ WriteLiteral(@"', function (response, result) { WriteLiteral(" "); - #line 889 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 895 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" if (canDelete) { @@ -2588,13 +2582,13 @@ WriteLiteral(" class=\"dialog\""); WriteLiteral(">\r\n"); - #line 893 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 899 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 893 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 899 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" using (Html.BeginForm(MVC.API.UserFlag.Delete(Model.UserFlag.Id, true))) { @@ -2602,14 +2596,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 895 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 901 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 895 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 901 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } @@ -2624,13 +2618,13 @@ WriteLiteral(">\r\n This item will be permanently deleted "covered.
    \r\n
    \r\n"); - #line 901 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 907 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" #line default #line hidden - #line 901 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 907 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" if (Model.CurrentAssignmentCount > 0) { @@ -2640,7 +2634,7 @@ WriteLiteral(">\r\n This item will be permanently deleted WriteLiteral(" "); - #line 903 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 909 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Model.CurrentAssignmentCount); @@ -2649,7 +2643,7 @@ WriteLiteral(" "); WriteLiteral(" user"); - #line 903 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 909 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Model.CurrentAssignmentCount != 1 ? "s are" : " is"); @@ -2662,7 +2656,7 @@ WriteLiteral("
    \r\n"); WriteLiteral("
    \r\n"); - #line 906 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 912 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } @@ -2703,7 +2697,7 @@ WriteLiteral(@"> "); - #line 936 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 942 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } @@ -2712,7 +2706,7 @@ WriteLiteral(@"> WriteLiteral(" "); - #line 937 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 943 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" if (canShowUsers) { @@ -2720,14 +2714,14 @@ WriteLiteral(" "); #line default #line hidden - #line 939 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 945 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" Write(Html.ActionLinkButton(string.Format("Show {0} user{1}", Model.CurrentAssignmentCount, (Model.CurrentAssignmentCount == 1 ? null : "s")), MVC.Search.Query(Model.UserFlag.Id.ToString(), "UserFlag"), "Config_UserFlags_Actions_ShowUsers_Button")); #line default #line hidden - #line 939 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 945 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } @@ -2737,7 +2731,7 @@ WriteLiteral(" "); WriteLiteral(" \r\n"); - #line 942 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" + #line 948 "..\..\Areas\Config\Views\UserFlag\Show.cshtml" } diff --git a/Disco.Web/Areas/Public/Views/HeldDevices/Noticeboard.cshtml b/Disco.Web/Areas/Public/Views/HeldDevices/Noticeboard.cshtml index 7be86fdb..a91710ff 100644 --- a/Disco.Web/Areas/Public/Views/HeldDevices/Noticeboard.cshtml +++ b/Disco.Web/Areas/Public/Views/HeldDevices/Noticeboard.cshtml @@ -14,7 +14,7 @@ Disco ICT - Held Devices @Html.BundleRenderDeferred() - +
    -

    In Process () +

    + In Process ()

    @@ -36,7 +37,8 @@
    -

    Ready for Return () +

    + Ready for Return ()

    @@ -46,7 +48,8 @@
    -

    Waiting for User Action () +

    + Waiting for User Action ()

    @@ -130,48 +133,54 @@ hub.client.updateHeldDevice = updateHeldDevice; hub.client.setTheme = setTheme; - $.connection.hub.qs = { Noticeboard: '@(Disco.Services.Jobs.Noticeboards.HeldDevices.Name)' }; + $.connection.hub.qs = { Noticeboard: document.body.dataset.hubname }; $.connection.hub.error(function (error) { console.log('Server connection error: ' + error); }); $.connection.hub.disconnected(connectionError); // Start Connection - $.connection.hub.start().fail(connectionError).done(loadData); + $.connection.hub.start().fail(connectionError).done(function () { loadData(); }); } // Called after SignalR is connected - function loadData() { - $.getJSON('@(Url.Action(MVC.Public.HeldDevices.HeldDevices()))', null, function (data) { + async function loadData() { - var inProcess = []; - var readyForReturn = []; - var waitingForUserAction = []; - - data.filter(function (heldDeviceItem) { - return includeItem(heldDeviceItem) - }).forEach(function (heldDeviceItem) { - if (isWaitingForUserAction(heldDeviceItem)) - waitingForUserAction.push(heldDeviceItem); - else if (isReadyForReturn(heldDeviceItem)) - readyForReturn.push(heldDeviceItem); - else if (isInProcess(heldDeviceItem)) - inProcess.push(heldDeviceItem); - }); - - inProcess.sort(sortFunction); - readyForReturn.sort(sortFunction); - waitingForUserAction.sort(sortFunction); - - viewModel = new noticeboardViewModel(inProcess, readyForReturn, waitingForUserAction); - - ko.applyBindings(viewModel); - viewModel.initialized = true; - - $('body').removeClass('status-connecting'); - - window.setTimeout(scheduleRotation, rotateSpeed); + const body = new FormData(); + body.append('__RequestVerificationToken', document.body.dataset.antiforgery); + const response = await fetch(document.body.dataset.dataurl, { + method: 'POST', + body: body }); + const data = await response.json(); + + var inProcess = []; + var readyForReturn = []; + var waitingForUserAction = []; + + data.filter(function (heldDeviceItem) { + return includeItem(heldDeviceItem) + }).forEach(function (heldDeviceItem) { + if (isWaitingForUserAction(heldDeviceItem)) + waitingForUserAction.push(heldDeviceItem); + else if (isReadyForReturn(heldDeviceItem)) + readyForReturn.push(heldDeviceItem); + else if (isInProcess(heldDeviceItem)) + inProcess.push(heldDeviceItem); + }); + + inProcess.sort(sortFunction); + readyForReturn.sort(sortFunction); + waitingForUserAction.sort(sortFunction); + + viewModel = new noticeboardViewModel(inProcess, readyForReturn, waitingForUserAction); + + ko.applyBindings(viewModel); + viewModel.initialized = true; + + $('body').removeClass('status-connecting'); + + window.setTimeout(scheduleRotation, rotateSpeed); } // Called by SignalR @@ -458,4 +467,4 @@ }); - \ No newline at end of file + diff --git a/Disco.Web/Areas/Public/Views/HeldDevices/Noticeboard.generated.cs b/Disco.Web/Areas/Public/Views/HeldDevices/Noticeboard.generated.cs index 65887827..433e38ae 100644 --- a/Disco.Web/Areas/Public/Views/HeldDevices/Noticeboard.generated.cs +++ b/Disco.Web/Areas/Public/Views/HeldDevices/Noticeboard.generated.cs @@ -89,6 +89,39 @@ WriteAttribute("class", Tuple.Create(" class=\"", 562), Tuple.Create("\"", 615) , Tuple.Create(Tuple.Create(" ", 597), Tuple.Create("status-connecting", 598), true) ); +WriteLiteral(" data-antiforgery=\""); + + + #line 17 "..\..\Areas\Public\Views\HeldDevices\Noticeboard.cshtml" + Write(AntiForgeryExtensions.GetToken(Context)); + + + #line default + #line hidden +WriteLiteral("\""); + +WriteLiteral(" data-hubname=\""); + + + #line 17 "..\..\Areas\Public\Views\HeldDevices\Noticeboard.cshtml" + Write(Disco.Services.Jobs.Noticeboards.HeldDevices.Name); + + + #line default + #line hidden +WriteLiteral("\""); + +WriteLiteral(" data-dataurl=\""); + + + #line 17 "..\..\Areas\Public\Views\HeldDevices\Noticeboard.cshtml" + Write(Url.Action(MVC.Public.HeldDevices.HeldDevices())); + + + #line default + #line hidden +WriteLiteral("\""); + WriteLiteral(">\r\n \r\n

    In Process (\r\n

    \r\n In Process (\r\n

    Ready for Return (\r\n

    \r\n Ready for Return (\r\n

    Waiting for User Action (\r\n

    \r\n Waiting for User Action (\r\n
  • \r\n "ueryString();\r\n\r\n // Connect to Hub\r\n hub = $.conn" + "ection.noticeboardUpdates;\r\n\r\n // Map Functions\r\n " + "hub.client.updateHeldDevice = updateHeldDevice;\r\n hub.client.setT" + -"heme = setTheme;\r\n\r\n $.connection.hub.qs = { Noticeboard: \'"); - - - #line 133 "..\..\Areas\Public\Views\HeldDevices\Noticeboard.cshtml" - Write(Disco.Services.Jobs.Noticeboards.HeldDevices.Name); - - - #line default - #line hidden -WriteLiteral(@"' }; - $.connection.hub.error(function (error) { - console.log('Server connection error: ' + error); - }); - $.connection.hub.disconnected(connectionError); - - // Start Connection - $.connection.hub.start().fail(connectionError).done(loadData); - } - - // Called after SignalR is connected - function loadData() { - $.getJSON('"); - - - #line 145 "..\..\Areas\Public\Views\HeldDevices\Noticeboard.cshtml" - Write(Url.Action(MVC.Public.HeldDevices.HeldDevices())); - - - #line default - #line hidden -WriteLiteral("\', null, function (data) {\r\n\r\n var inProcess = [];\r\n " + -" var readyForReturn = [];\r\n var waitingForUserAction" + -" = [];\r\n\r\n data.filter(function (heldDeviceItem) {\r\n " + -" return includeItem(heldDeviceItem)\r\n }).forEac" + -"h(function (heldDeviceItem) {\r\n if (isWaitingForUserActio" + -"n(heldDeviceItem))\r\n waitingForUserAction.push(heldDe" + -"viceItem);\r\n else if (isReadyForReturn(heldDeviceItem))\r\n" + -" readyForReturn.push(heldDeviceItem);\r\n " + -" else if (isInProcess(heldDeviceItem))\r\n inP" + -"rocess.push(heldDeviceItem);\r\n });\r\n\r\n inP" + -"rocess.sort(sortFunction);\r\n readyForReturn.sort(sortFunction" + -");\r\n waitingForUserAction.sort(sortFunction);\r\n\r\n " + -" viewModel = new noticeboardViewModel(inProcess, readyForReturn, waitingF" + -"orUserAction);\r\n\r\n ko.applyBindings(viewModel);\r\n " + -" viewModel.initialized = true;\r\n\r\n $(\'body\').removeCla" + -"ss(\'status-connecting\');\r\n\r\n window.setTimeout(scheduleRotati" + -"on, rotateSpeed);\r\n });\r\n }\r\n\r\n // Called b" + -"y SignalR\r\n function updateHeldDevice(updates) {\r\n if " + -"(viewModel) {\r\n\r\n $.each(updates, function (deviceSerialNumbe" + -"r, heldDeviceItem) {\r\n // Remove Existing\r\n " + -" removeItem(deviceSerialNumber);\r\n\r\n // Add Item" + -"\r\n addItem(heldDeviceItem);\r\n });\r\n " + -" }\r\n }\r\n\r\n function removeItem(deviceSerialNum" + -"ber) {\r\n removeItemFromArray(viewModel.inProcess, deviceSerialNum" + -"ber);\r\n removeItemFromArray(viewModel.readyForReturn, deviceSeria" + -"lNumber);\r\n removeItemFromArray(viewModel.waitingForUserAction, d" + -"eviceSerialNumber);\r\n }\r\n\r\n function addItem(heldDeviceIte" + -"m) {\r\n if (heldDeviceItem !== null &&\r\n heldDe" + -"viceItem !== undefined &&\r\n includeItem(heldDeviceItem)) {\r\n\r" + -"\n var array;\r\n\r\n if (isWaitingForUserActio" + -"n(heldDeviceItem))\r\n array = viewModel.waitingForUserActi" + -"on;\r\n else if (isReadyForReturn(heldDeviceItem))\r\n " + -" array = viewModel.readyForReturn;\r\n else if (isI" + -"nProcess(heldDeviceItem))\r\n array = viewModel.inProcess;\r" + -"\n\r\n if (array().length === 0) {\r\n arra" + -"y.push(heldDeviceItem);\r\n } else {\r\n v" + -"ar index = findSortedInsertIndex(array, heldDeviceItem);\r\n " + -" if (index === -1)\r\n array.push(heldDeviceItem);\r\n " + -" else\r\n array.splice(index, 0, h" + -"eldDeviceItem);\r\n }\r\n }\r\n }\r\n\r\n " + -" function rotateArrays() {\r\n rotateArray(viewModel.inProce" + -"ss, $inProcessList);\r\n rotateArray(viewModel.readyForReturn, $rea" + -"dyForReturnList);\r\n rotateArray(viewModel.waitingForUserAction, $" + -"waitingForUserActionList);\r\n }\r\n\r\n function scheduleRotati" + -"on() {\r\n rotateArrays();\r\n\r\n window.setTimeout(sch" + -"eduleRotation, rotateSpeed);\r\n }\r\n\r\n function includeItem(" + -"heldDeviceItem) {\r\n if (itemFilters == null || itemFilters.length" + -" == 0)\r\n return true;\r\n\r\n return itemFilters.r" + -"educe(function (previousValue, currentValue, index, array) {\r\n " + -" if (previousValue === false)\r\n return false;\r\n " + -" return currentValue(heldDeviceItem);\r\n }, true);\r\n " + -" }\r\n\r\n function setTheme(theme) {\r\n if (!!fixed" + -"Theme)\r\n return;\r\n\r\n var $body = $(document.bo" + -"dy);\r\n\r\n // Existing classes\r\n var c = $body.attr(" + -"\'class\').split(\' \');\r\n // Remove existing theme\r\n " + -"c = $.grep(c, function (i) { return (i.indexOf(\'theme-\') !== 0) });\r\n\r\n " + -" c.push(\'theme-\' + theme);\r\n\r\n $body.attr(\'class\', c.join(\'" + -" \'));\r\n }\r\n\r\n function monitorMouseMove() {\r\n " + -" var token = null,\r\n $body = $(document.body);\r\n\r\n " + -" $body.mousemove(function () {\r\n if (!!token)\r\n " + -" window.clearTimeout(token);\r\n else if ($body." + -"css(\'cursor\') == \'none\')\r\n $body.css(\'cursor\', \'auto\');\r\n" + -"\r\n token = window.setTimeout(function () {\r\n " + -" $body.css(\'cursor\', \'none\');\r\n token = null;\r\n " + -" }, 3500);\r\n });\r\n\r\n }\r\n\r\n f" + -"unction applyQueryString() {\r\n var queryStringParameters = getQue" + -"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 \'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 }" + +"heme = setTheme;\r\n\r\n $.connection.hub.qs = { Noticeboard: documen" + +"t.body.dataset.hubname };\r\n $.connection.hub.error(function (erro" + +"r) {\r\n console.log(\'Server connection error: \' + error);\r\n " + +" });\r\n $.connection.hub.disconnected(connectionError)" + +";\r\n\r\n // Start Connection\r\n $.connection.hub.start" + +"().fail(connectionError).done(function () { loadData(); });\r\n }\r\n\r\n " + +" // Called after SignalR is connected\r\n async function loadD" + +"ata() {\r\n\r\n const body = new FormData();\r\n body.ap" + +"pend(\'__RequestVerificationToken\', document.body.dataset.antiforgery);\r\n " + +" const response = await fetch(document.body.dataset.dataurl, {\r\n " + +" method: \'POST\',\r\n body: body\r\n });\r" + +"\n const data = await response.json();\r\n\r\n var inPr" + +"ocess = [];\r\n var readyForReturn = [];\r\n var waiti" + +"ngForUserAction = [];\r\n\r\n data.filter(function (heldDeviceItem) {" + +"\r\n return includeItem(heldDeviceItem)\r\n }).for" + +"Each(function (heldDeviceItem) {\r\n if (isWaitingForUserAction" + +"(heldDeviceItem))\r\n waitingForUserAction.push(heldDeviceI" + +"tem);\r\n else if (isReadyForReturn(heldDeviceItem))\r\n " + +" readyForReturn.push(heldDeviceItem);\r\n else if" + +" (isInProcess(heldDeviceItem))\r\n inProcess.push(heldDevic" + +"eItem);\r\n });\r\n\r\n inProcess.sort(sortFunction);\r\n " + +" readyForReturn.sort(sortFunction);\r\n waitingForUse" + +"rAction.sort(sortFunction);\r\n\r\n viewModel = new noticeboardViewMo" + +"del(inProcess, readyForReturn, waitingForUserAction);\r\n\r\n ko.appl" + +"yBindings(viewModel);\r\n viewModel.initialized = true;\r\n\r\n " + +" $(\'body\').removeClass(\'status-connecting\');\r\n\r\n window.se" + +"tTimeout(scheduleRotation, rotateSpeed);\r\n }\r\n\r\n // Called" + +" by SignalR\r\n function updateHeldDevice(updates) {\r\n i" + +"f (viewModel) {\r\n\r\n $.each(updates, function (deviceSerialNum" + +"ber, heldDeviceItem) {\r\n // Remove Existing\r\n " + +" removeItem(deviceSerialNumber);\r\n\r\n // Add It" + +"em\r\n addItem(heldDeviceItem);\r\n });\r\n " + +" }\r\n }\r\n\r\n function removeItem(deviceSerialN" + +"umber) {\r\n removeItemFromArray(viewModel.inProcess, deviceSerialN" + +"umber);\r\n removeItemFromArray(viewModel.readyForReturn, deviceSer" + +"ialNumber);\r\n removeItemFromArray(viewModel.waitingForUserAction," + +" deviceSerialNumber);\r\n }\r\n\r\n function addItem(heldDeviceI" + +"tem) {\r\n if (heldDeviceItem !== null &&\r\n held" + +"DeviceItem !== undefined &&\r\n includeItem(heldDeviceItem)) {\r" + +"\n\r\n var array;\r\n\r\n if (isWaitingForUserAct" + +"ion(heldDeviceItem))\r\n array = viewModel.waitingForUserAc" + +"tion;\r\n else if (isReadyForReturn(heldDeviceItem))\r\n " + +" array = viewModel.readyForReturn;\r\n else if (i" + +"sInProcess(heldDeviceItem))\r\n array = viewModel.inProcess" + +";\r\n\r\n if (array().length === 0) {\r\n ar" + +"ray.push(heldDeviceItem);\r\n } else {\r\n " + +" var index = findSortedInsertIndex(array, heldDeviceItem);\r\n " + +" if (index === -1)\r\n array.push(heldDeviceItem);\r\n" + +" else\r\n array.splice(index, 0," + +" heldDeviceItem);\r\n }\r\n }\r\n }\r\n\r\n " + +" function rotateArrays() {\r\n rotateArray(viewModel.inPro" + +"cess, $inProcessList);\r\n rotateArray(viewModel.readyForReturn, $r" + +"eadyForReturnList);\r\n rotateArray(viewModel.waitingForUserAction," + +" $waitingForUserActionList);\r\n }\r\n\r\n function scheduleRota" + +"tion() {\r\n rotateArrays();\r\n\r\n window.setTimeout(s" + +"cheduleRotation, rotateSpeed);\r\n }\r\n\r\n function includeIte" + +"m(heldDeviceItem) {\r\n if (itemFilters == null || itemFilters.leng" + +"th == 0)\r\n return true;\r\n\r\n return itemFilters" + +".reduce(function (previousValue, currentValue, index, array) {\r\n " + +" if (previousValue === false)\r\n return false;\r\n " + +" return currentValue(heldDeviceItem);\r\n }, true);\r\n " + +" }\r\n\r\n function setTheme(theme) {\r\n if (!!fix" + +"edTheme)\r\n return;\r\n\r\n var $body = $(document." + +"body);\r\n\r\n // Existing classes\r\n var c = $body.att" + +"r(\'class\').split(\' \');\r\n // Remove existing theme\r\n " + +" c = $.grep(c, function (i) { return (i.indexOf(\'theme-\') !== 0) });\r\n\r\n " + +" c.push(\'theme-\' + theme);\r\n\r\n $body.attr(\'class\', c.join" + +"(\' \'));\r\n }\r\n\r\n function monitorMouseMove() {\r\n " + +" var token = null,\r\n $body = $(document.body);\r\n\r\n " + +" $body.mousemove(function () {\r\n if (!!token)\r\n " + +" window.clearTimeout(token);\r\n else if ($bod" + +"y.css(\'cursor\') == \'none\')\r\n $body.css(\'cursor\', \'auto\');" + +"\r\n\r\n token = window.setTimeout(function () {\r\n " + +" $body.css(\'cursor\', \'none\');\r\n token = null;\r\n " + +" }, 3500);\r\n });\r\n\r\n }\r\n\r\n " + +" function applyQueryString() {\r\n var queryStringParameters = getQ" + +"ueryStringParameters();\r\n\r\n if (queryStringParameters !== null) {" + +"\r\n var filters = [];\r\n\r\n $.each(queryStrin" + +"gParameters, function (key, value) {\r\n switch (key.toLowe" + +"rCase()) {\r\n case \'components\':\r\n " + +" const showComponents = value.split(\",\");\r\n " + +" if (showComponents.length > 0) {\r\n cons" + +"t 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 \'deviceaddr" + +"essinclude\': // FILTER: Device Address Include\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 " + +" // 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.DeviceAddressShortN" + +"ame.toLowerCase(), deviceAddresses) >= 0;\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 } catch (e) {\r\n " + -" // Ignore\r\n }\r\n\r\n window.setTim" + -"eout(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() < (element.parent().height() - 30)) {\r\n\r\n " + -" if (findUnsortedArrayTopIndex(items) !== 0)\r\n koAr" + -"ray.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 removeItemFromArr" + -"ay(koArray, deviceSerialNumber) {\r\n var items = koArray();\r\n " + -" for (var i = 0; i < items.length; i++) {\r\n if (ite" + -"ms[i].DeviceSerialNumber == deviceSerialNumber) {\r\n koArr" + -"ay.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 return 0;\r\n\r\n " + -" for (var i = 1; i < items.length; i++) {\r\n var s = s" + -"ortFunction(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 = findUnso" + -"rtedArrayTopIndex(items);\r\n for (var i = startIndex; i < items.le" + -"ngth; 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(held" + -"DeviceItem, 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.DeviceDescription.toLowerCase() == r.DeviceDescription.toLowerCase() ? 0 : (l" + -".DeviceDescription.toLowerCase() < r.DeviceDescription.toLowerCase() ? -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.WaitingForU" + -"serAction;\r\n }\r\n function isWaitingForUserAction(i) {\r\n " + -" return i.WaitingForUserAction;\r\n }\r\n function" + -" getQueryStringParameters() {\r\n\r\n if (window.location.search.leng" + -"th === 0)\r\n return null;\r\n\r\n var params = {};\r" + -"\n window.location.search.substr(1).split(\"&\").forEach(function (p" + -"air) {\r\n if (pair === \"\") return;\r\n var pa" + -"rts = pair.split(\"=\");\r\n params[parts[0]] = parts[1] && decod" + -"eURIComponent(parts[1].replace(/\\+/g, \" \"));\r\n });\r\n " + -" return params;\r\n }\r\n\r\n init();\r\n });\r\n \r\n\r\n"); +" case \'deviceaddressexclude\': // FILTER: Device Addres" + +"s 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 // tr" + +"ue if DeviceAddressShortName is null\r\n if" + +" (!heldDeviceItem.DeviceAddressShortName)\r\n " + +" return true;\r\n\r\n // true if Device" + +"AddressShortName is excluded\r\n return $.i" + +"nArray(heldDeviceItem.DeviceAddressShortName.toLowerCase(), deviceAddresses) < 0" + +";\r\n });\r\n }\r\n " + +" break;\r\n case \'devicep" + +"rofileinclude\': // 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, de" + +"viceProfiles) >= 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) { re" + +"turn parseInt(v); });\r\n if (deviceProfiles.length" + +" > 0) {\r\n filters.push(function (heldDeviceIt" + +"em) {\r\n // true if DeviceProfileId is exc" + +"luded\r\n return $.inArray(heldDeviceItem.D" + +"eviceProfileId, 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 } catch (e) {\r" + +"\n // Ignore\r\n }\r\n\r\n window.setT" + +"imeout(function () {\r\n window.location.reload(true);\r\n " + +" }, 10000);\r\n }\r\n\r\n // Helpers\r\n functi" + +"on 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() < (element.parent().height() - 30)) {\r\n\r\n " + +" if (findUnsortedArrayTopIndex(items) !== 0)\r\n ko" + +"Array.sort(sortFunction);\r\n\r\n // Don\'t rotate if small & sort" + +"ed 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 removeItemFromA" + +"rray(koArray, deviceSerialNumber) {\r\n var items = koArray();\r\n " + +" for (var i = 0; i < items.length; i++) {\r\n if (i" + +"tems[i].DeviceSerialNumber == deviceSerialNumber) {\r\n koA" + +"rray.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 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 = findUn" + +"sortedArrayTopIndex(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 (va" + +"r i = 0; i < startIndex; i++) {\r\n var s = sortFunction(he" + +"ldDeviceItem, items[i]);\r\n if (s <= 0)\r\n " + +" return i;\r\n }\r\n return startInd" + +"ex;\r\n } else {\r\n return -1;\r\n }" + +"\r\n }\r\n function sortFunction(l, r) {\r\n retu" + +"rn l.DeviceDescription.toLowerCase() == r.DeviceDescription.toLowerCase() ? 0 : " + +"(l.DeviceDescription.toLowerCase() < r.DeviceDescription.toLowerCase() ? -1 : 1)" + +"\r\n }\r\n function isInProcess(i) {\r\n return !" + +"i.ReadyForReturn && !i.WaitingForUserAction;\r\n }\r\n functio" + +"n isReadyForReturn(i) {\r\n return i.ReadyForReturn && !i.WaitingFo" + +"rUserAction;\r\n }\r\n function isWaitingForUserAction(i) {\r\n " + +" return i.WaitingForUserAction;\r\n }\r\n functi" + +"on getQueryStringParameters() {\r\n\r\n if (window.location.search.le" + +"ngth === 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] && dec" + +"odeURIComponent(parts[1].replace(/\\+/g, \" \"));\r\n });\r\n " + +" return params;\r\n }\r\n\r\n init();\r\n });\r\n \r\n\r\n\r\n"); } } diff --git a/Disco.Web/Areas/Public/Views/UserHeldDevices/Noticeboard.cshtml b/Disco.Web/Areas/Public/Views/UserHeldDevices/Noticeboard.cshtml index 1c62f28e..f6365214 100644 --- a/Disco.Web/Areas/Public/Views/UserHeldDevices/Noticeboard.cshtml +++ b/Disco.Web/Areas/Public/Views/UserHeldDevices/Noticeboard.cshtml @@ -14,7 +14,7 @@ Disco ICT - Held Devices for Users @Html.BundleRenderDeferred() - +
    -

    In Process () +

    + In Process ()

    @@ -36,7 +37,8 @@
    -

    Ready for Return () +

    + Ready for Return ()

    @@ -46,7 +48,8 @@
    -

    Waiting for User Action () +

    + Waiting for User Action ()

    @@ -130,48 +133,54 @@ hub.client.updateHeldDeviceForUser = updateHeldDevice; hub.client.setTheme = setTheme; - $.connection.hub.qs = { Noticeboard: '@(Disco.Services.Jobs.Noticeboards.HeldDevicesForUsers.Name)' }; + $.connection.hub.qs = { Noticeboard: document.body.dataset.hubname }; $.connection.hub.error(function (error) { console.log('Server connection error: ' + error); }); $.connection.hub.disconnected(connectionError); // Start Connection - $.connection.hub.start().fail(connectionError).done(loadData); + $.connection.hub.start().fail(connectionError).done(function () { loadData(); }); } // Called after SignalR is connected - function loadData() { - $.getJSON('@(Url.Action(MVC.Public.UserHeldDevices.UserHeldDevices()))', null, function (data) { + async function loadData() { - var inProcess = []; - var readyForReturn = []; - var waitingForUserAction = []; - - data.filter(function (heldDeviceItem) { - return includeItem(heldDeviceItem) - }).forEach(function (heldDeviceItem) { - if (isWaitingForUserAction(heldDeviceItem)) - waitingForUserAction.push(heldDeviceItem); - else if (isReadyForReturn(heldDeviceItem)) - readyForReturn.push(heldDeviceItem); - else if (isInProcess(heldDeviceItem)) - inProcess.push(heldDeviceItem); - }); - - inProcess.sort(sortFunction); - readyForReturn.sort(sortFunction); - waitingForUserAction.sort(sortFunction); - - viewModel = new noticeboardViewModel(inProcess, readyForReturn, waitingForUserAction); - - ko.applyBindings(viewModel); - viewModel.initialized = true; - - $('body').removeClass('status-connecting'); - - window.setTimeout(scheduleRotation, rotateSpeed); + const body = new FormData(); + body.append('__RequestVerificationToken', document.body.dataset.antiforgery); + const response = await fetch(document.body.dataset.dataurl, { + method: 'POST', + body: body }); + const data = await response.json(); + + var inProcess = []; + var readyForReturn = []; + var waitingForUserAction = []; + + data.filter(function (heldDeviceItem) { + return includeItem(heldDeviceItem) + }).forEach(function (heldDeviceItem) { + if (isWaitingForUserAction(heldDeviceItem)) + waitingForUserAction.push(heldDeviceItem); + else if (isReadyForReturn(heldDeviceItem)) + readyForReturn.push(heldDeviceItem); + else if (isInProcess(heldDeviceItem)) + inProcess.push(heldDeviceItem); + }); + + inProcess.sort(sortFunction); + readyForReturn.sort(sortFunction); + waitingForUserAction.sort(sortFunction); + + viewModel = new noticeboardViewModel(inProcess, readyForReturn, waitingForUserAction); + + ko.applyBindings(viewModel); + viewModel.initialized = true; + + $('body').removeClass('status-connecting'); + + window.setTimeout(scheduleRotation, rotateSpeed); } // Called by SignalR diff --git a/Disco.Web/Areas/Public/Views/UserHeldDevices/Noticeboard.generated.cs b/Disco.Web/Areas/Public/Views/UserHeldDevices/Noticeboard.generated.cs index 5493757e..c5751593 100644 --- a/Disco.Web/Areas/Public/Views/UserHeldDevices/Noticeboard.generated.cs +++ b/Disco.Web/Areas/Public/Views/UserHeldDevices/Noticeboard.generated.cs @@ -89,6 +89,39 @@ WriteAttribute("class", Tuple.Create(" class=\"", 572), Tuple.Create("\"", 625) , Tuple.Create(Tuple.Create(" ", 607), Tuple.Create("status-connecting", 608), true) ); +WriteLiteral(" data-antiforgery=\""); + + + #line 17 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml" + Write(AntiForgeryExtensions.GetToken(Context)); + + + #line default + #line hidden +WriteLiteral("\""); + +WriteLiteral(" data-hubname=\""); + + + #line 17 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml" + Write(Disco.Services.Jobs.Noticeboards.HeldDevicesForUsers.Name); + + + #line default + #line hidden +WriteLiteral("\""); + +WriteLiteral(" data-dataurl=\""); + + + #line 17 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml" + Write(Url.Action(MVC.Public.UserHeldDevices.UserHeldDevices())); + + + #line default + #line hidden +WriteLiteral("\""); + WriteLiteral(">\r\n \r\n

    In Process (\r\n

    \r\n In Process (\r\n

    Ready for Return (\r\n

    \r\n Ready for Return (\r\n

    Waiting for User Action (\r\n

    \r\n Waiting for User Action (\r\n
  • \r\n " hub = $.connection.noticeboardUpdates;\r\n\r\n // Map Func" + "tions\r\n hub.client.updateHeldDeviceForUser = updateHeldDevice;\r\n " + " hub.client.setTheme = setTheme;\r\n\r\n $.connection.h" + -"ub.qs = { Noticeboard: \'"); - - - #line 133 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml" - Write(Disco.Services.Jobs.Noticeboards.HeldDevicesForUsers.Name); - - - #line default - #line hidden -WriteLiteral(@"' }; - $.connection.hub.error(function (error) { - console.log('Server connection error: ' + error); - }); - $.connection.hub.disconnected(connectionError); - - // Start Connection - $.connection.hub.start().fail(connectionError).done(loadData); - } - - // Called after SignalR is connected - function loadData() { - $.getJSON('"); - - - #line 145 "..\..\Areas\Public\Views\UserHeldDevices\Noticeboard.cshtml" - Write(Url.Action(MVC.Public.UserHeldDevices.UserHeldDevices())); - - - #line default - #line hidden -WriteLiteral("\', null, function (data) {\r\n\r\n var inProcess = [];\r\n " + -" var readyForReturn = [];\r\n var waitingForUserAction" + -" = [];\r\n\r\n data.filter(function (heldDeviceItem) {\r\n " + -" return includeItem(heldDeviceItem)\r\n }).forEac" + -"h(function (heldDeviceItem) {\r\n if (isWaitingForUserActio" + -"n(heldDeviceItem))\r\n waitingForUserAction.push(heldDe" + -"viceItem);\r\n else if (isReadyForReturn(heldDeviceItem))\r\n" + -" readyForReturn.push(heldDeviceItem);\r\n " + -" else if (isInProcess(heldDeviceItem))\r\n inP" + -"rocess.push(heldDeviceItem);\r\n });\r\n\r\n inP" + -"rocess.sort(sortFunction);\r\n readyForReturn.sort(sortFunction" + -");\r\n waitingForUserAction.sort(sortFunction);\r\n\r\n " + -" viewModel = new noticeboardViewModel(inProcess, readyForReturn, waitingF" + -"orUserAction);\r\n\r\n ko.applyBindings(viewModel);\r\n " + -" viewModel.initialized = true;\r\n\r\n $(\'body\').removeCla" + -"ss(\'status-connecting\');\r\n\r\n window.setTimeout(scheduleRotati" + -"on, rotateSpeed);\r\n });\r\n }\r\n\r\n // Called b" + -"y SignalR\r\n function updateHeldDevice(updates) {\r\n if " + -"(viewModel) {\r\n\r\n $.each(updates, function (UserId, heldDevic" + -"eItem) {\r\n // Remove Existing\r\n re" + -"moveItem(UserId);\r\n\r\n // Add Item\r\n " + -" addItem(heldDeviceItem);\r\n });\r\n }\r\n " + -" }\r\n\r\n function removeItem(UserId) {\r\n removeItemFr" + -"omArray(viewModel.inProcess, UserId);\r\n removeItemFromArray(viewM" + -"odel.readyForReturn, UserId);\r\n removeItemFromArray(viewModel.wai" + -"tingForUserAction, UserId);\r\n }\r\n\r\n function addItem(heldD" + -"eviceItem) {\r\n if (heldDeviceItem !== null &&\r\n " + -" heldDeviceItem !== undefined &&\r\n includeItem(heldDeviceIte" + -"m)) {\r\n\r\n var array;\r\n\r\n if (isWaitingForU" + -"serAction(heldDeviceItem))\r\n array = viewModel.waitingFor" + -"UserAction;\r\n else if (isReadyForReturn(heldDeviceItem))\r\n " + -" array = viewModel.readyForReturn;\r\n else" + -" if (isInProcess(heldDeviceItem))\r\n array = viewModel.inP" + -"rocess;\r\n\r\n if (array().length === 0) {\r\n " + -" array.push(heldDeviceItem);\r\n } else {\r\n " + -" var index = findSortedInsertIndex(array, heldDeviceItem);\r\n " + -" if (index === -1)\r\n array.push(heldDeviceIt" + -"em);\r\n else\r\n array.splice(ind" + -"ex, 0, heldDeviceItem);\r\n }\r\n }\r\n }" + -"\r\n\r\n function rotateArrays() {\r\n rotateArray(viewModel" + -".inProcess, $inProcessList);\r\n rotateArray(viewModel.readyForRetu" + -"rn, $readyForReturnList);\r\n rotateArray(viewModel.waitingForUserA" + -"ction, $waitingForUserActionList);\r\n }\r\n\r\n function schedu" + -"leRotation() {\r\n rotateArrays();\r\n\r\n window.setTim" + -"eout(scheduleRotation, rotateSpeed);\r\n }\r\n\r\n function incl" + -"udeItem(heldDeviceItem) {\r\n if (itemFilters == null || itemFilter" + -"s.length == 0)\r\n return true;\r\n\r\n return itemF" + -"ilters.reduce(function (previousValue, currentValue, index, array) {\r\n " + -" if (previousValue === false)\r\n return false;\r\n " + -" return currentValue(heldDeviceItem);\r\n }, true" + -");\r\n }\r\n\r\n function setTheme(theme) {\r\n if " + -"(!!fixedTheme)\r\n return;\r\n\r\n var $body = $(doc" + -"ument.body);\r\n\r\n // Existing classes\r\n var c = $bo" + -"dy.attr(\'class\').split(\' \');\r\n // Remove existing theme\r\n " + -" c = $.grep(c, function (i) { return (i.indexOf(\'theme-\') !== 0) });\r\n\r\n " + -" c.push(\'theme-\' + theme);\r\n\r\n $body.attr(\'class\', " + -"c.join(\' \'));\r\n }\r\n\r\n function monitorMouseMove() {\r\n " + -" var token = null,\r\n $body = $(document.body);\r\n\r\n " + -" $body.mousemove(function () {\r\n if (!!token)\r\n" + -" window.clearTimeout(token);\r\n else if" + -" ($body.css(\'cursor\') == \'none\')\r\n $body.css(\'cursor\', \'a" + -"uto\');\r\n\r\n token = window.setTimeout(function () {\r\n " + -" $body.css(\'cursor\', \'none\');\r\n token = nul" + -"l;\r\n }, 3500);\r\n });\r\n\r\n }\r\n\r\n " + -" function applyQueryString() {\r\n var queryStringParameters " + -"= 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 \'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 } catch " + -"(e) {\r\n // Ignore\r\n }\r\n\r\n windo" + -"w.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() < (element.parent().height() - 30)) {\r\n\r\n " + -" if (findUnsortedArrayTopIndex(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 removeIte" + -"mFromArray(koArray, UserId) {\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 = koArray();\r\n i--;\r\n " + -" }\r\n }\r\n }\r\n function findUnsortedArrayT" + -"opIndex(items) {\r\n // Only one Item\r\n if (items.le" + -"ngth <= 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], it" + -"ems[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 = k" + -"oArray();\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 } else {\r" + -"\n return -1;\r\n }\r\n }\r\n f" + -"unction sortFunction(l, r) {\r\n return l.UserIdFriendly.toLowerCas" + -"e() == r.UserIdFriendly.toLowerCase() ? 0 : (l.UserIdFriendly.toLowerCase() < r." + -"UserIdFriendly.toLowerCase() ? -1 : 1)\r\n }\r\n function isIn" + -"Process(i) {\r\n return !i.ReadyForReturn && !i.WaitingForUserActio" + -"n;\r\n }\r\n function isReadyForReturn(i) {\r\n r" + -"eturn i.ReadyForReturn && !i.WaitingForUserAction;\r\n }\r\n f" + -"unction isWaitingForUserAction(i) {\r\n return i.WaitingForUserActi" + -"on;\r\n }\r\n function getQueryStringParameters() {\r\n\r\n " + -" if (window.location.search.length === 0)\r\n return nu" + -"ll;\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 \r\n\r\n\r\n"); +"ub.qs = { Noticeboard: document.body.dataset.hubname };\r\n $.conne" + +"ction.hub.error(function (error) {\r\n console.log(\'Server conn" + +"ection error: \' + error);\r\n });\r\n $.connection.hub" + +".disconnected(connectionError);\r\n\r\n // Start Connection\r\n " + +" $.connection.hub.start().fail(connectionError).done(function () { loadDa" + +"ta(); });\r\n }\r\n\r\n // Called after SignalR is connected\r\n " + +" async function loadData() {\r\n\r\n const body = new FormDa" + +"ta();\r\n body.append(\'__RequestVerificationToken\', document.body.d" + +"ataset.antiforgery);\r\n const response = await fetch(document.body" + +".dataset.dataurl, {\r\n method: \'POST\',\r\n bo" + +"dy: body\r\n });\r\n const data = await response.json(" + +");\r\n\r\n var inProcess = [];\r\n var readyForReturn = " + +"[];\r\n var waitingForUserAction = [];\r\n\r\n data.filt" + +"er(function (heldDeviceItem) {\r\n return includeItem(heldDevic" + +"eItem)\r\n }).forEach(function (heldDeviceItem) {\r\n " + +" if (isWaitingForUserAction(heldDeviceItem))\r\n waiting" + +"ForUserAction.push(heldDeviceItem);\r\n else if (isReadyForRetu" + +"rn(heldDeviceItem))\r\n readyForReturn.push(heldDeviceItem)" + +";\r\n else if (isInProcess(heldDeviceItem))\r\n " + +" inProcess.push(heldDeviceItem);\r\n });\r\n\r\n in" + +"Process.sort(sortFunction);\r\n readyForReturn.sort(sortFunction);\r" + +"\n waitingForUserAction.sort(sortFunction);\r\n\r\n vie" + +"wModel = new noticeboardViewModel(inProcess, readyForReturn, waitingForUserActio" + +"n);\r\n\r\n ko.applyBindings(viewModel);\r\n viewModel.i" + +"nitialized = true;\r\n\r\n $(\'body\').removeClass(\'status-connecting\')" + +";\r\n\r\n window.setTimeout(scheduleRotation, rotateSpeed);\r\n " + +" }\r\n\r\n // Called by SignalR\r\n function updateHeldDevice" + +"(updates) {\r\n if (viewModel) {\r\n\r\n $.each(upda" + +"tes, function (UserId, heldDeviceItem) {\r\n // Remove Exis" + +"ting\r\n removeItem(UserId);\r\n\r\n // " + +"Add Item\r\n addItem(heldDeviceItem);\r\n " + +"});\r\n }\r\n }\r\n\r\n function removeItem(UserId)" + +" {\r\n removeItemFromArray(viewModel.inProcess, UserId);\r\n " + +" removeItemFromArray(viewModel.readyForReturn, UserId);\r\n r" + +"emoveItemFromArray(viewModel.waitingForUserAction, UserId);\r\n }\r\n\r\n " + +" function addItem(heldDeviceItem) {\r\n if (heldDeviceItem" + +" !== null &&\r\n heldDeviceItem !== undefined &&\r\n " + +" includeItem(heldDeviceItem)) {\r\n\r\n var array;\r\n\r\n " + +" if (isWaitingForUserAction(heldDeviceItem))\r\n " + +" array = viewModel.waitingForUserAction;\r\n else if (isRead" + +"yForReturn(heldDeviceItem))\r\n array = viewModel.readyForR" + +"eturn;\r\n else if (isInProcess(heldDeviceItem))\r\n " + +" array = viewModel.inProcess;\r\n\r\n if (array().lengt" + +"h === 0) {\r\n array.push(heldDeviceItem);\r\n " + +" } else {\r\n var index = findSortedInsertIndex(array, " + +"heldDeviceItem);\r\n if (index === -1)\r\n " + +" array.push(heldDeviceItem);\r\n else\r\n " + +" array.splice(index, 0, heldDeviceItem);\r\n }\r\n" + +" }\r\n }\r\n\r\n function rotateArrays() {\r\n " + +" rotateArray(viewModel.inProcess, $inProcessList);\r\n ro" + +"tateArray(viewModel.readyForReturn, $readyForReturnList);\r\n rotat" + +"eArray(viewModel.waitingForUserAction, $waitingForUserActionList);\r\n " + +"}\r\n\r\n function scheduleRotation() {\r\n rotateArrays();\r" + +"\n\r\n window.setTimeout(scheduleRotation, rotateSpeed);\r\n " + +" }\r\n\r\n function includeItem(heldDeviceItem) {\r\n if (i" + +"temFilters == null || itemFilters.length == 0)\r\n return true;" + +"\r\n\r\n return itemFilters.reduce(function (previousValue, currentVa" + +"lue, index, array) {\r\n if (previousValue === false)\r\n " + +" return false;\r\n return currentValue(heldDevic" + +"eItem);\r\n }, true);\r\n }\r\n\r\n function setThe" + +"me(theme) {\r\n if (!!fixedTheme)\r\n return;\r\n\r\n " + +" var $body = $(document.body);\r\n\r\n // Existing clas" + +"ses\r\n var c = $body.attr(\'class\').split(\' \');\r\n //" + +" Remove existing theme\r\n c = $.grep(c, function (i) { return (i.i" + +"ndexOf(\'theme-\') !== 0) });\r\n\r\n c.push(\'theme-\' + theme);\r\n\r\n " + +" $body.attr(\'class\', c.join(\' \'));\r\n }\r\n\r\n func" + +"tion monitorMouseMove() {\r\n var token = null,\r\n " + +" $body = $(document.body);\r\n\r\n $body.mousemove(function () {\r\n " + +" if (!!token)\r\n window.clearTimeout(toke" + +"n);\r\n else if ($body.css(\'cursor\') == \'none\')\r\n " + +" $body.css(\'cursor\', \'auto\');\r\n\r\n token = window.set" + +"Timeout(function () {\r\n $body.css(\'cursor\', \'none\');\r\n " + +" token = null;\r\n }, 3500);\r\n " + +" });\r\n\r\n }\r\n\r\n function applyQueryString() {\r\n " + +" var queryStringParameters = getQueryStringParameters();\r\n\r\n " + +" if (queryStringParameters !== null) {\r\n var filters = [];\r\n\r" + +"\n $.each(queryStringParameters, function (key, value) {\r\n " + +" switch (key.toLowerCase()) {\r\n ca" + +"se \'components\':\r\n const showComponents = value.s" + +"plit(\",\");\r\n if (showComponents.length > 0) {\r\n " + +" const components = [\'inProcess\', \'readyForRetu" + +"rn\', \'waitingForUserAction\'];\r\n components.fo" + +"rEach(function (component) {\r\n if (!showC" + +"omponents.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 \'deviceaddressinclude\': // FILTER: Device Address Inc" + +"lude\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 // false i" + +"f DeviceAddressShortName is null\r\n if (!h" + +"eldDeviceItem.DeviceAddressShortName)\r\n " + +" return false;\r\n\r\n // true if DeviceAdd" + +"ressShortName is included\r\n return $.inAr" + +"ray(heldDeviceItem.DeviceAddressShortName.toLowerCase(), deviceAddresses) >= 0;\r" + +"\n });\r\n }\r\n " + +" break;\r\n case \'deviceadd" + +"ressexclude\': // 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.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.DeviceAddressShortNa" + +"me.toLowerCase(), deviceAddresses) < 0;\r\n });" + +"\r\n }\r\n break;\r\n " + +" case \'deviceprofileinclude\': // FILTER: Device Profile " + +"Include\r\n var deviceProfiles = value.split(\",\").m" + +"ap(function (v) { return parseInt(v); });\r\n if (d" + +"eviceProfiles.length > 0) {\r\n filters.push(fu" + +"nction (heldDeviceItem) {\r\n // true if De" + +"viceProfileId is included\r\n return $.inAr" + +"ray(heldDeviceItem.DeviceProfileId, deviceProfiles) >= 0;\r\n " + +" });\r\n }\r\n " + +" break;\r\n case \'deviceprofileexclude\': // FILTE" + +"R: 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 (heldDeviceItem) {\r\n " + +" // true if DeviceProfileId 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 itemF" + +"ilters = filters;\r\n else\r\n itemFilters" + +" = null;\r\n }\r\n }\r\n\r\n function connectionErr" + +"or() {\r\n try {\r\n $(\'body\').addClass(\'status-er" + +"ror\');\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() < (element.par" + +"ent().height() - 30)) {\r\n\r\n if (findUnsortedArrayTopIndex(ite" + +"ms) !== 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 v" + +"ar items = koArray();\r\n for (var i = 0; i < items.length; i++) {\r" + +"\n if (items[i].UserId == UserId) {\r\n k" + +"oArray.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 It" + +"em\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 = find" + +"UnsortedArrayTopIndex(items);\r\n for (var i = startIndex; i < item" + +"s.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 startI" + +"ndex;\r\n } else {\r\n return -1;\r\n " + +" }\r\n }\r\n function sortFunction(l, r) {\r\n re" + +"turn l.UserIdFriendly.toLowerCase() == r.UserIdFriendly.toLowerCase() ? 0 : (l.U" + +"serIdFriendly.toLowerCase() < r.UserIdFriendly.toLowerCase() ? -1 : 1)\r\n " + +" }\r\n function isInProcess(i) {\r\n return !i.ReadyFor" + +"Return && !i.WaitingForUserAction;\r\n }\r\n function isReadyF" + +"orReturn(i) {\r\n return i.ReadyForReturn && !i.WaitingForUserActio" + +"n;\r\n }\r\n function isWaitingForUserAction(i) {\r\n " + +" return i.WaitingForUserAction;\r\n }\r\n function getQuer" + +"yStringParameters() {\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 = pa" + +"ir.split(\"=\");\r\n params[parts[0]] = parts[1] && decodeURIComp" + +"onent(parts[1].replace(/\\+/g, \" \"));\r\n });\r\n retur" + +"n params;\r\n }\r\n\r\n init();\r\n });\r\n \r\n\r\n\r\n"); } } diff --git a/Disco.Web/ClientSource/Scripts/Modules/Disco-ExpressionEditor/disco.expressioneditor.js b/Disco.Web/ClientSource/Scripts/Modules/Disco-ExpressionEditor/disco.expressioneditor.js index 6a23d6e7..547352b4 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/Disco-ExpressionEditor/disco.expressioneditor.js +++ b/Disco.Web/ClientSource/Scripts/Modules/Disco-ExpressionEditor/disco.expressioneditor.js @@ -95,16 +95,23 @@ DiscoExpressionEditor.prototype = { this.expressionHtml = this.parseExpression(this.expression, this.expressionException); this.hostContainer.html(this.expressionHtml); }, - validateExpression: function () { + validateExpression: async function () { var that = this; var e = that.getExpression(); - $.getJSON(that.validateUrl, { Expression: e }, function (response, result) { - that.setException(response); - that.renderExpression(); - if (that.expressionValidated) - that.expressionValidated(response.ExpressionValid, response); - }) + const body = new FormData(); + body.append('Expression', e); + body.append('__RequestVerificationToken', document.body.dataset.antiforgery); + const response = await fetch(that.validateUrl, { + method: 'POST', + body: body + }); + const result = await response.json(); + that.setException(result); + that.renderExpression(); + + if (that.expressionValidated) + that.expressionValidated(result.ExpressionValid, result); } } String.prototype.trim = function () { diff --git a/Disco.Web/Views/Job/JobParts/_Subject.cshtml b/Disco.Web/Views/Job/JobParts/_Subject.cshtml index d641a126..718d0f2c 100644 --- a/Disco.Web/Views/Job/JobParts/_Subject.cshtml +++ b/Disco.Web/Views/Job/JobParts/_Subject.cshtml @@ -26,46 +26,18 @@ @if (Authorization.Has(Claims.Job.Properties.ExpectedClosedDate)) { - @Html.TextBoxFor(m => m.Job.ExpectedClosedDate, "{0:yyyy/MM/dd hh:mm tt}", new { @class = "small discreet" }) @AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader() + @Html.TextBoxFor(m => m.Job.ExpectedClosedDate, "{0:yyyy/MM/dd HH:mm}", new { @class = "small discreet" }) @AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader() } else diff --git a/Disco.Web/Views/Job/JobParts/_Subject.generated.cs b/Disco.Web/Views/Job/JobParts/_Subject.generated.cs index c7fcc672..b16412ad 100644 --- a/Disco.Web/Views/Job/JobParts/_Subject.generated.cs +++ b/Disco.Web/Views/Job/JobParts/_Subject.generated.cs @@ -140,40 +140,40 @@ WriteLiteral(">Expected:\r\n \r\n #line hidden #line 29 "..\..\Views\Job\JobParts\_Subject.cshtml" - Write(Html.TextBoxFor(m => m.Job.ExpectedClosedDate, "{0:yyyy/MM/dd hh:mm tt}", new { @class = "small discreet" })); + Write(Html.TextBoxFor(m => m.Job.ExpectedClosedDate, "{0:yyyy/MM/dd HH:mm}", new { @class = "small discreet" })); #line default #line hidden #line 29 "..\..\Views\Job\JobParts\_Subject.cshtml" - + #line default #line hidden #line 29 "..\..\Views\Job\JobParts\_Subject.cshtml" - Write(AjaxHelpers.AjaxSave()); + Write(AjaxHelpers.AjaxSave()); #line default #line hidden #line 29 "..\..\Views\Job\JobParts\_Subject.cshtml" - + #line default #line hidden #line 29 "..\..\Views\Job\JobParts\_Subject.cshtml" - Write(AjaxHelpers.AjaxLoader()); + Write(AjaxHelpers.AjaxLoader()); #line default #line hidden #line 29 "..\..\Views\Job\JobParts\_Subject.cshtml" - + #line default @@ -183,67 +183,35 @@ WriteLiteral(" - $(function () { - var $ajaxSave = $('#Job_ExpectedClosedDate').next('.ajaxSave'); - var dateFieldChangeToken = null; - var dateFieldValue = $('#Job_ExpectedClosedDate').val(); - $('#Job_ExpectedClosedDate') - .watermark('Unknown') - .datetimepicker({ - ampm: true, - stepMinute: 1, - hour: 9, - minDate: "); + $(function () { + var dateField = $('#Job_ExpectedClosedDate'); + document.DiscoFunctions.DateChangeHelper( + dateField, + 'Unknown', + '"); - #line 41 "..\..\Views\Job\JobParts\_Subject.cshtml" - Write(Model.Job.OpenedDate.ToJavascriptDate()); + #line 36 "..\..\Views\Job\JobParts\_Subject.cshtml" + Write(Url.Action(MVC.API.Job.UpdateExpectedClosedDate(Model.Job.Id, null))); #line default #line hidden -WriteLiteral(@", - changeYear: true, - changeMonth: true, - dateFormat: 'yy/mm/dd' - }).change(function () { - var $this = $(this); - var dateText = $this.val(); - if (dateFieldValue.toLowerCase() != dateText.toLowerCase()) { - dateFieldValue = dateText; - if (dateFieldChangeToken) - window.clearTimeout(dateFieldChangeToken); - dateFieldChangeToken = window.setTimeout(function () { - $ajaxSave.hide(); - var $ajaxLoading = $ajaxSave.next('.ajaxLoading').show(); - var data = { ExpectedClosedDate: dateText }; - $.getJSON('"); +WriteLiteral("\',\r\n \'ExpectedClosedDate\',\r\n " + +" \'"); - #line 56 "..\..\Views\Job\JobParts\_Subject.cshtml" - Write(Url.Action(MVC.API.Job.UpdateExpectedClosedDate(Model.Job.Id, null))); + #line 38 "..\..\Views\Job\JobParts\_Subject.cshtml" + Write(Model.Job.OpenedDate.ToString("o")); #line default #line hidden -WriteLiteral(@"', data, function (response, result) { - if (result != 'success' || response != 'OK') { - alert('Unable to change Expected Closed Date:\n' + response); - $ajaxLoading.hide(); - } else { - $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); - } - }) - dateFieldChangeToken = null; - }, 750); - } - }); - }); - -"); +WriteLiteral("\'\r\n );\r\n " + +" });\r\n \r\n"); - #line 70 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 42 "..\..\Views\Job\JobParts\_Subject.cshtml" } else { @@ -252,14 +220,14 @@ WriteLiteral(@"', data, function (response, result) { #line default #line hidden - #line 73 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 45 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(CommonHelpers.FriendlyDate(Model.Job.ExpectedClosedDate)); #line default #line hidden - #line 73 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 45 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -269,7 +237,7 @@ WriteLiteral(@"', data, function (response, result) { WriteLiteral(" \r\n \r\n"); - #line 77 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 49 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -278,7 +246,7 @@ WriteLiteral(" \r\n WriteLiteral(" "); - #line 78 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 50 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.ClosedDate.HasValue) { @@ -294,7 +262,7 @@ WriteLiteral(" id=\"Job_Show_Job_Dates_Closed\""); WriteLiteral(">"); - #line 84 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 56 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(CommonHelpers.FriendlyDateAndTitleUser(Model.Job.ClosedDate, Model.Job.ClosedTechUser)); @@ -303,7 +271,7 @@ WriteLiteral(">"); WriteLiteral("\r\n \r\n"); - #line 86 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 58 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -317,20 +285,20 @@ WriteLiteral(" class=\"status\""); WriteLiteral(">\r\n (Model.Job.JobType.Id + #line 62 "..\..\Views\Job\JobParts\_Subject.cshtml" +, Tuple.Create(Tuple.Create("", 3300), Tuple.Create(Model.Job.JobType.Id #line default #line hidden -, 5831), false) +, 3300), false) ); WriteLiteral(">"); - #line 90 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 62 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Model.Job.JobType.Description); @@ -343,13 +311,13 @@ WriteLiteral(" class=\"none\""); WriteLiteral(">\r\n \r\n"); - #line 93 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 65 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 93 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 65 "..\..\Views\Job\JobParts\_Subject.cshtml" var jobSubTypeFirst = (int)Math.Ceiling((double)(Model.Job.JobSubTypes.Count + 1) / 2); @@ -363,13 +331,13 @@ WriteLiteral(" id=\"Job_Show_Job_SubTypes_1\""); WriteLiteral(">\r\n"); - #line 98 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 70 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 98 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 70 "..\..\Views\Job\JobParts\_Subject.cshtml" foreach (var jobSubType in Model.Job.JobSubTypes.Take(jobSubTypeFirst)) { @@ -378,20 +346,20 @@ WriteLiteral(">\r\n"); #line hidden WriteLiteral(" (jobSubType.Id + #line 72 "..\..\Views\Job\JobParts\_Subject.cshtml" +, Tuple.Create(Tuple.Create("", 3917), Tuple.Create(jobSubType.Id #line default #line hidden -, 6448), false) +, 3917), false) ); WriteLiteral(">"); - #line 100 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 72 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(jobSubType.Description); @@ -400,7 +368,7 @@ WriteLiteral(">"); WriteLiteral("
  • \r\n"); - #line 101 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 73 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -414,13 +382,13 @@ WriteLiteral(" id=\"Job_Show_Job_SubTypes_2\""); WriteLiteral(">\r\n"); - #line 106 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 78 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 106 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 78 "..\..\Views\Job\JobParts\_Subject.cshtml" foreach (var jobSubType in Model.Job.JobSubTypes.Skip(jobSubTypeFirst)) { @@ -429,20 +397,20 @@ WriteLiteral(">\r\n"); #line hidden WriteLiteral(" (jobSubType.Id + #line 80 "..\..\Views\Job\JobParts\_Subject.cshtml" +, Tuple.Create(Tuple.Create("", 4377), Tuple.Create(jobSubType.Id #line default #line hidden -, 6908), false) +, 4377), false) ); WriteLiteral(">"); - #line 108 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 80 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(jobSubType.Description); @@ -451,7 +419,7 @@ WriteLiteral(">"); WriteLiteral("

  • \r\n"); - #line 109 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 81 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -460,13 +428,13 @@ WriteLiteral("\r\n"); WriteLiteral(" \r\n"); - #line 111 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 83 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 111 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 83 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Authorization.Has(Claims.Job.Actions.UpdateSubTypes) && !Model.Job.ClosedDate.HasValue) { @@ -482,7 +450,7 @@ WriteLiteral(" id=\"Job_Show_Job_SubTypes_Update\""); WriteLiteral(">Update Sub Types\r\n"); - #line 114 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 86 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -492,13 +460,13 @@ WriteLiteral(" \r\n " \r\n"); - #line 118 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 90 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 118 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 90 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Authorization.Has(Claims.Job.Actions.UpdateSubTypes)) { @@ -518,7 +486,7 @@ WriteLiteral(">\r\n
    \r\n WriteLiteral(" "); - #line 123 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 95 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Model.Job.JobType.Description); @@ -527,13 +495,13 @@ WriteLiteral(" "); WriteLiteral("\r\n

    \r\n"); - #line 125 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 97 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 125 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 97 "..\..\Views\Job\JobParts\_Subject.cshtml" using (Html.BeginForm(MVC.API.Job.UpdateSubTypes(Model.Job.Id, redirect: true), FormMethod.Post, new { id = "formUpdateJobTypes" })) { @@ -541,28 +509,28 @@ WriteLiteral("\r\n

    \r\n"); #line default #line hidden - #line 127 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 99 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 127 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 99 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 128 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 100 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(CommonHelpers.CheckBoxList("SubTypes", Model.UpdatableJobSubTypes.ToSelectListItems(Model.Job.JobSubTypes.ToList()), 3)); #line default #line hidden - #line 128 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 100 "..\..\Views\Job\JobParts\_Subject.cshtml" @@ -591,7 +559,7 @@ WriteLiteral(">Add Components for newly added Sub Types\r\n "

    \r\n"); - #line 134 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 106 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -623,7 +591,7 @@ WriteLiteral(" \r\n"); - #line 166 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 138 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -632,13 +600,13 @@ WriteLiteral(" \r\n"); - #line 658 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 630 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -2499,13 +2467,13 @@ WriteLiteral(">\r\n $(function () {\r\n WriteLiteral("\r\n\r\n"); - #line 661 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 633 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 661 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 633 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanCloseNormally()) { @@ -2533,13 +2501,13 @@ WriteLiteral(" title=\"Close this Job?\""); WriteLiteral(">\r\n"); - #line 665 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 637 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 665 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 637 "..\..\Views\Job\JobParts\_Subject.cshtml" using (Html.BeginForm(MVC.API.Job.Close(Model.Job.Id, true))) { @@ -2547,14 +2515,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 667 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 639 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 667 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 639 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -2603,7 +2571,7 @@ WriteLiteral(@"> "); - #line 702 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 674 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -2612,7 +2580,7 @@ WriteLiteral(@"> WriteLiteral(" "); - #line 703 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 675 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanReopen()) { @@ -2640,13 +2608,13 @@ WriteLiteral(" title=\"Reopen this Job?\""); WriteLiteral(">\r\n"); - #line 707 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 679 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 707 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 679 "..\..\Views\Job\JobParts\_Subject.cshtml" using (Html.BeginForm(MVC.API.Job.Reopen(Model.Job.Id, true))) { @@ -2654,14 +2622,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 709 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 681 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 709 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 681 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -2710,7 +2678,7 @@ WriteLiteral(@"> "); - #line 744 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 716 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -2719,7 +2687,7 @@ WriteLiteral(@"> WriteLiteral(" "); - #line 745 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 717 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanDelete()) { @@ -2747,13 +2715,13 @@ WriteLiteral(" title=\"Delete this Job?\""); WriteLiteral(">\r\n"); - #line 749 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 721 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 749 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 721 "..\..\Views\Job\JobParts\_Subject.cshtml" using (Html.BeginForm(MVC.API.Job.Delete(Model.Job.Id, true))) { @@ -2761,14 +2729,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 751 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 723 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 751 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 723 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -2818,7 +2786,7 @@ WriteLiteral(@"> "); - #line 786 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 758 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -2827,7 +2795,7 @@ WriteLiteral(@"> WriteLiteral(" "); - #line 787 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 759 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanAddQueues() && Model.AvailableQueues != null && Model.AvailableQueues.Count > 0) { @@ -2841,14 +2809,14 @@ WriteLiteral(" "); #line default #line hidden - #line 795 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 767 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.ActionLinkSmallButton("Add to Queue", MVC.API.JobQueueJob.AddJob(), "Job_Show_Job_Actions_AddQueue_Button")); #line default #line hidden - #line 795 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 767 "..\..\Views\Job\JobParts\_Subject.cshtml" @@ -2865,13 +2833,13 @@ WriteLiteral(" title=\"Add Job to Queue\""); WriteLiteral(">\r\n"); - #line 797 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 769 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 797 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 769 "..\..\Views\Job\JobParts\_Subject.cshtml" using (Html.BeginForm(MVC.API.JobQueueJob.AddJob())) { @@ -2879,14 +2847,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 799 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 771 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 799 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 771 "..\..\Views\Job\JobParts\_Subject.cshtml" @@ -2910,14 +2878,14 @@ WriteLiteral(" type=\"hidden\""); WriteLiteral(" name=\"JobId\""); -WriteAttribute("value", Tuple.Create(" value=\"", 52288), Tuple.Create("\"", 52309) +WriteAttribute("value", Tuple.Create(" value=\"", 49757), Tuple.Create("\"", 49778) - #line 801 "..\..\Views\Job\JobParts\_Subject.cshtml" - , Tuple.Create(Tuple.Create("", 52296), Tuple.Create(Model.Job.Id + #line 773 "..\..\Views\Job\JobParts\_Subject.cshtml" + , Tuple.Create(Tuple.Create("", 49765), Tuple.Create(Model.Job.Id #line default #line hidden -, 52296), false) +, 49765), false) ); WriteLiteral(" />\r\n"); @@ -2929,13 +2897,13 @@ WriteLiteral(" class=\"queuePicker\""); WriteLiteral(">\r\n"); - #line 803 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 775 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 803 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 775 "..\..\Views\Job\JobParts\_Subject.cshtml" foreach (var jobQueue in Model.AvailableQueues.OrderBy(jq => jq.Name)) { @@ -2949,7 +2917,7 @@ WriteLiteral(" class=\"queue\""); WriteLiteral(" data-queueid=\""); - #line 805 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 777 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(jobQueue.Id); @@ -2960,7 +2928,7 @@ WriteLiteral("\""); WriteLiteral(" data-queuesla=\""); - #line 805 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 777 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(jobQueue.DefaultSLAExpiry.HasValue ? jobQueue.DefaultSLAExpiry.Value.ToString() : null); @@ -2971,7 +2939,7 @@ WriteLiteral("\""); WriteLiteral(" data-queuepriority=\""); - #line 805 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 777 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(jobQueue.Priority.ToString()); @@ -2981,32 +2949,32 @@ WriteLiteral("\""); WriteLiteral(">\r\n (jobQueue.Icon + #line 778 "..\..\Views\Job\JobParts\_Subject.cshtml" +, Tuple.Create(Tuple.Create("", 50261), Tuple.Create(jobQueue.Icon #line default #line hidden -, 52792), false) -, Tuple.Create(Tuple.Create(" ", 52808), Tuple.Create("fa-fw", 52809), true) -, Tuple.Create(Tuple.Create(" ", 52814), Tuple.Create("fa-lg", 52815), true) -, Tuple.Create(Tuple.Create(" ", 52820), Tuple.Create("d-", 52821), true) +, 50261), false) +, Tuple.Create(Tuple.Create(" ", 50277), Tuple.Create("fa-fw", 50278), true) +, Tuple.Create(Tuple.Create(" ", 50283), Tuple.Create("fa-lg", 50284), true) +, Tuple.Create(Tuple.Create(" ", 50289), Tuple.Create("d-", 50290), true) - #line 806 "..\..\Views\Job\JobParts\_Subject.cshtml" - , Tuple.Create(Tuple.Create("", 52823), Tuple.Create(jobQueue.IconColour + #line 778 "..\..\Views\Job\JobParts\_Subject.cshtml" + , Tuple.Create(Tuple.Create("", 50292), Tuple.Create(jobQueue.IconColour #line default #line hidden -, 52823), false) +, 50292), false) ); WriteLiteral(">"); - #line 806 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 778 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(jobQueue.Name); @@ -3015,7 +2983,7 @@ WriteLiteral(">"); WriteLiteral("\r\n
    \r\n"); - #line 808 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 780 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3033,7 +3001,7 @@ WriteLiteral(">\r\n
    \r\n WriteLiteral(" "); - #line 813 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 785 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.DropDownList("Priority", priorityItems, new { id = "Job_Show_Job_Actions_AddQueue_Priority" })); @@ -3041,27 +3009,27 @@ WriteLiteral(" "); #line hidden WriteLiteral(" (priorityValue.ToLower() + #line 785 "..\..\Views\Job\JobParts\_Subject.cshtml" + , Tuple.Create(Tuple.Create("", 50733), Tuple.Create(priorityValue.ToLower() #line default #line hidden -, 53264), false) +, 50733), false) ); -WriteAttribute("title", Tuple.Create(" title=\"", 53291), Tuple.Create("\"", 53324) +WriteAttribute("title", Tuple.Create(" title=\"", 50760), Tuple.Create("\"", 50793) - #line 813 "..\..\Views\Job\JobParts\_Subject.cshtml" - , Tuple.Create(Tuple.Create("", 53299), Tuple.Create(priorityValue + #line 785 "..\..\Views\Job\JobParts\_Subject.cshtml" + , Tuple.Create(Tuple.Create("", 50768), Tuple.Create(priorityValue #line default #line hidden -, 53299), false) -, Tuple.Create(Tuple.Create(" ", 53315), Tuple.Create("Priority", 53316), true) +, 50768), false) +, Tuple.Create(Tuple.Create(" ", 50784), Tuple.Create("Priority", 50785), true) ); WriteLiteral(">\r\n
    \r\n
    \r\n " + @@ -3070,7 +3038,7 @@ WriteLiteral(">\r\n
    \r\n WriteLiteral(" "); - #line 817 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 789 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.DropDownList("SLAExpiresMinutes", slaOptions, new { id = "Job_Show_Job_Actions_AddQueue_SLAExpiresMinutes" })); @@ -3088,7 +3056,7 @@ WriteLiteral(">\r\n
    \r\n "\n"); - #line 824 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 796 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3149,7 +3117,7 @@ WriteLiteral(">\r\n $(function () {\r\n " });\r\n });\r\n \r\n"); - #line 902 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 874 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3158,7 +3126,7 @@ WriteLiteral(">\r\n $(function () {\r\n WriteLiteral(" "); - #line 903 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 875 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanLogWarranty()) { @@ -3166,14 +3134,14 @@ WriteLiteral(" "); #line default #line hidden - #line 905 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 877 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.ActionLinkSmallButton("Lodge Warranty", MVC.Job.LogWarranty(Model.Job.Id, null, null), "Job_Show_Job_Actions_LogWarranty_Button")); #line default #line hidden - #line 905 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 877 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3183,7 +3151,7 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 907 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 879 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanWarrantyCompleted()) { @@ -3191,14 +3159,14 @@ WriteLiteral(" "); #line default #line hidden - #line 909 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 881 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.ActionLinkSmallButton("Warranty Complete", MVC.API.Job.UpdateWarrantyExternalCompletedDate(Model.Job.Id, "Now", true), "Job_Show_Job_Actions_WarrantyComplete_Button", "alert")); #line default #line hidden - #line 909 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 881 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3208,7 +3176,7 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 911 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 883 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanLogInsurance()) { @@ -3216,14 +3184,14 @@ WriteLiteral(" "); #line default #line hidden - #line 913 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 885 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.ActionLinkSmallButton("Lodge Insurance", MVC.Job.LogInsurance(Model.Job.Id, null, null), "Job_Show_Job_Actions_LogInsurance_Button", "alert")); #line default #line hidden - #line 913 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 885 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3233,7 +3201,7 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 915 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 887 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanLogRepair()) { @@ -3241,14 +3209,14 @@ WriteLiteral(" "); #line default #line hidden - #line 917 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 889 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.ActionLinkSmallButton("Lodge Repair", MVC.Job.LogRepair(Model.Job.Id, null, null), "Job_Show_Job_Actions_LogRepair_Button")); #line default #line hidden - #line 917 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 889 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3258,7 +3226,7 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 919 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 891 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanRepairComplete()) { @@ -3266,14 +3234,14 @@ WriteLiteral(" "); #line default #line hidden - #line 921 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 893 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.ActionLinkSmallButton("Repairs Complete", MVC.API.Job.UpdateNonWarrantyRepairerCompletedDate(Model.Job.Id, "Now", true), "Job_Show_Job_Actions_RepairComplete_Button", "alert")); #line default #line hidden - #line 921 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 893 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3283,7 +3251,7 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 923 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 895 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanConvertHWarToHNWar()) { @@ -3311,13 +3279,13 @@ WriteLiteral(" title=\"Convert this Job?\""); WriteLiteral(">\r\n"); - #line 927 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 899 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 927 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 899 "..\..\Views\Job\JobParts\_Subject.cshtml" using (Html.BeginForm(MVC.API.Job.ConvertHWarToHNWar(Model.Job.Id, true))) { @@ -3325,14 +3293,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 929 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 901 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 929 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 901 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3383,7 +3351,7 @@ WriteLiteral(@"> "); - #line 966 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 938 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3392,13 +3360,13 @@ WriteLiteral(@"> WriteLiteral(" \r\n"); - #line 968 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 940 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 968 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 940 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.Device != null) { @@ -3412,13 +3380,13 @@ WriteLiteral(" id=\"Job_Show_Device_Actions\""); WriteLiteral(">\r\n"); - #line 971 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 943 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 971 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 943 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanDeviceHeld()) { using (Html.BeginForm(MVC.API.Job.DeviceHeld(Model.Job.Id, true))) @@ -3428,14 +3396,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 975 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 947 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 975 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 947 "..\..\Views\Job\JobParts\_Subject.cshtml" @@ -3452,7 +3420,7 @@ WriteLiteral(" class=\"button small\""); WriteLiteral(">Device Held\r\n"); - #line 977 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 949 "..\..\Views\Job\JobParts\_Subject.cshtml" } } @@ -3462,7 +3430,7 @@ WriteLiteral(">Device Held\r\n"); WriteLiteral(" "); - #line 979 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 951 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanDeviceReadyForReturn()) { using (Html.BeginForm(MVC.API.Job.DeviceReadyForReturn(Model.Job.Id, true))) @@ -3472,14 +3440,14 @@ WriteLiteral(" "); #line default #line hidden - #line 983 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 955 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 983 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 955 "..\..\Views\Job\JobParts\_Subject.cshtml" @@ -3496,7 +3464,7 @@ WriteLiteral(" class=\"button small alert\""); WriteLiteral(">Device Ready For Return\r\n"); - #line 985 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 957 "..\..\Views\Job\JobParts\_Subject.cshtml" } } @@ -3506,7 +3474,7 @@ WriteLiteral(">Device Ready For Return\r\n"); WriteLiteral(" "); - #line 987 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 959 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanDeviceReturned()) { using (Html.BeginForm(MVC.API.Job.DeviceReturned(Model.Job.Id, true))) @@ -3516,14 +3484,14 @@ WriteLiteral(" "); #line default #line hidden - #line 991 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 963 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 991 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 963 "..\..\Views\Job\JobParts\_Subject.cshtml" @@ -3535,22 +3503,22 @@ WriteLiteral(" id=\"Job_Show_Device_Actions_DeviceReturned_Button\""); WriteLiteral(" type=\"submit\""); -WriteAttribute("class", Tuple.Create(" class=\"", 62566), Tuple.Create("\"", 62642) -, Tuple.Create(Tuple.Create("", 62574), Tuple.Create("button", 62574), true) -, Tuple.Create(Tuple.Create(" ", 62580), Tuple.Create("small", 62581), true) +WriteAttribute("class", Tuple.Create(" class=\"", 60035), Tuple.Create("\"", 60111) +, Tuple.Create(Tuple.Create("", 60043), Tuple.Create("button", 60043), true) +, Tuple.Create(Tuple.Create(" ", 60049), Tuple.Create("small", 60050), true) - #line 992 "..\..\Views\Job\JobParts\_Subject.cshtml" - , Tuple.Create(Tuple.Create(" ", 62586), Tuple.Create(Model.Job.CanDeviceReadyForReturn() ? null : "alert" + #line 964 "..\..\Views\Job\JobParts\_Subject.cshtml" + , Tuple.Create(Tuple.Create(" ", 60055), Tuple.Create(Model.Job.CanDeviceReadyForReturn() ? null : "alert" #line default #line hidden -, 62587), false) +, 60056), false) ); WriteLiteral(">Device Returned\r\n"); - #line 993 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 965 "..\..\Views\Job\JobParts\_Subject.cshtml" } } @@ -3560,7 +3528,7 @@ WriteLiteral(">Device Returned\r\n"); WriteLiteral(" \r\n"); - #line 996 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 968 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3569,7 +3537,7 @@ WriteLiteral(" \r\n"); WriteLiteral(" "); - #line 997 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 969 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.User != null) { @@ -3583,13 +3551,13 @@ WriteLiteral(" id=\"Job_Show_User_Actions\""); WriteLiteral(">\r\n\r\n\r\n"); - #line 1002 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 974 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 1002 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 974 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanWaitingForUserAction()) { @@ -3617,13 +3585,13 @@ WriteLiteral(" title=\"Waiting for User Action\""); WriteLiteral(">\r\n"); - #line 1006 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 978 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 1006 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 978 "..\..\Views\Job\JobParts\_Subject.cshtml" using (Html.BeginForm(MVC.API.Job.WaitingForUserAction(Model.Job.Id, null, true))) { @@ -3631,14 +3599,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 1008 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 980 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 1008 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 980 "..\..\Views\Job\JobParts\_Subject.cshtml" @@ -3655,7 +3623,7 @@ WriteLiteral(" class=\"block\""); WriteLiteral(">\r\n

    \r\n"); - #line 1013 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 985 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3690,7 +3658,7 @@ WriteLiteral(">\r\n $(function () {\r\n " });\r\n \r\n"); - #line 1046 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 1018 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3699,7 +3667,7 @@ WriteLiteral(">\r\n $(function () {\r\n WriteLiteral(" "); - #line 1047 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 1019 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanNotWaitingForUserAction()) { @@ -3727,13 +3695,13 @@ WriteLiteral(" title=\"Not Waiting for User Action\""); WriteLiteral(">\r\n"); - #line 1051 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 1023 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 1051 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 1023 "..\..\Views\Job\JobParts\_Subject.cshtml" using (Html.BeginForm(MVC.API.Job.NotWaitingForUserAction(Model.Job.Id, null, true))) { @@ -3741,14 +3709,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 1053 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 1025 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 1053 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 1025 "..\..\Views\Job\JobParts\_Subject.cshtml" @@ -3765,7 +3733,7 @@ WriteLiteral(" class=\"block\""); WriteLiteral(">\r\n

    \r\n"); - #line 1058 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 1030 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3801,7 +3769,7 @@ WriteLiteral(">\r\n $(function () {\r\n " });\r\n \r\n"); - #line 1092 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 1064 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3810,7 +3778,7 @@ WriteLiteral(">\r\n $(function () {\r\n WriteLiteral("\r\n \r\n"); - #line 1095 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 1067 "..\..\Views\Job\JobParts\_Subject.cshtml" }