remove disconnected dialogs
This commit is contained in:
@@ -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) {
|
||||
$('<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();
|
||||
}
|
||||
|
||||
@@ -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 $(\'<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>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");
|
||||
" });\r\n\r\n $.connection.hub.start();\r\n " +
|
||||
" }\r\n }\r\n\r\n loadInitialData();\r\n });\r\n </scri" +
|
||||
"pt>\r\n</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
$('<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()
|
||||
.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 = {" +
|
||||
" 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 $(\'<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");
|
||||
" });\r\n\r\n $.connection.hub.start()\r\n .fail(onHubFail" +
|
||||
"ed);\r\n }\r\n\r\n });\r\n</script>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user