remove disconnected dialogs

This commit is contained in:
Gary Sharp
2025-08-09 16:17:10 +10:00
parent d291ad464f
commit 57aeaa3eaa
16 changed files with 185 additions and 461 deletions
@@ -717,28 +717,6 @@
$.connection.hub.disconnected(function () { $.connection.hub.disconnected(function () {
// Disable UI // Disable UI
$Attachments.find('span.action.enabled').addClass('disabled'); $Attachments.find('span.action.enabled').addClass('disabled');
// Show Dialog Message
if ($('.disconnected-dialog').length == 0) {
$('<div>')
.addClass('dialog disconnected-dialog')
.html('<h3><span class="fa-stack fa-lg"><i class="fa fa-wifi fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x error"></i></span>Disconnected from the Disco ICT Server</h3><div>This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.</div>')
.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 // Start Connection
@@ -2346,46 +2346,34 @@ WriteLiteral(@">
#line default #line default
#line hidden #line hidden
WriteLiteral("\' };\r\n\r\n $.connection.hub.reconnecting(function () {\r\n" + WriteLiteral(@"' };
" $Attachments.find(\'span.action.enabled\').addClas" +
"s(\'disabled\');\r\n });\r\n $.c" + $.connection.hub.reconnecting(function () {
"onnection.hub.reconnected(function () {\r\n $Attach" + $Attachments.find('span.action.enabled').addClass('disabled');
"ments.find(\'span.action.enabled\').removeClass(\'disabled\');\r\n " + });
" });\r\n $.connection.hub.error(function (error)" + $.connection.hub.reconnected(function () {
" {\r\n console.log(\'Server connection error: \' + er" + $Attachments.find('span.action.enabled').removeClass('disabled');
"ror);\r\n });\r\n $.connection" + });
".hub.disconnected(function () {\r\n // Disable UI\r\n" + $.connection.hub.error(function (error) {
" $Attachments.find(\'span.action.enabled\').addClas" + console.log('Server connection error: ' + error);
"s(\'disabled\');\r\n\r\n // Show Dialog Message\r\n " + });
" if ($(\'.disconnected-dialog\').length == 0) {\r\n " + $.connection.hub.disconnected(function () {
" $(\'<div>\')\r\n " + // Disable UI
".addClass(\'dialog disconnected-dialog\')\r\n " + $Attachments.find('span.action.enabled').addClass('disabled');
" .html(\'<h3><span class=\"fa-stack fa-lg\"><i class=\"fa fa-wifi fa-stack-1x\"></i><" + });
"i class=\"fa fa-ban fa-stack-2x error\"></i></span>Disconnected from the Disco ICT" +
" Server</h3><div>This page is not receiving live updates. Please ensure you are " + // Start Connection
"connected to the server, then refresh this page to enable features.</div>\')\r\n " + $.connection.hub.start(function () {
" .dialog({\r\n " + $Attachments.find('span.action.enabled').removeClass('disabled');
" resizable: false,\r\n title" + });
": \'Disconnected\',\r\n width: 400,\r\n " +
" modal: true,\r\n " + function onAddAttachment(id, quick) {
" buttons: {\r\n \'R" + var data = { id: id };
"efresh Now\': function () {\r\n " + $.ajax({
"$(this).dialog(\'option\', \'buttons\', null);\r\n " + url: '");
" 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: \'");
#line 752 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 730 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Url.Action(MVC.API.DeviceBatch.Attachment())); 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 default
#line hidden #line hidden
#line 758 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 736 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
if (canConfig) if (canConfig)
{ {
@@ -2420,7 +2408,7 @@ WriteLiteral("buildAttachment(a, true, quick);");
WriteLiteral("\r\n"); WriteLiteral("\r\n");
#line 761 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 739 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
} }
else else
{ {
@@ -2435,7 +2423,7 @@ WriteLiteral("buildAttachment(a, false, quick);");
WriteLiteral("\r\n"); 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', '"); 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())); Write(Url.Action(MVC.API.DeviceBatch.AttachmentDownload()));
@@ -2493,7 +2481,7 @@ WriteLiteral(@"/' + a.Id);
img.attr('src', '"); 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())); Write(Url.Action(MVC.API.DeviceBatch.AttachmentThumbnail()));
@@ -2539,13 +2527,13 @@ WriteLiteral("/\' + a.Id + \'?v=\' + retryCount);\r\n
" }\r\n\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 default
#line hidden #line hidden
#line 858 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 836 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
if (canConfig) 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 default
#line hidden #line hidden
#line 945 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 923 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
if (hideAdvanced) if (hideAdvanced)
{ {
@@ -2671,7 +2659,7 @@ WriteLiteral(@">Show Advanced Options</button>
"); ");
#line 961 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 939 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
} }
@@ -2687,7 +2675,7 @@ WriteLiteral(">\r\n <th>\r\n Linked Groups:\r\n
WriteLiteral(" "); 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() Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
{ {
CanConfigure = canConfig, CanConfigure = canConfig,
@@ -2705,7 +2693,7 @@ WriteLiteral("\r\n");
WriteLiteral(" "); 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() Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
{ {
CanConfigure = canConfig, CanConfigure = canConfig,
@@ -2721,13 +2709,13 @@ WriteLiteral(" ");
WriteLiteral("\r\n"); WriteLiteral("\r\n");
#line 984 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 962 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line default #line default
#line hidden #line hidden
#line 984 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 962 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
if (canConfig) if (canConfig)
{ {
@@ -2735,14 +2723,14 @@ WriteLiteral("\r\n");
#line default #line default
#line hidden #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)); Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupShared));
#line default #line default
#line hidden #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(" </div>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>\r\n"); WriteLiteral(" </div>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>\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)); Write(Html.Partial(MVC.Config.Shared.Views._DeviceGroupDocumentBulkGenerate, Model));
@@ -2765,13 +2753,13 @@ WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n"); WriteLiteral(">\r\n");
#line 995 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 973 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line default #line default
#line hidden #line hidden
#line 995 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 973 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
if (Model.CanDecommission) if (Model.CanDecommission)
{ {
@@ -2797,13 +2785,13 @@ WriteLiteral(" title=\"Batch Device Decommission\"");
WriteLiteral(">\r\n"); WriteLiteral(">\r\n");
#line 999 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 977 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line default #line default
#line hidden #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))) using (Html.BeginForm(MVC.API.Device.DeviceBatchDecommission(Model.DeviceBatch.Id)))
{ {
@@ -2811,14 +2799,14 @@ WriteLiteral(">\r\n");
#line default #line default
#line hidden #line hidden
#line 1001 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 979 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.AntiForgeryToken()); Write(Html.AntiForgeryToken());
#line default #line default
#line hidden #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"); WriteLiteral(">\r\n");
#line 1007 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 985 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line default #line default
#line hidden #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<DecommissionReasons>().OrderBy(r => r.ToString())) foreach (DecommissionReasons decommissionReason in Enum.GetValues(typeof(DecommissionReasons)).Cast<DecommissionReasons>().OrderBy(r => r.ToString()))
{ {
@@ -2860,33 +2848,33 @@ WriteLiteral(" <li>\r\n
WriteLiteral(" type=\"radio\""); WriteLiteral(" type=\"radio\"");
WriteAttribute("id", Tuple.Create(" id=\"", 53759), Tuple.Create("\"", 53829) WriteAttribute("id", Tuple.Create(" id=\"", 52146), Tuple.Create("\"", 52216)
, Tuple.Create(Tuple.Create("", 53764), Tuple.Create("DeviceBatch_Decommission_Dialog_Reason_", 53764), true) , Tuple.Create(Tuple.Create("", 52151), Tuple.Create("DeviceBatch_Decommission_Dialog_Reason_", 52151), true)
#line 1010 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 988 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
, Tuple.Create(Tuple.Create("", 53803), Tuple.Create<System.Object, System.Int32>((int)decommissionReason , Tuple.Create(Tuple.Create("", 52190), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
#line default #line default
#line hidden #line hidden
, 53803), false) , 52190), false)
); );
WriteLiteral("\r\n name=\"decommissionReason\""); 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" #line 989 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
, Tuple.Create(Tuple.Create("", 53904), Tuple.Create<System.Object, System.Int32>((int)decommissionReason , Tuple.Create(Tuple.Create("", 52291), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
#line default #line default
#line hidden #line hidden
, 53904), false) , 52291), false)
); );
WriteLiteral(" "); 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); Write((decommissionReason == DecommissionReasons.EndOfLife) ? "checked=\"checked\"" : string.Empty);
@@ -2894,21 +2882,21 @@ WriteLiteral(" ");
#line hidden #line hidden
WriteLiteral(" />\r\n <label"); WriteLiteral(" />\r\n <label");
WriteAttribute("for", Tuple.Create(" for=\"", 54070), Tuple.Create("\"", 54141) WriteAttribute("for", Tuple.Create(" for=\"", 52457), Tuple.Create("\"", 52528)
, Tuple.Create(Tuple.Create("", 54076), Tuple.Create("DeviceBatch_Decommission_Dialog_Reason_", 54076), true) , Tuple.Create(Tuple.Create("", 52463), Tuple.Create("DeviceBatch_Decommission_Dialog_Reason_", 52463), true)
#line 1012 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 990 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
, Tuple.Create(Tuple.Create("", 54115), Tuple.Create<System.Object, System.Int32>((int)decommissionReason , Tuple.Create(Tuple.Create("", 52502), Tuple.Create<System.Object, System.Int32>((int)decommissionReason
#line default #line default
#line hidden #line hidden
, 54115), false) , 52502), false)
); );
WriteLiteral(">"); WriteLiteral(">");
#line 1012 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 990 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(decommissionReason.ReasonMessage()); Write(decommissionReason.ReasonMessage());
@@ -2917,7 +2905,7 @@ WriteLiteral(">");
WriteLiteral("</label>\r\n </li>\r\n"); WriteLiteral("</label>\r\n </li>\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 </div>\r\n"); "\r\n </div>\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(" "); WriteLiteral(" ");
#line 1054 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 1032 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
if (Model.CanDelete) if (Model.CanDelete)
{ {
@@ -3017,13 +3005,13 @@ WriteLiteral(" title=\"Delete this Device Batch?\"");
WriteLiteral(">\r\n"); WriteLiteral(">\r\n");
#line 1058 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 1036 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
#line default #line default
#line hidden #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))) using (Html.BeginForm(MVC.API.DeviceBatch.Delete(Model.DeviceBatch.Id, true)))
{ {
@@ -3031,14 +3019,14 @@ WriteLiteral(">\r\n");
#line default #line default
#line hidden #line hidden
#line 1060 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 1038 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
Write(Html.AntiForgeryToken()); Write(Html.AntiForgeryToken());
#line default #line default
#line hidden #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(" "); WriteLiteral(" ");
#line 1095 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 1073 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
if (Model.DeviceCount > 0) if (Model.DeviceCount > 0)
{ {
if (Authorization.Has(Claims.Device.Actions.Export)) if (Authorization.Has(Claims.Device.Actions.Export))
@@ -3105,14 +3093,14 @@ WriteLiteral(" ");
#line default #line default
#line hidden #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))); Write(Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.DeviceExportTypes.Batch, Model.DeviceBatch.Id)));
#line default #line default
#line hidden #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) if (Authorization.Has(Claims.Device.Search) && Model.DeviceCount > 0)
@@ -3122,14 +3110,14 @@ WriteLiteral(" ");
#line default #line default
#line hidden #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"))); 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 default
#line hidden #line hidden
#line 1103 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml" #line 1081 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
} }
} }
@@ -314,29 +314,6 @@
$.connection.hub.error(function (error) { $.connection.hub.error(function (error) {
console.log('Server connection error: ' + error); console.log('Server connection error: ' + error);
}); });
$.connection.hub.disconnected(function () {
// Show Dialog Message
if ($('.disconnected-dialog').length == 0) {
$('<div>')
.addClass('dialog disconnected-dialog')
.html('<h3><span class="fa-stack fa-lg"><i class="fa fa-wifi fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x error"></i></span>Disconnected from the Disco ICT Server</h3><div>This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.</div>')
.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() $.connection.hub.start()
.done(function () { isLive = true; }); .done(function () { isLive = true; });
@@ -473,27 +473,19 @@ WriteLiteral(@"',
#line default #line default
#line hidden #line hidden
WriteLiteral("\' };\r\n $.connection.hub.error(function (error) {\r\n cons" + WriteLiteral(@"' };
"ole.log(\'Server connection error: \' + error);\r\n });\r\n $.co" + $.connection.hub.error(function (error) {
"nnection.hub.disconnected(function () {\r\n // Show Dialog Message\r" + console.log('Server connection error: ' + error);
"\n if ($(\'.disconnected-dialog\').length == 0) {\r\n " + });
" $(\'<div>\')\r\n .addClass(\'dialog disconnected-dialog\')\r\n" +
" .html(\'<h3><span class=\"fa-stack fa-lg\"><i class=\"fa fa-" + $.connection.hub.start()
"wifi fa-stack-1x\"></i><i class=\"fa fa-ban fa-stack-2x error\"></i></span>Disconne" + .done(function () { isLive = true; });
"cted from the Disco ICT Server</h3><div>This page is not receiving live updates." +
" Please ensure you are connected to the server, then refresh this page to enable" + }
" features.</div>\')\r\n .dialog({\r\n " + init();
" resizable: false,\r\n title: \'Disconnected\',\r\n " + });
" width: 400,\r\n modal: true,\r\n " + </script>
" 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</script>\r\n");
} }
} }
@@ -412,29 +412,6 @@
$.connection.hub.error(function (error) { $.connection.hub.error(function (error) {
console.log('Server connection error: ' + error); console.log('Server connection error: ' + error);
}); });
$.connection.hub.disconnected(function (error) {
// Show Dialog Message
if ($('.disconnected-dialog').length == 0) {
$('<div>')
.addClass('dialog disconnected-dialog')
.html('<h3><span class="fa-stack fa-lg"><i class="fa fa-wifi fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x error"></i></span>Disconnected from the Disco ICT Server</h3><div>This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.</div>')
.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() $.connection.hub.start()
.done(function () { isLive = true; }); .done(function () { isLive = true; });
@@ -823,35 +823,33 @@ WriteLiteral(@"',
#line default #line default
#line hidden #line hidden
WriteLiteral("\' };\r\n $.connection.hub.error(function (error) {\r\n cons" + WriteLiteral(@"' };
"ole.log(\'Server connection error: \' + error);\r\n });\r\n $.co" + $.connection.hub.error(function (error) {
"nnection.hub.disconnected(function (error) {\r\n // Show Dialog Mes" + console.log('Server connection error: ' + error);
"sage\r\n if ($(\'.disconnected-dialog\').length == 0) {\r\n " + });
" $(\'<div>\')\r\n .addClass(\'dialog disconnected-dialo" +
"g\')\r\n .html(\'<h3><span class=\"fa-stack fa-lg\"><i class=\"f" + $.connection.hub.start()
"a fa-wifi fa-stack-1x\"></i><i class=\"fa fa-ban fa-stack-2x error\"></i></span>Dis" + .done(function () { isLive = true; });
"connected from the Disco ICT Server</h3><div>This page is not receiving live upd" +
"ates. Please ensure you are connected to the server, then refresh this page to e" + }
"nable features.</div>\')\r\n .dialog({\r\n " + $('#dialogSession').on('click', '#formResolveSessionPending button', function (e) {
" resizable: false,\r\n title: \'Disconnected\',\r\n " + const $button = $(this);
" width: 400,\r\n modal: true," + const $form = $button.closest('form');
"\r\n buttons: {\r\n \'Refre" + const body = new FormData($form[0]);
"sh Now\': function () {\r\n $(this).dialog(\'opti" + body.append('approve', $button.val());
"on\', \'buttons\', null);\r\n window.location.relo" + fetch($form.attr('action'), {
"ad(true);\r\n },\r\n \'" + method: 'POST',
"Close\': function () {\r\n $(this).dialog(\'destr" + body: body
"oy\');\r\n }\r\n }\r\n " + }).then(function (response) {
" });\r\n }\r\n });\r\n\r\n $.connec" + if (!response.ok) {
"tion.hub.start()\r\n .done(function () { isLive = true; });\r\n\r\n " + alert('Failed to resolve pending session: ' + response.statusText);
" }\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" + init();
"(\'action\'), {\r\n method: \'POST\',\r\n body: body\r\n " + });
" }).then(function (response) {\r\n if (!response.ok) {\r\n " + </script>
" alert(\'Failed to resolve pending session: \' + response.statusTex" + ");
"t);\r\n }\r\n });\r\n });\r\n init();\r\n });\r\n" +
"</script>\r\n");
} }
} }
@@ -124,29 +124,6 @@
$.connection.hub.error(function (error) { $.connection.hub.error(function (error) {
console.log('Server connection error: ' + error); console.log('Server connection error: ' + error);
}); });
$.connection.hub.disconnected(function () {
// Show Dialog Message
if ($('.disconnected-dialog').length == 0) {
$('<div>')
.addClass('dialog disconnected-dialog')
.html('<h3><span class="fa-stack fa-lg"><i class="fa fa-wifi fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x error"></i></span>Disconnected from the Disco ICT Server</h3><div>This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.</div>')
.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(); $.connection.hub.start();
} }
@@ -331,28 +331,9 @@ WriteLiteral("\',\r\n dataType: \'json\',\r\n
" };\r\n\r\n $.connection.hub.qs = {LogModules: logModule" + " };\r\n\r\n $.connection.hub.qs = {LogModules: logModule" +
"LiveGroupName};\r\n $.connection.hub.error(function (error) {\r\n" + "LiveGroupName};\r\n $.connection.hub.error(function (error) {\r\n" +
" console.log(\'Server connection error: \' + error);\r\n " + " console.log(\'Server connection error: \' + error);\r\n " +
" });\r\n $.connection.hub.disconnected(function (" + " });\r\n\r\n $.connection.hub.start();\r\n " +
") {\r\n // Show Dialog Message\r\n if " + " }\r\n }\r\n\r\n loadInitialData();\r\n });\r\n </scri" +
"($(\'.disconnected-dialog\').length == 0) {\r\n $(\'<div>\'" + "pt>\r\n</div>\r\n");
")\r\n .addClass(\'dialog disconnected-dialog\')\r\n " +
" .html(\'<h3><span class=\"fa-stack fa-lg\"><i class=\"fa" +
" fa-wifi fa-stack-1x\"></i><i class=\"fa fa-ban fa-stack-2x error\"></i></span>Disc" +
"onnected from the Disco ICT Server</h3><div>This page is not receiving live upda" +
"tes. Please ensure you are connected to the server, then refresh this page to en" +
"able features.</div>\')\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 </script>\r\n</div>\r\n");
} }
} }
@@ -249,29 +249,6 @@
$.connection.hub.error(function (error) { $.connection.hub.error(function (error) {
console.log('Server connection error: ' + error); console.log('Server connection error: ' + error);
}); });
$.connection.hub.disconnected(function () {
// Show Dialog Message
if ($('.disconnected-dialog').length == 0) {
$('<div>')
.addClass('dialog disconnected-dialog')
.html('<h3><span class="fa-stack fa-lg"><i class="fa fa-wifi fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x error"></i></span>Disconnected from the Disco ICT Server</h3><div>This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.</div>')
.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() $.connection.hub.start()
.fail(onHubFailed); .fail(onHubFailed);
@@ -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 = {" + "sHub.client.updateTaskStatus = vm.Update;\r\n\r\n $.connection.hub.qs = {" +
" TaskSessionId: sessionId };\r\n $.connection.hub.error(function (error" + " TaskSessionId: sessionId };\r\n $.connection.hub.error(function (error" +
") {\r\n console.log(\'Server connection error: \' + error);\r\n " + ") {\r\n console.log(\'Server connection error: \' + error);\r\n " +
" });\r\n $.connection.hub.disconnected(function () {\r\n " + " });\r\n\r\n $.connection.hub.start()\r\n .fail(onHubFail" +
" // Show Dialog Message\r\n if ($(\'.disconnected-dialog\').length =" + "ed);\r\n }\r\n\r\n });\r\n</script>\r\n");
"= 0) {\r\n $(\'<div>\')\r\n .addClass(\'dialo" +
"g disconnected-dialog\')\r\n .html(\'<h3><span class=\"fa-stac" +
"k fa-lg\"><i class=\"fa fa-wifi fa-stack-1x\"></i><i class=\"fa fa-ban fa-stack-2x e" +
"rror\"></i></span>Disconnected from the Disco ICT Server</h3><div>This page is no" +
"t receiving live updates. Please ensure you are connected to the server, then re" +
"fresh this page to enable features.</div>\')\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</script>\r\n");
} }
} }
-22
View File
@@ -157,28 +157,6 @@
// Disable UI // Disable UI
$('#AttachmentsContainer').find('span.action.enabled').addClass('disabled'); $('#AttachmentsContainer').find('span.action.enabled').addClass('disabled');
$('#Comments').find('button').prop('disabled', true); $('#Comments').find('button').prop('disabled', true);
// Show Dialog Message
if ($('.disconnected-dialog').length == 0) {
$('<div>')
.addClass('dialog disconnected-dialog')
.html('<h3><span class="fa-stack fa-lg"><i class="fa fa-wifi fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x error"></i></span>Disconnected from the Disco ICT Server</h3><div>This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.</div>')
.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 () { $.connection.hub.reconnecting(function () {
+13 -30
View File
@@ -522,38 +522,21 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
";\r\n $.connection.hub.disconnected(function () {\r\n " + ";\r\n $.connection.hub.disconnected(function () {\r\n " +
" // Disable UI\r\n $(\'#AttachmentsContainer\').find(\'span.act" + " // Disable UI\r\n $(\'#AttachmentsContainer\').find(\'span.act" +
"ion.enabled\').addClass(\'disabled\');\r\n $(\'#Comments\').find(\'bu" + "ion.enabled\').addClass(\'disabled\');\r\n $(\'#Comments\').find(\'bu" +
"tton\').prop(\'disabled\', true);\r\n\r\n // Show Dialog Message\r\n " + "tton\').prop(\'disabled\', true);\r\n });\r\n\r\n $.connect" +
" if ($(\'.disconnected-dialog\').length == 0) {\r\n " + "ion.hub.reconnecting(function () {\r\n $(\'#AttachmentsContainer" +
" $(\'<div>\')\r\n .addClass(\'dialog disconnected-d" + "\').find(\'span.action.enabled\').addClass(\'disabled\');\r\n $(\'#Co" +
"ialog\')\r\n .html(\'<h3><span class=\"fa-stack fa-lg\"><i " + "mments\').find(\'button\').prop(\'disabled\', true);\r\n });\r\n " +
"class=\"fa fa-wifi fa-stack-1x\"></i><i class=\"fa fa-ban fa-stack-2x error\"></i></" + " $.connection.hub.reconnected(function () {\r\n $(\'#Attach" +
"span>Disconnected from the Disco ICT Server</h3><div>This page is not receiving " + "mentsContainer\').find(\'span.action.enabled\').removeClass(\'disabled\');\r\n " +
"live updates. Please ensure you are connected to the server, then refresh this p" + " $(\'#Comments\').find(\'button\').prop(\'disabled\', false);\r\n " +
"age to enable features.</div>\')\r\n .dialog({\r\n " + " });\r\n\r\n // Start Connection\r\n $.connection.hub." +
" resizable: false,\r\n title" + "start(function () {\r\n $(\'#AttachmentsContainer\').find(\'span.a" +
": \'Disconnected\',\r\n width: 400,\r\n " + "ction.enabled\').removeClass(\'disabled\');\r\n $(\'#Comments\').fin" +
" modal: true,\r\n buttons: {\r\n " + "d(\'button\').prop(\'disabled\', false);\r\n });\r\n });\r\n " +
" \'Refresh Now\': function () {\r\n " + " </script>\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 $.connec" +
"tion.hub.reconnecting(function () {\r\n $(\'#AttachmentsContaine" +
"r\').find(\'span.action.enabled\').addClass(\'disabled\');\r\n $(\'#C" +
"omments\').find(\'button\').prop(\'disabled\', true);\r\n });\r\n " +
" $.connection.hub.reconnected(function () {\r\n $(\'#Attac" +
"hmentsContainer\').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." +
"action.enabled\').removeClass(\'disabled\');\r\n $(\'#Comments\').fi" +
"nd(\'button\').prop(\'disabled\', false);\r\n });\r\n });\r\n " +
" </script>\r\n");
#line 200 "..\..\Views\Device\Show.cshtml" #line 178 "..\..\Views\Device\Show.cshtml"
} }
@@ -588,28 +588,6 @@
$('#CommentsContainer').find('textarea.commentInput').attr('readonly', 'readonly'); $('#CommentsContainer').find('textarea.commentInput').attr('readonly', 'readonly');
$('#CommentsContainer').find('span.action').addClass('disabled'); $('#CommentsContainer').find('span.action').addClass('disabled');
$('#AttachmentsContainer').find('span.action.enabled').addClass('disabled'); $('#AttachmentsContainer').find('span.action.enabled').addClass('disabled');
// Show Dialog Message
if ($('.disconnected-dialog').length == 0) {
$('<div>')
.addClass('dialog disconnected-dialog')
.html('<h3><span class="fa-stack fa-lg"><i class="fa fa-wifi fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x error"></i></span>Disconnected from the Disco ICT Server</h3><div>This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.</div>')
.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 // Start Connection
@@ -1297,43 +1297,39 @@ WriteLiteral(@"
#line default #line default
#line hidden #line hidden
WriteLiteral("\r\n $.connection.hub.qs = { JobId: jobId };\r\n $.connection.h" + WriteLiteral(@"
"ub.reconnecting(function () {\r\n $(\'#CommentsContainer\').find(\'spa" + $.connection.hub.qs = { JobId: jobId };
"n.action\').addClass(\'disabled\');\r\n $(\'#AttachmentsContainer\').fin" + $.connection.hub.reconnecting(function () {
"d(\'span.action.enabled\').addClass(\'disabled\');\r\n });\r\n $.c" + $('#CommentsContainer').find('span.action').addClass('disabled');
"onnection.hub.reconnected(function () {\r\n $(\'#CommentsContainer\')" + $('#AttachmentsContainer').find('span.action.enabled').addClass('disabled');
".find(\'span.action\').removeClass(\'disabled\');\r\n $(\'#AttachmentsCo" + });
"ntainer\').find(\'span.action.enabled\').removeClass(\'disabled\');\r\n });\r" + $.connection.hub.reconnected(function () {
"\n $.connection.hub.error(function (error) {\r\n console." + $('#CommentsContainer').find('span.action').removeClass('disabled');
"log(\'Server connection error: \' + error);\r\n });\r\n $.connec" + $('#AttachmentsContainer').find('span.action.enabled').removeClass('disabled');
"tion.hub.disconnected(function () {\r\n // Disable UI\r\n " + });
" $(\'#CommentsContainer\').find(\'textarea.commentInput\').attr(\'readonly\', \'read" + $.connection.hub.error(function (error) {
"only\');\r\n $(\'#CommentsContainer\').find(\'span.action\').addClass(\'d" + console.log('Server connection error: ' + error);
"isabled\');\r\n $(\'#AttachmentsContainer\').find(\'span.action.enabled" + });
"\').addClass(\'disabled\');\r\n\r\n // Show Dialog Message\r\n " + $.connection.hub.disconnected(function () {
" if ($(\'.disconnected-dialog\').length == 0) {\r\n $(\'<div>\')" + // Disable UI
"\r\n .addClass(\'dialog disconnected-dialog\')\r\n " + $('#CommentsContainer').find('textarea.commentInput').attr('readonly', 'readonly');
" .html(\'<h3><span class=\"fa-stack fa-lg\"><i class=\"fa fa-wifi fa-stack" + $('#CommentsContainer').find('span.action').addClass('disabled');
"-1x\"></i><i class=\"fa fa-ban fa-stack-2x error\"></i></span>Disconnected from the" + $('#AttachmentsContainer').find('span.action.enabled').addClass('disabled');
" Disco ICT Server</h3><div>This page is not receiving live updates. Please ensur" + });
"e you are connected to the server, then refresh this page to enable features.</d" +
"iv>\')\r\n .dialog({\r\n resizable:" + // Start Connection
" false,\r\n title: \'Disconnected\',\r\n " + $.connection.hub.start(function () {
" width: 400,\r\n modal: true,\r\n " + $('#CommentsContainer').find('span.action').removeClass('disabled');
" buttons: {\r\n \'Refresh Now\': function " + $('#AttachmentsContainer').find('span.action.enabled').removeClass('disabled');
"() {\r\n $(this).dialog(\'option\', \'buttons\', nu" + });
"ll);\r\n window.location.reload(true);\r\n " +
" },\r\n \'Close\': function (" + //#endregion
") {\r\n $(this).dialog(\'destroy\');\r\n " + });
" }\r\n }\r\n }" + </script>
");\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 </script>\r\n");
#line 624 "..\..\Views\Job\JobParts\Resources.cshtml" #line 602 "..\..\Views\Job\JobParts\Resources.cshtml"
} }
#line default #line default
-22
View File
@@ -147,28 +147,6 @@
// Disable UI // Disable UI
$('#AttachmentsContainer').find('span.action.enabled').addClass('disabled'); $('#AttachmentsContainer').find('span.action.enabled').addClass('disabled');
$('#Comments').find('button').prop('disabled', true); $('#Comments').find('button').prop('disabled', true);
// Show Dialog Message
if ($('.disconnected-dialog').length == 0) {
$('<div>')
.addClass('dialog disconnected-dialog')
.html('<h3><span class="fa-stack fa-lg"><i class="fa fa-wifi fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x error"></i></span>Disconnected from the Disco ICT Server</h3><div>This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.</div>')
.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 () { $.connection.hub.reconnecting(function () {
+13 -30
View File
@@ -464,38 +464,21 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
" error);\r\n });\r\n $.connection.hub.disconnected(fun" + " error);\r\n });\r\n $.connection.hub.disconnected(fun" +
"ction () {\r\n // Disable UI\r\n $(\'#Attachmen" + "ction () {\r\n // Disable UI\r\n $(\'#Attachmen" +
"tsContainer\').find(\'span.action.enabled\').addClass(\'disabled\');\r\n " + "tsContainer\').find(\'span.action.enabled\').addClass(\'disabled\');\r\n " +
" $(\'#Comments\').find(\'button\').prop(\'disabled\', true);\r\n\r\n " + " $(\'#Comments\').find(\'button\').prop(\'disabled\', true);\r\n });\r" +
" // Show Dialog Message\r\n if ($(\'.disconnected-dialog\').leng" + "\n\r\n $.connection.hub.reconnecting(function () {\r\n " +
"th == 0) {\r\n $(\'<div>\')\r\n .add" + " $(\'#AttachmentsContainer\').find(\'span.action.enabled\').addClass(\'disabled\');" +
"Class(\'dialog disconnected-dialog\')\r\n .html(\'<h3><spa" + "\r\n $(\'#Comments\').find(\'button\').prop(\'disabled\', true);\r\n " +
"n class=\"fa-stack fa-lg\"><i class=\"fa fa-wifi fa-stack-1x\"></i><i class=\"fa fa-b" + " });\r\n $.connection.hub.reconnected(function () {\r\n " +
"an fa-stack-2x error\"></i></span>Disconnected from the Disco ICT Server</h3><div" + " $(\'#AttachmentsContainer\').find(\'span.action.enabled\').removeC" +
">This page is not receiving live updates. Please ensure you are connected to the" + "lass(\'disabled\');\r\n $(\'#Comments\').find(\'button\').prop(\'disab" +
" server, then refresh this page to enable features.</div>\')\r\n " + "led\', false);\r\n });\r\n\r\n // Start Connection\r\n " +
" .dialog({\r\n resizable: false,\r\n " + " $.connection.hub.start(function () {\r\n $(\'#Attachm" +
" title: \'Disconnected\',\r\n w" + "entsContainer\').find(\'span.action.enabled\').removeClass(\'disabled\');\r\n " +
"idth: 400,\r\n modal: true,\r\n " + " $(\'#Comments\').find(\'button\').prop(\'disabled\', false);\r\n " +
" buttons: {\r\n \'Refresh Now\': functio" + " });\r\n });\r\n </script>\r\n");
"n () {\r\n $(this).dialog(\'option\', \'button" +
"s\', null);\r\n window.location.reload(true)" +
";\r\n },\r\n \'" +
"Close\': function () {\r\n $(this).dialog(\'d" +
"estroy\');\r\n }\r\n " +
" }\r\n });\r\n }\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\').remove" +
"Class(\'disabled\');\r\n $(\'#Comments\').find(\'button\').prop(\'disa" +
"bled\', false);\r\n });\r\n\r\n // Start Connection\r\n " +
" $.connection.hub.start(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 </script>\r\n");
#line 190 "..\..\Views\User\Show.cshtml" #line 168 "..\..\Views\User\Show.cshtml"
} }