diff --git a/MP.SPEC/Components/ListODL.razor b/MP.SPEC/Components/ListODL.razor index 2ae52f3a..8937c9d6 100644 --- a/MP.SPEC/Components/ListODL.razor +++ b/MP.SPEC/Components/ListODL.razor @@ -110,7 +110,7 @@ else @record.DurataMinuti
- +
@@ -118,7 +118,7 @@ else } - - diff --git a/MP.SPEC/Pages/_Layout.cshtml b/MP.SPEC/Pages/_Layout.cshtml index e1d1070d..e20191f1 100644 --- a/MP.SPEC/Pages/_Layout.cshtml +++ b/MP.SPEC/Pages/_Layout.cshtml @@ -32,8 +32,8 @@ - + @*Gestione autoriconnessione: https://github.com/dotnet/aspnetcore/issues/38305 (vedere anche https://docs.microsoft.com/it-it/aspnet/core/blazor/fundamentals/signalr?view=aspnetcore-6.0#modify-the-reconnection-handler-blazor-server)*@ diff --git a/MP.SPEC/wwwroot/lib/chartBoot.js b/MP.SPEC/wwwroot/lib/chartBoot.js index 50401512..d8e9de3e 100644 --- a/MP.SPEC/wwwroot/lib/chartBoot.js +++ b/MP.SPEC/wwwroot/lib/chartBoot.js @@ -1,20 +1,12 @@ ///Setup del chart desiderato con id univoco window.setup = (id, config) => { var ctx = document.getElementById(id).getContext('2d'); - //let currentDate = new Date(); - //console.log(currentDate + " - Calling setup..."); - console.log(id); if (window['myChart'] instanceof Chart) { - //window.myChart.destroy(); window['myChart'].destroy(); - console.log("Chart " + id + " destroyed!"); window['myChart'] = new Chart(ctx, config); } - else - { + else { window['myChart'] = new Chart(ctx, config); - //console.log("Chart " + id + " created!"); - console.log(window['myChart']); } } \ No newline at end of file diff --git a/MP.SPEC/wwwroot/lib/modalHandler.js b/MP.SPEC/wwwroot/lib/modalHandler.js new file mode 100644 index 00000000..d951b3a5 --- /dev/null +++ b/MP.SPEC/wwwroot/lib/modalHandler.js @@ -0,0 +1,32 @@ +//window.recordDeselect = (dotNetHelper) => { +// var myModalEl = document.getElementById('myModal') +// myModalEl.addEventListener('hidden.bs.modal', function (event) { +// // do something... +// //dotNetHelper.invokeMethodAsync('TriggerDotNetInstanceMethod'); +// return dotNetHelper.invokeMethodAsync('svuotaRecord'); +// console.log("fatto"); +// }); +//}; + + +//TENTATIVO POPOLAMENTO HELPER PER POTER INVOCARE IL METODO DOPO +//let helper; + +//window.setHelper = (dotNetHelper) => { +// helper = dotNetHelper.invokeMethodAsync('setHelper'); +// console.log(helper); +// return dotNetHelper.invokeMethodAsync('setHelper'); +//} + +//BECCA QUANDO LA MODALE VIENE CHIUSA ED ESEGUE +document.addEventListener('click', function (e) { + if (e.target.id === 'myModal') { + console.log('chiuso'); + + return helper.invokeMethodAsync('svuotaRecord'); + console.log("fatto"); + } else { + console.log('aperto'); + } + e.stopPropagation(); +}, false); \ No newline at end of file