diff --git a/Disco.Web/Areas/Config/Views/Shared/TaskStatus.cshtml b/Disco.Web/Areas/Config/Views/Shared/TaskStatus.cshtml index de6a36e8..dba08553 100644 --- a/Disco.Web/Areas/Config/Views/Shared/TaskStatus.cshtml +++ b/Disco.Web/Areas/Config/Views/Shared/TaskStatus.cshtml @@ -250,8 +250,7 @@ console.log('Server connection error: ' + error); }); - $.connection.hub.start() - .fail(onHubFailed); + $.connection.hub.start(); } }); diff --git a/Disco.Web/Areas/Config/Views/Shared/TaskStatus.generated.cs b/Disco.Web/Areas/Config/Views/Shared/TaskStatus.generated.cs index f84c8064..e9d2169f 100644 --- a/Disco.Web/Areas/Config/Views/Shared/TaskStatus.generated.cs +++ b/Disco.Web/Areas/Config/Views/Shared/TaskStatus.generated.cs @@ -281,8 +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\r\n $.connection.hub.start()\r\n .fail(onHubFail" + -"ed);\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\r\n"); } } diff --git a/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.js b/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.js index b7b54a5b..309e61d1 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.js +++ b/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.js @@ -29,7 +29,7 @@ if (!document.DiscoFunctions.PropertyChangeHelper) { const body = new FormData(); body.append('__RequestVerificationToken', document.body.dataset.antiforgery); - if (!data) { + if (data) { for (const prop in data) { body.append(prop, data[prop]); } diff --git a/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.min.js b/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.min.js index 1c5e2e29..bb5ff73e 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.min.js +++ b/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.min.js @@ -1 +1 @@ -if(document.DiscoFunctions||(document.DiscoFunctions={}),document.DiscoFunctions.PropertyChangeHelper||(document.DiscoFunctions.PropertyValue=function(n){return n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="checkbox"?n.is(":checked"):n.val()},document.DiscoFunctions.PropertyChangeHelper=function(n,t,i,r,u,f){var h=document.DiscoFunctions.PropertyValue(n),o=null,e=n.nextAll(".ajaxSave").first(),s=n.nextAll(".ajaxLoading").first(),c=function(){e.hide();var t=document.DiscoFunctions.PropertyValue(n);if(h!=t){if(f&&!f(t))return;h=t;o&&window.clearTimeout(o);o=window.setTimeout(async function(){s.show();const n=new FormData;if(n.append("__RequestVerificationToken",document.body.dataset.antiforgery),!u)for(const t in u)n.append(t,u[t]);n.append(r,h);try{const t=await fetch(i,{method:"POST",body:n});t.ok?s.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow"):(alert('Unable to change property "'+r+'":\n'+t.statusText),s.hide())}catch(t){alert('Unable to change property "'+r+'":\n'+t);s.hide()}o=null},500)}};n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="checkbox"?n.click(c):n.change(c);n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="text"&&(n.keydown(function(n){e.show();n.which==13&&$(this).blur()}).blur(function(){e.hide()}).focus(function(){$(this).select()}),t&&n.watermark(t));n[0].nodeName.toLowerCase()=="textarea"&&n.keydown(function(){e.show()}).blur(function(){e.hide()})}),document.DiscoFunctions.DateChangeUserHelper||(document.DiscoFunctions.DateChangeUserHelper=function(n,t,i,r,u,f,e){var h=n.val(),o=null,s=t.next(".ajaxLoading");n.watermark(i).change(function(){var i=n.val();h.toLowerCase()!=i.toLowerCase()&&(h=i,o&&window.clearTimeout(o),o=window.setTimeout(async function(){s.show();const n=new FormData;n.append("__RequestVerificationToken",document.body.dataset.antiforgery);n.append(u,h);try{const i=await fetch(r,{method:"POST",body:n});if(i.ok){const n=await i.json();t.text("by "+n.UserDescription);s.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow")}else alert("Unable to change Date:\n"+i.statusText),s.hide()}catch(i){alert("Unable to change Date:\n"+response.statusText);s.hide()}o=null},500))}).focus(function(){$(this).select()});e?n.datepicker({defaultDate:new Date,minDate:moment(f).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datepicker("setDate",new Date)}}):n.datetimepicker({defaultDate:new Date,ampm:!0,minDate:moment(f).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datetimepicker("setDate",new Date)}})}),document.DiscoFunctions.DateChangeHelper||(document.DiscoFunctions.DateChangeHelper=function(n,t,i,r,u,f){var s=n.val(),e=null,o=n.next(".ajaxLoading");n.watermark(t).change(function(){var t=n.val();s.toLowerCase()!=t.toLowerCase()&&(s=t,e&&window.clearTimeout(e),e=window.setTimeout(async function(){o.show();const n=new FormData;n.append("__RequestVerificationToken",document.body.dataset.antiforgery);n.append(r,s);try{const t=await fetch(i,{method:"POST",body:n});t.ok?o.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow"):(alert("Unable to change Date:\n"+t.statusText),o.hide())}catch(t){alert("Unable to change Date:\n"+response.statusText);o.hide()}e=null},500))}).focus(function(){$(this).select()});f?n.datepicker({defaultDate:new Date,minDate:moment(u).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datepicker("setDate",new Date)}}):n.datetimepicker({defaultDate:new Date,ampm:!0,minDate:moment(u).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datetimepicker("setDate",new Date)}})}),!document.DiscoFunctions.DateDialogCreateUpdater){var dialog,dialogForm,dialogHeader,dialogDateBox,dialogDatePropertyNameBox,updateUrl,friendlyName,dateField,userField,updatePropertyName,notSetDisplay,minDate,useAjax;function n(){if(!dialog){dialog=$("