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/Components/ListODL.razor.cs b/MP.SPEC/Components/ListODL.razor.cs
index f727f6e9..4be64bc9 100644
--- a/MP.SPEC/Components/ListODL.razor.cs
+++ b/MP.SPEC/Components/ListODL.razor.cs
@@ -3,7 +3,8 @@ using Microsoft.JSInterop;
using MP.Data;
using MP.Data.DatabaseModels;
using MP.SPEC.Data;
-using System.Formats.Asn1;
+using MP.SPEC.Pages;
+using System.Xml.Linq;
namespace MP.SPEC.Components
{
@@ -41,9 +42,31 @@ namespace MP.SPEC.Components
public string formDurata(double durataMin)
{
- return Utils.FormDurata(durataMin);
+ return MP.Data.Utils.FormDurata(durataMin);
}
+ //oggetto contenente le funzioni del code behind che sono jsInvokable
+ private DotNetObjectReference
? objRef;
+
+#if true //FUNZIONA SE IL METODO TriggerDotNetInstanceMethod() E' IN ONCLOCK BOTTONE
+
+ [JSInvokable]
+ public void svuotaRecord()
+ {
+ currRecord = null;
+
+ }
+ [JSInvokable]
+ public void setHelper()
+ {
+ objRef = DotNetObjectReference.Create(this);
+ }
+ public async Task TriggerDotNetInstanceMethod()
+ {
+ await JSRuntime.InvokeVoidAsync("recordDeselect", objRef);
+ }
+#endif
+
#endregion Public Methods
#region Protected Properties
@@ -80,6 +103,8 @@ namespace MP.SPEC.Components
protected override async Task OnInitializedAsync()
{
ListStati = await MDService.AnagStatiComm();
+ objRef = DotNetObjectReference.Create(this);
+ //await JSRuntime.InvokeVoidAsync("setHelper", objRef);
}
protected override async Task OnParametersSetAsync()
@@ -90,7 +115,7 @@ namespace MP.SPEC.Components
protected string colorChanger(string colorCSS)
{
string answ = "";
- if(colorCSS == "yellow")
+ if (colorCSS == "yellow")
{
answ = "text-dark";
}
diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj
index e6b87a80..a10c3528 100644
--- a/MP.SPEC/MP.SPEC.csproj
+++ b/MP.SPEC/MP.SPEC.csproj
@@ -5,7 +5,7 @@
enable
enable
MP.SPEC
- 6.16.2210.1711
+ 6.16.2210.1715
diff --git a/MP.SPEC/Pages/ODL.razor b/MP.SPEC/Pages/ODL.razor
index 8356082c..e1d49972 100644
--- a/MP.SPEC/Pages/ODL.razor
+++ b/MP.SPEC/Pages/ODL.razor
@@ -102,4 +102,3 @@
-
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/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html
index 20236b47..4d586f32 100644
--- a/MP.SPEC/Resources/ChangeLog.html
+++ b/MP.SPEC/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOSPEC
- Versione: 6.16.2210.1711
+ Versione: 6.16.2210.1715
Note di rilascio:
-
diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt
index 4169a5c0..9c48c79c 100644
--- a/MP.SPEC/Resources/VersNum.txt
+++ b/MP.SPEC/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2210.1711
+6.16.2210.1715
diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml
index 3c1947ad..e06c02e3 100644
--- a/MP.SPEC/Resources/manifest.xml
+++ b/MP.SPEC/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2210.1711
+ 6.16.2210.1715
https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip
https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html
false
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