diff --git a/Disco.Web/Areas/Config/Views/DeviceBatch/Show.cshtml b/Disco.Web/Areas/Config/Views/DeviceBatch/Show.cshtml index af00ded4..04aaa0b3 100644 --- a/Disco.Web/Areas/Config/Views/DeviceBatch/Show.cshtml +++ b/Disco.Web/Areas/Config/Views/DeviceBatch/Show.cshtml @@ -717,28 +717,6 @@ $.connection.hub.disconnected(function () { // Disable UI $Attachments.find('span.action.enabled').addClass('disabled'); - - // Show Dialog Message - if ($('.disconnected-dialog').length == 0) { - $('
') - .addClass('dialog disconnected-dialog') - .html('

Disconnected from the Disco ICT Server

This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.
') - .dialog({ - resizable: false, - title: 'Disconnected', - width: 400, - modal: true, - buttons: { - 'Refresh Now': function () { - $(this).dialog('option', 'buttons', null); - window.location.reload(true); - }, - 'Close': function () { - $(this).dialog('destroy'); - } - } - }); - } }); // Start Connection diff --git a/Disco.Web/Areas/Config/Views/DeviceBatch/Show.generated.cs b/Disco.Web/Areas/Config/Views/DeviceBatch/Show.generated.cs index 2efc5a29..386f3c7d 100644 --- a/Disco.Web/Areas/Config/Views/DeviceBatch/Show.generated.cs +++ b/Disco.Web/Areas/Config/Views/DeviceBatch/Show.generated.cs @@ -2346,46 +2346,34 @@ WriteLiteral(@"> #line default #line hidden -WriteLiteral("\' };\r\n\r\n $.connection.hub.reconnecting(function () {\r\n" + -" $Attachments.find(\'span.action.enabled\').addClas" + -"s(\'disabled\');\r\n });\r\n $.c" + -"onnection.hub.reconnected(function () {\r\n $Attach" + -"ments.find(\'span.action.enabled\').removeClass(\'disabled\');\r\n " + -" });\r\n $.connection.hub.error(function (error)" + -" {\r\n console.log(\'Server connection error: \' + er" + -"ror);\r\n });\r\n $.connection" + -".hub.disconnected(function () {\r\n // Disable UI\r\n" + -" $Attachments.find(\'span.action.enabled\').addClas" + -"s(\'disabled\');\r\n\r\n // Show Dialog Message\r\n " + -" if ($(\'.disconnected-dialog\').length == 0) {\r\n " + -" $(\'
\')\r\n " + -".addClass(\'dialog disconnected-dialog\')\r\n " + -" .html(\'

<" + -"i class=\"fa fa-ban fa-stack-2x error\">Disconnected from the Disco ICT" + -" Server

This page is not receiving live updates. Please ensure you are " + -"connected to the server, then refresh this page to enable features.
\')\r\n " + -" .dialog({\r\n " + -" resizable: false,\r\n title" + -": \'Disconnected\',\r\n width: 400,\r\n " + -" modal: true,\r\n " + -" buttons: {\r\n \'R" + -"efresh Now\': function () {\r\n " + -"$(this).dialog(\'option\', \'buttons\', null);\r\n " + -" window.location.reload(true);\r\n " + -" },\r\n \'Close\': func" + -"tion () {\r\n $(this).dialog(\'d" + -"estroy\');\r\n }\r\n " + -" }\r\n });\r\n " + -" }\r\n });\r\n\r\n " + -" // Start Connection\r\n $.connection.hub.st" + -"art(function () {\r\n $Attachments.find(\'span.actio" + -"n.enabled\').removeClass(\'disabled\');\r\n });\r\n\r\n " + -" function onAddAttachment(id, quick) {\r\n " + -" var data = { id: id };\r\n $.ajax({\r\n " + -" url: \'"); +WriteLiteral(@"' }; + + $.connection.hub.reconnecting(function () { + $Attachments.find('span.action.enabled').addClass('disabled'); + }); + $.connection.hub.reconnected(function () { + $Attachments.find('span.action.enabled').removeClass('disabled'); + }); + $.connection.hub.error(function (error) { + console.log('Server connection error: ' + error); + }); + $.connection.hub.disconnected(function () { + // Disable UI + $Attachments.find('span.action.enabled').addClass('disabled'); + }); + + // Start Connection + $.connection.hub.start(function () { + $Attachments.find('span.action.enabled').removeClass('disabled'); + }); + + function onAddAttachment(id, quick) { + var data = { id: id }; + $.ajax({ + url: '"); - #line 752 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 730 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" Write(Url.Action(MVC.API.DeviceBatch.Attachment())); @@ -2400,13 +2388,13 @@ WriteLiteral(@"', "); - #line 758 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 736 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line default #line hidden - #line 758 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 736 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" if (canConfig) { @@ -2420,7 +2408,7 @@ WriteLiteral("buildAttachment(a, true, quick);"); WriteLiteral("\r\n"); - #line 761 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 739 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" } else { @@ -2435,7 +2423,7 @@ WriteLiteral("buildAttachment(a, false, quick);"); WriteLiteral("\r\n"); - #line 765 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 743 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" } @@ -2462,7 +2450,7 @@ WriteLiteral(@" } else { e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '"); - #line 784 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 762 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" Write(Url.Action(MVC.API.DeviceBatch.AttachmentDownload())); @@ -2493,7 +2481,7 @@ WriteLiteral(@"/' + a.Id); img.attr('src', '"); - #line 806 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 784 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" Write(Url.Action(MVC.API.DeviceBatch.AttachmentThumbnail())); @@ -2539,13 +2527,13 @@ WriteLiteral("/\' + a.Id + \'?v=\' + retryCount);\r\n " }\r\n\r\n"); - #line 858 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 836 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line default #line hidden - #line 858 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 836 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" if (canConfig) { @@ -2608,7 +2596,7 @@ WriteLiteral("\r\n //#region Add Attachments\r\n " "); - #line 930 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 908 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" } @@ -2631,13 +2619,13 @@ WriteLiteral(@" "); - #line 945 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 923 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line default #line hidden - #line 945 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 923 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" if (hideAdvanced) { @@ -2671,7 +2659,7 @@ WriteLiteral(@">Show Advanced Options "); - #line 961 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 939 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" } @@ -2687,7 +2675,7 @@ WriteLiteral(">\r\n \r\n Linked Groups:\r\n WriteLiteral(" "); - #line 968 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 946 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel() { CanConfigure = canConfig, @@ -2705,7 +2693,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 976 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 954 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel() { CanConfigure = canConfig, @@ -2721,13 +2709,13 @@ WriteLiteral(" "); WriteLiteral("\r\n"); - #line 984 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 962 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line default #line hidden - #line 984 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 962 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" if (canConfig) { @@ -2735,14 +2723,14 @@ WriteLiteral("\r\n"); #line default #line hidden - #line 986 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 964 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupShared)); #line default #line hidden - #line 986 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 964 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" } @@ -2752,7 +2740,7 @@ WriteLiteral("\r\n"); WriteLiteral("
\r\n \r\n \r\n \r\n
\r\n"); - #line 993 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 971 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" Write(Html.Partial(MVC.Config.Shared.Views._DeviceGroupDocumentBulkGenerate, Model)); @@ -2765,13 +2753,13 @@ WriteLiteral(" class=\"actionBar\""); WriteLiteral(">\r\n"); - #line 995 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 973 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line default #line hidden - #line 995 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 973 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" if (Model.CanDecommission) { @@ -2797,13 +2785,13 @@ WriteLiteral(" title=\"Batch Device Decommission\""); WriteLiteral(">\r\n"); - #line 999 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 977 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line default #line hidden - #line 999 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 977 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" using (Html.BeginForm(MVC.API.Device.DeviceBatchDecommission(Model.DeviceBatch.Id))) { @@ -2811,14 +2799,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 1001 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 979 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 1001 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 979 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" @@ -2843,13 +2831,13 @@ WriteLiteral(" class=\"none\""); WriteLiteral(">\r\n"); - #line 1007 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 985 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line default #line hidden - #line 1007 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 985 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" foreach (DecommissionReasons decommissionReason in Enum.GetValues(typeof(DecommissionReasons)).Cast().OrderBy(r => r.ToString())) { @@ -2860,33 +2848,33 @@ WriteLiteral("
  • \r\n WriteLiteral(" type=\"radio\""); -WriteAttribute("id", Tuple.Create(" id=\"", 53759), Tuple.Create("\"", 53829) -, Tuple.Create(Tuple.Create("", 53764), Tuple.Create("DeviceBatch_Decommission_Dialog_Reason_", 53764), true) +WriteAttribute("id", Tuple.Create(" id=\"", 52146), Tuple.Create("\"", 52216) +, Tuple.Create(Tuple.Create("", 52151), Tuple.Create("DeviceBatch_Decommission_Dialog_Reason_", 52151), true) - #line 1010 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" - , Tuple.Create(Tuple.Create("", 53803), Tuple.Create((int)decommissionReason + #line 988 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + , Tuple.Create(Tuple.Create("", 52190), Tuple.Create((int)decommissionReason #line default #line hidden -, 53803), false) +, 52190), false) ); WriteLiteral("\r\n name=\"decommissionReason\""); -WriteAttribute("value", Tuple.Create(" value=\"", 53896), Tuple.Create("\"", 53930) +WriteAttribute("value", Tuple.Create(" value=\"", 52283), Tuple.Create("\"", 52317) - #line 1011 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" -, Tuple.Create(Tuple.Create("", 53904), Tuple.Create((int)decommissionReason + #line 989 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" +, Tuple.Create(Tuple.Create("", 52291), Tuple.Create((int)decommissionReason #line default #line hidden -, 53904), false) +, 52291), false) ); WriteLiteral(" "); - #line 1011 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 989 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" Write((decommissionReason == DecommissionReasons.EndOfLife) ? "checked=\"checked\"" : string.Empty); @@ -2894,21 +2882,21 @@ WriteLiteral(" "); #line hidden WriteLiteral(" />\r\n ((int)decommissionReason + #line 990 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + , Tuple.Create(Tuple.Create("", 52502), Tuple.Create((int)decommissionReason #line default #line hidden -, 54115), false) +, 52502), false) ); WriteLiteral(">"); - #line 1012 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 990 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" Write(decommissionReason.ReasonMessage()); @@ -2917,7 +2905,7 @@ WriteLiteral(">"); WriteLiteral("\r\n
  • \r\n"); - #line 1014 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 992 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" } @@ -2936,7 +2924,7 @@ WriteLiteral(" />\r\n Unassign devices users\r\n "\r\n \r\n"); - #line 1022 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 1000 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" } @@ -2980,7 +2968,7 @@ WriteLiteral(@"> "); - #line 1053 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 1031 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" } @@ -2989,7 +2977,7 @@ WriteLiteral(@"> WriteLiteral(" "); - #line 1054 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 1032 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" if (Model.CanDelete) { @@ -3017,13 +3005,13 @@ WriteLiteral(" title=\"Delete this Device Batch?\""); WriteLiteral(">\r\n"); - #line 1058 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 1036 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line default #line hidden - #line 1058 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 1036 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" using (Html.BeginForm(MVC.API.DeviceBatch.Delete(Model.DeviceBatch.Id, true))) { @@ -3031,14 +3019,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 1060 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 1038 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 1060 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 1038 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" } @@ -3086,7 +3074,7 @@ WriteLiteral(@"> "); - #line 1094 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 1072 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" } @@ -3095,7 +3083,7 @@ WriteLiteral(@"> WriteLiteral(" "); - #line 1095 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 1073 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" if (Model.DeviceCount > 0) { if (Authorization.Has(Claims.Device.Actions.Export)) @@ -3105,14 +3093,14 @@ WriteLiteral(" "); #line default #line hidden - #line 1099 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 1077 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" Write(Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.DeviceExportTypes.Batch, Model.DeviceBatch.Id))); #line default #line hidden - #line 1099 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 1077 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" } if (Authorization.Has(Claims.Device.Search) && Model.DeviceCount > 0) @@ -3122,14 +3110,14 @@ WriteLiteral(" "); #line default #line hidden - #line 1103 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 1081 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" Write(Html.ActionLinkButton(string.Format("View {0} Device{1}", Model.DeviceCount, (Model.DeviceCount != 1 ? "s" : null)), MVC.Search.Query(Model.DeviceBatch.Id.ToString(), "DeviceBatch"))); #line default #line hidden - #line 1103 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" + #line 1081 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" } } diff --git a/Disco.Web/Areas/Config/Views/DocumentTemplate/ImportStatus.cshtml b/Disco.Web/Areas/Config/Views/DocumentTemplate/ImportStatus.cshtml index 637abe28..d7c6fe09 100644 --- a/Disco.Web/Areas/Config/Views/DocumentTemplate/ImportStatus.cshtml +++ b/Disco.Web/Areas/Config/Views/DocumentTemplate/ImportStatus.cshtml @@ -314,29 +314,6 @@ $.connection.hub.error(function (error) { console.log('Server connection error: ' + error); }); - $.connection.hub.disconnected(function () { - // Show Dialog Message - if ($('.disconnected-dialog').length == 0) { - $('
    ') - .addClass('dialog disconnected-dialog') - .html('

    Disconnected from the Disco ICT Server

    This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.
    ') - .dialog({ - resizable: false, - title: 'Disconnected', - width: 400, - modal: true, - buttons: { - 'Refresh Now': function () { - $(this).dialog('option', 'buttons', null); - window.location.reload(true); - }, - 'Close': function () { - $(this).dialog('destroy'); - } - } - }); - } - }); $.connection.hub.start() .done(function () { isLive = true; }); diff --git a/Disco.Web/Areas/Config/Views/DocumentTemplate/ImportStatus.generated.cs b/Disco.Web/Areas/Config/Views/DocumentTemplate/ImportStatus.generated.cs index 54b27e7d..c5c36e40 100644 --- a/Disco.Web/Areas/Config/Views/DocumentTemplate/ImportStatus.generated.cs +++ b/Disco.Web/Areas/Config/Views/DocumentTemplate/ImportStatus.generated.cs @@ -473,27 +473,19 @@ WriteLiteral(@"', #line default #line hidden -WriteLiteral("\' };\r\n $.connection.hub.error(function (error) {\r\n cons" + -"ole.log(\'Server connection error: \' + error);\r\n });\r\n $.co" + -"nnection.hub.disconnected(function () {\r\n // Show Dialog Message\r" + -"\n if ($(\'.disconnected-dialog\').length == 0) {\r\n " + -" $(\'
    \')\r\n .addClass(\'dialog disconnected-dialog\')\r\n" + -" .html(\'

    Disconne" + -"cted from the Disco ICT Server

    This page is not receiving live updates." + -" Please ensure you are connected to the server, then refresh this page to enable" + -" features.
    \')\r\n .dialog({\r\n " + -" resizable: false,\r\n title: \'Disconnected\',\r\n " + -" width: 400,\r\n modal: true,\r\n " + -" buttons: {\r\n \'Refresh No" + -"w\': function () {\r\n $(this).dialog(\'option\', " + -"\'buttons\', null);\r\n window.location.reload(tr" + -"ue);\r\n },\r\n \'Close" + -"\': function () {\r\n $(this).dialog(\'destroy\');" + -"\r\n }\r\n }\r\n " + -" });\r\n }\r\n });\r\n\r\n $.connection." + -"hub.start()\r\n .done(function () { isLive = true; });\r\n\r\n }" + -"\r\n init();\r\n });\r\n\r\n"); +WriteLiteral(@"' }; + $.connection.hub.error(function (error) { + console.log('Server connection error: ' + error); + }); + + $.connection.hub.start() + .done(function () { isLive = true; }); + + } + init(); + }); + +"); } } diff --git a/Disco.Web/Areas/Config/Views/Enrolment/Status.cshtml b/Disco.Web/Areas/Config/Views/Enrolment/Status.cshtml index 0d6b976b..4ef8b587 100644 --- a/Disco.Web/Areas/Config/Views/Enrolment/Status.cshtml +++ b/Disco.Web/Areas/Config/Views/Enrolment/Status.cshtml @@ -412,29 +412,6 @@ $.connection.hub.error(function (error) { console.log('Server connection error: ' + error); }); - $.connection.hub.disconnected(function (error) { - // Show Dialog Message - if ($('.disconnected-dialog').length == 0) { - $('
    ') - .addClass('dialog disconnected-dialog') - .html('

    Disconnected from the Disco ICT Server

    This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.
    ') - .dialog({ - resizable: false, - title: 'Disconnected', - width: 400, - modal: true, - buttons: { - 'Refresh Now': function () { - $(this).dialog('option', 'buttons', null); - window.location.reload(true); - }, - 'Close': function () { - $(this).dialog('destroy'); - } - } - }); - } - }); $.connection.hub.start() .done(function () { isLive = true; }); diff --git a/Disco.Web/Areas/Config/Views/Enrolment/Status.generated.cs b/Disco.Web/Areas/Config/Views/Enrolment/Status.generated.cs index 73b1b653..db96bdd1 100644 --- a/Disco.Web/Areas/Config/Views/Enrolment/Status.generated.cs +++ b/Disco.Web/Areas/Config/Views/Enrolment/Status.generated.cs @@ -823,35 +823,33 @@ WriteLiteral(@"', #line default #line hidden -WriteLiteral("\' };\r\n $.connection.hub.error(function (error) {\r\n cons" + -"ole.log(\'Server connection error: \' + error);\r\n });\r\n $.co" + -"nnection.hub.disconnected(function (error) {\r\n // Show Dialog Mes" + -"sage\r\n if ($(\'.disconnected-dialog\').length == 0) {\r\n " + -" $(\'
    \')\r\n .addClass(\'dialog disconnected-dialo" + -"g\')\r\n .html(\'

    Dis" + -"connected from the Disco ICT Server

    This page is not receiving live upd" + -"ates. Please ensure you are connected to the server, then refresh this page to e" + -"nable features.
    \')\r\n .dialog({\r\n " + -" resizable: false,\r\n title: \'Disconnected\',\r\n " + -" width: 400,\r\n modal: true," + -"\r\n buttons: {\r\n \'Refre" + -"sh Now\': function () {\r\n $(this).dialog(\'opti" + -"on\', \'buttons\', null);\r\n window.location.relo" + -"ad(true);\r\n },\r\n \'" + -"Close\': function () {\r\n $(this).dialog(\'destr" + -"oy\');\r\n }\r\n }\r\n " + -" });\r\n }\r\n });\r\n\r\n $.connec" + -"tion.hub.start()\r\n .done(function () { isLive = true; });\r\n\r\n " + -" }\r\n $(\'#dialogSession\').on(\'click\', \'#formResolveSessionPending butto" + -"n\', function (e) {\r\n const $button = $(this);\r\n const $for" + -"m = $button.closest(\'form\');\r\n const body = new FormData($form[0]);\r\n" + -" body.append(\'approve\', $button.val());\r\n fetch($form.attr" + -"(\'action\'), {\r\n method: \'POST\',\r\n body: body\r\n " + -" }).then(function (response) {\r\n if (!response.ok) {\r\n " + -" alert(\'Failed to resolve pending session: \' + response.statusTex" + -"t);\r\n }\r\n });\r\n });\r\n init();\r\n });\r\n" + -"\r\n"); +WriteLiteral(@"' }; + $.connection.hub.error(function (error) { + console.log('Server connection error: ' + error); + }); + + $.connection.hub.start() + .done(function () { isLive = true; }); + + } + $('#dialogSession').on('click', '#formResolveSessionPending button', function (e) { + const $button = $(this); + const $form = $button.closest('form'); + const body = new FormData($form[0]); + body.append('approve', $button.val()); + fetch($form.attr('action'), { + method: 'POST', + body: body + }).then(function (response) { + if (!response.ok) { + alert('Failed to resolve pending session: ' + response.statusText); + } + }); + }); + init(); + }); + +"); } } diff --git a/Disco.Web/Areas/Config/Views/Shared/LogEvents.cshtml b/Disco.Web/Areas/Config/Views/Shared/LogEvents.cshtml index 2e0d2691..2840d160 100644 --- a/Disco.Web/Areas/Config/Views/Shared/LogEvents.cshtml +++ b/Disco.Web/Areas/Config/Views/Shared/LogEvents.cshtml @@ -124,29 +124,6 @@ $.connection.hub.error(function (error) { console.log('Server connection error: ' + error); }); - $.connection.hub.disconnected(function () { - // Show Dialog Message - if ($('.disconnected-dialog').length == 0) { - $('
    ') - .addClass('dialog disconnected-dialog') - .html('

    Disconnected from the Disco ICT Server

    This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.
    ') - .dialog({ - resizable: false, - title: 'Disconnected', - width: 400, - modal: true, - buttons: { - 'Refresh Now': function () { - $(this).dialog('option', 'buttons', null); - window.location.reload(true); - }, - 'Close': function () { - $(this).dialog('destroy'); - } - } - }); - } - }) $.connection.hub.start(); } diff --git a/Disco.Web/Areas/Config/Views/Shared/LogEvents.generated.cs b/Disco.Web/Areas/Config/Views/Shared/LogEvents.generated.cs index 5d392cdb..e4f9c930 100644 --- a/Disco.Web/Areas/Config/Views/Shared/LogEvents.generated.cs +++ b/Disco.Web/Areas/Config/Views/Shared/LogEvents.generated.cs @@ -331,28 +331,9 @@ WriteLiteral("\',\r\n dataType: \'json\',\r\n " };\r\n\r\n $.connection.hub.qs = {LogModules: logModule" + "LiveGroupName};\r\n $.connection.hub.error(function (error) {\r\n" + " console.log(\'Server connection error: \' + error);\r\n " + -" });\r\n $.connection.hub.disconnected(function (" + -") {\r\n // Show Dialog Message\r\n if " + -"($(\'.disconnected-dialog\').length == 0) {\r\n $(\'
    \'" + -")\r\n .addClass(\'dialog disconnected-dialog\')\r\n " + -" .html(\'

    Disc" + -"onnected from the Disco ICT Server

    This page is not receiving live upda" + -"tes. Please ensure you are connected to the server, then refresh this page to en" + -"able features.
    \')\r\n .dialog({\r\n " + -" resizable: false,\r\n ti" + -"tle: \'Disconnected\',\r\n width: 400,\r\n " + -" modal: true,\r\n but" + -"tons: {\r\n \'Refresh Now\': function () {\r\n " + -" $(this).dialog(\'option\', \'buttons\', n" + -"ull);\r\n window.location.reload(true);" + -"\r\n },\r\n " + -" \'Close\': function () {\r\n $(this" + -").dialog(\'destroy\');\r\n }\r\n " + -" }\r\n });\r\n " + -" }\r\n })\r\n\r\n $.connection.hub.start();\r" + -"\n }\r\n }\r\n\r\n loadInitialData();\r\n });" + -"\r\n \r\n
    \r\n"); +" });\r\n\r\n $.connection.hub.start();\r\n " + +" }\r\n }\r\n\r\n loadInitialData();\r\n });\r\n \r\n
    \r\n"); } } diff --git a/Disco.Web/Areas/Config/Views/Shared/TaskStatus.cshtml b/Disco.Web/Areas/Config/Views/Shared/TaskStatus.cshtml index 5c06b533..de6a36e8 100644 --- a/Disco.Web/Areas/Config/Views/Shared/TaskStatus.cshtml +++ b/Disco.Web/Areas/Config/Views/Shared/TaskStatus.cshtml @@ -249,29 +249,6 @@ $.connection.hub.error(function (error) { console.log('Server connection error: ' + error); }); - $.connection.hub.disconnected(function () { - // Show Dialog Message - if ($('.disconnected-dialog').length == 0) { - $('
    ') - .addClass('dialog disconnected-dialog') - .html('

    Disconnected from the Disco ICT Server

    This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.
    ') - .dialog({ - resizable: false, - title: 'Disconnected', - width: 400, - modal: true, - buttons: { - 'Refresh Now': function () { - $(this).dialog('option', 'buttons', null); - window.location.reload(true); - }, - 'Close': function () { - $(this).dialog('destroy'); - } - } - }); - } - }) $.connection.hub.start() .fail(onHubFailed); diff --git a/Disco.Web/Areas/Config/Views/Shared/TaskStatus.generated.cs b/Disco.Web/Areas/Config/Views/Shared/TaskStatus.generated.cs index 8558cf3f..f84c8064 100644 --- a/Disco.Web/Areas/Config/Views/Shared/TaskStatus.generated.cs +++ b/Disco.Web/Areas/Config/Views/Shared/TaskStatus.generated.cs @@ -281,25 +281,8 @@ WriteLiteral("\';\r\n\r\n var view = $(\'#Logging_Task_Status\');\r\n "sHub.client.updateTaskStatus = vm.Update;\r\n\r\n $.connection.hub.qs = {" + " TaskSessionId: sessionId };\r\n $.connection.hub.error(function (error" + ") {\r\n console.log(\'Server connection error: \' + error);\r\n " + -" });\r\n $.connection.hub.disconnected(function () {\r\n " + -" // Show Dialog Message\r\n if ($(\'.disconnected-dialog\').length =" + -"= 0) {\r\n $(\'
    \')\r\n .addClass(\'dialo" + -"g disconnected-dialog\')\r\n .html(\'

    Disconnected from the Disco ICT Server

    This page is no" + -"t receiving live updates. Please ensure you are connected to the server, then re" + -"fresh this page to enable features.
    \')\r\n .dialog({\r\n" + -" resizable: false,\r\n title" + -": \'Disconnected\',\r\n width: 400,\r\n " + -" modal: true,\r\n buttons: {\r\n " + -" \'Refresh Now\': function () {\r\n " + -"$(this).dialog(\'option\', \'buttons\', null);\r\n " + -"window.location.reload(true);\r\n },\r\n " + -" \'Close\': function () {\r\n $" + -"(this).dialog(\'destroy\');\r\n }\r\n " + -" }\r\n });\r\n }\r\n })\r\n\r\n " + -" $.connection.hub.start()\r\n .fail(onHubFailed);\r\n " + -" }\r\n\r\n });\r\n\r\n"); +" });\r\n\r\n $.connection.hub.start()\r\n .fail(onHubFail" + +"ed);\r\n }\r\n\r\n });\r\n\r\n"); } } diff --git a/Disco.Web/Views/Device/Show.cshtml b/Disco.Web/Views/Device/Show.cshtml index d558e38e..6d0c4d43 100644 --- a/Disco.Web/Views/Device/Show.cshtml +++ b/Disco.Web/Views/Device/Show.cshtml @@ -157,28 +157,6 @@ // Disable UI $('#AttachmentsContainer').find('span.action.enabled').addClass('disabled'); $('#Comments').find('button').prop('disabled', true); - - // Show Dialog Message - if ($('.disconnected-dialog').length == 0) { - $('
    ') - .addClass('dialog disconnected-dialog') - .html('

    Disconnected from the Disco ICT Server

    This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.
    ') - .dialog({ - resizable: false, - title: 'Disconnected', - width: 400, - modal: true, - buttons: { - 'Refresh Now': function () { - $(this).dialog('option', 'buttons', null); - window.location.reload(true); - }, - 'Close': function () { - $(this).dialog('destroy'); - } - } - }); - } }); $.connection.hub.reconnecting(function () { diff --git a/Disco.Web/Views/Device/Show.generated.cs b/Disco.Web/Views/Device/Show.generated.cs index eea311e0..ccb399e7 100644 --- a/Disco.Web/Views/Device/Show.generated.cs +++ b/Disco.Web/Views/Device/Show.generated.cs @@ -522,38 +522,21 @@ WriteLiteral(" \r\n"); +"tton\').prop(\'disabled\', true);\r\n });\r\n\r\n $.connect" + +"ion.hub.reconnecting(function () {\r\n $(\'#AttachmentsContainer" + +"\').find(\'span.action.enabled\').addClass(\'disabled\');\r\n $(\'#Co" + +"mments\').find(\'button\').prop(\'disabled\', true);\r\n });\r\n " + +" $.connection.hub.reconnected(function () {\r\n $(\'#Attach" + +"mentsContainer\').find(\'span.action.enabled\').removeClass(\'disabled\');\r\n " + +" $(\'#Comments\').find(\'button\').prop(\'disabled\', false);\r\n " + +" });\r\n\r\n // Start Connection\r\n $.connection.hub." + +"start(function () {\r\n $(\'#AttachmentsContainer\').find(\'span.a" + +"ction.enabled\').removeClass(\'disabled\');\r\n $(\'#Comments\').fin" + +"d(\'button\').prop(\'disabled\', false);\r\n });\r\n });\r\n " + +" \r\n"); - #line 200 "..\..\Views\Device\Show.cshtml" + #line 178 "..\..\Views\Device\Show.cshtml" } diff --git a/Disco.Web/Views/Job/JobParts/Resources.cshtml b/Disco.Web/Views/Job/JobParts/Resources.cshtml index 31378a07..cec20cd3 100644 --- a/Disco.Web/Views/Job/JobParts/Resources.cshtml +++ b/Disco.Web/Views/Job/JobParts/Resources.cshtml @@ -588,28 +588,6 @@ $('#CommentsContainer').find('textarea.commentInput').attr('readonly', 'readonly'); $('#CommentsContainer').find('span.action').addClass('disabled'); $('#AttachmentsContainer').find('span.action.enabled').addClass('disabled'); - - // Show Dialog Message - if ($('.disconnected-dialog').length == 0) { - $('
    ') - .addClass('dialog disconnected-dialog') - .html('

    Disconnected from the Disco ICT Server

    This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.
    ') - .dialog({ - resizable: false, - title: 'Disconnected', - width: 400, - modal: true, - buttons: { - 'Refresh Now': function () { - $(this).dialog('option', 'buttons', null); - window.location.reload(true); - }, - 'Close': function () { - $(this).dialog('destroy'); - } - } - }); - } }); // Start Connection diff --git a/Disco.Web/Views/Job/JobParts/Resources.generated.cs b/Disco.Web/Views/Job/JobParts/Resources.generated.cs index 8377f5de..99919063 100644 --- a/Disco.Web/Views/Job/JobParts/Resources.generated.cs +++ b/Disco.Web/Views/Job/JobParts/Resources.generated.cs @@ -1297,43 +1297,39 @@ WriteLiteral(@" #line default #line hidden -WriteLiteral("\r\n $.connection.hub.qs = { JobId: jobId };\r\n $.connection.h" + -"ub.reconnecting(function () {\r\n $(\'#CommentsContainer\').find(\'spa" + -"n.action\').addClass(\'disabled\');\r\n $(\'#AttachmentsContainer\').fin" + -"d(\'span.action.enabled\').addClass(\'disabled\');\r\n });\r\n $.c" + -"onnection.hub.reconnected(function () {\r\n $(\'#CommentsContainer\')" + -".find(\'span.action\').removeClass(\'disabled\');\r\n $(\'#AttachmentsCo" + -"ntainer\').find(\'span.action.enabled\').removeClass(\'disabled\');\r\n });\r" + -"\n $.connection.hub.error(function (error) {\r\n console." + -"log(\'Server connection error: \' + error);\r\n });\r\n $.connec" + -"tion.hub.disconnected(function () {\r\n // Disable UI\r\n " + -" $(\'#CommentsContainer\').find(\'textarea.commentInput\').attr(\'readonly\', \'read" + -"only\');\r\n $(\'#CommentsContainer\').find(\'span.action\').addClass(\'d" + -"isabled\');\r\n $(\'#AttachmentsContainer\').find(\'span.action.enabled" + -"\').addClass(\'disabled\');\r\n\r\n // Show Dialog Message\r\n " + -" if ($(\'.disconnected-dialog\').length == 0) {\r\n $(\'
    \')" + -"\r\n .addClass(\'dialog disconnected-dialog\')\r\n " + -" .html(\'

    Disconnected from the" + -" Disco ICT Server

    This page is not receiving live updates. Please ensur" + -"e you are connected to the server, then refresh this page to enable features.\')\r\n .dialog({\r\n resizable:" + -" false,\r\n title: \'Disconnected\',\r\n " + -" width: 400,\r\n modal: true,\r\n " + -" buttons: {\r\n \'Refresh Now\': function " + -"() {\r\n $(this).dialog(\'option\', \'buttons\', nu" + -"ll);\r\n window.location.reload(true);\r\n " + -" },\r\n \'Close\': function (" + -") {\r\n $(this).dialog(\'destroy\');\r\n " + -" }\r\n }\r\n }" + -");\r\n }\r\n });\r\n\r\n // Start Connection\r\n " + -" $.connection.hub.start(function () {\r\n $(\'#CommentsContain" + -"er\').find(\'span.action\').removeClass(\'disabled\');\r\n $(\'#Attachmen" + -"tsContainer\').find(\'span.action.enabled\').removeClass(\'disabled\');\r\n " + -"});\r\n\r\n //#endregion\r\n });\r\n \r\n"); +WriteLiteral(@" + $.connection.hub.qs = { JobId: jobId }; + $.connection.hub.reconnecting(function () { + $('#CommentsContainer').find('span.action').addClass('disabled'); + $('#AttachmentsContainer').find('span.action.enabled').addClass('disabled'); + }); + $.connection.hub.reconnected(function () { + $('#CommentsContainer').find('span.action').removeClass('disabled'); + $('#AttachmentsContainer').find('span.action.enabled').removeClass('disabled'); + }); + $.connection.hub.error(function (error) { + console.log('Server connection error: ' + error); + }); + $.connection.hub.disconnected(function () { + // Disable UI + $('#CommentsContainer').find('textarea.commentInput').attr('readonly', 'readonly'); + $('#CommentsContainer').find('span.action').addClass('disabled'); + $('#AttachmentsContainer').find('span.action.enabled').addClass('disabled'); + }); + + // Start Connection + $.connection.hub.start(function () { + $('#CommentsContainer').find('span.action').removeClass('disabled'); + $('#AttachmentsContainer').find('span.action.enabled').removeClass('disabled'); + }); + + //#endregion + }); + +"); - #line 624 "..\..\Views\Job\JobParts\Resources.cshtml" + #line 602 "..\..\Views\Job\JobParts\Resources.cshtml" } #line default diff --git a/Disco.Web/Views/User/Show.cshtml b/Disco.Web/Views/User/Show.cshtml index e59f673b..f1b7136a 100644 --- a/Disco.Web/Views/User/Show.cshtml +++ b/Disco.Web/Views/User/Show.cshtml @@ -147,28 +147,6 @@ // Disable UI $('#AttachmentsContainer').find('span.action.enabled').addClass('disabled'); $('#Comments').find('button').prop('disabled', true); - - // Show Dialog Message - if ($('.disconnected-dialog').length == 0) { - $('
    ') - .addClass('dialog disconnected-dialog') - .html('

    Disconnected from the Disco ICT Server

    This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.
    ') - .dialog({ - resizable: false, - title: 'Disconnected', - width: 400, - modal: true, - buttons: { - 'Refresh Now': function () { - $(this).dialog('option', 'buttons', null); - window.location.reload(true); - }, - 'Close': function () { - $(this).dialog('destroy'); - } - } - }); - } }); $.connection.hub.reconnecting(function () { diff --git a/Disco.Web/Views/User/Show.generated.cs b/Disco.Web/Views/User/Show.generated.cs index f7f8d17c..48c3dd8a 100644 --- a/Disco.Web/Views/User/Show.generated.cs +++ b/Disco.Web/Views/User/Show.generated.cs @@ -464,38 +464,21 @@ WriteLiteral(" \r\n"); +" $(\'#Comments\').find(\'button\').prop(\'disabled\', true);\r\n });\r" + +"\n\r\n $.connection.hub.reconnecting(function () {\r\n " + +" $(\'#AttachmentsContainer\').find(\'span.action.enabled\').addClass(\'disabled\');" + +"\r\n $(\'#Comments\').find(\'button\').prop(\'disabled\', true);\r\n " + +" });\r\n $.connection.hub.reconnected(function () {\r\n " + +" $(\'#AttachmentsContainer\').find(\'span.action.enabled\').removeC" + +"lass(\'disabled\');\r\n $(\'#Comments\').find(\'button\').prop(\'disab" + +"led\', false);\r\n });\r\n\r\n // Start Connection\r\n " + +" $.connection.hub.start(function () {\r\n $(\'#Attachm" + +"entsContainer\').find(\'span.action.enabled\').removeClass(\'disabled\');\r\n " + +" $(\'#Comments\').find(\'button\').prop(\'disabled\', false);\r\n " + +" });\r\n });\r\n \r\n"); - #line 190 "..\..\Views\User\Show.cshtml" + #line 168 "..\..\Views\User\Show.cshtml" }