remove disconnected dialogs
This commit is contained in:
@@ -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) {
|
||||
$('<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 () {
|
||||
|
||||
@@ -522,38 +522,21 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
|
||||
";\r\n $.connection.hub.disconnected(function () {\r\n " +
|
||||
" // Disable UI\r\n $(\'#AttachmentsContainer\').find(\'span.act" +
|
||||
"ion.enabled\').addClass(\'disabled\');\r\n $(\'#Comments\').find(\'bu" +
|
||||
"tton\').prop(\'disabled\', true);\r\n\r\n // Show Dialog Message\r\n " +
|
||||
" if ($(\'.disconnected-dialog\').length == 0) {\r\n " +
|
||||
" $(\'<div>\')\r\n .addClass(\'dialog disconnected-d" +
|
||||
"ialog\')\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>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 p" +
|
||||
"age 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 $.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");
|
||||
"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 " +
|
||||
" </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('span.action').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
|
||||
|
||||
@@ -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 $(\'<div>\')" +
|
||||
"\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>Disconnected from the" +
|
||||
" 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:" +
|
||||
" 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 </script>\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
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
|
||||
#line 624 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
#line 602 "..\..\Views\Job\JobParts\Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
|
||||
@@ -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) {
|
||||
$('<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 () {
|
||||
|
||||
@@ -464,38 +464,21 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
|
||||
" error);\r\n });\r\n $.connection.hub.disconnected(fun" +
|
||||
"ction () {\r\n // Disable UI\r\n $(\'#Attachmen" +
|
||||
"tsContainer\').find(\'span.action.enabled\').addClass(\'disabled\');\r\n " +
|
||||
" $(\'#Comments\').find(\'button\').prop(\'disabled\', true);\r\n\r\n " +
|
||||
" // Show Dialog Message\r\n if ($(\'.disconnected-dialog\').leng" +
|
||||
"th == 0) {\r\n $(\'<div>\')\r\n .add" +
|
||||
"Class(\'dialog disconnected-dialog\')\r\n .html(\'<h3><spa" +
|
||||
"n class=\"fa-stack fa-lg\"><i class=\"fa fa-wifi fa-stack-1x\"></i><i class=\"fa fa-b" +
|
||||
"an 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>\')\r\n " +
|
||||
" .dialog({\r\n resizable: false,\r\n " +
|
||||
" title: \'Disconnected\',\r\n w" +
|
||||
"idth: 400,\r\n modal: true,\r\n " +
|
||||
" buttons: {\r\n \'Refresh Now\': functio" +
|
||||
"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");
|
||||
" $(\'#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 </script>\r\n");
|
||||
|
||||
|
||||
#line 190 "..\..\Views\User\Show.cshtml"
|
||||
#line 168 "..\..\Views\User\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user