Added auto-save for graphs. Iteraion 1.

This commit is contained in:
Oleg Sh
2025-01-01 20:18:01 +01:00
parent 20b8377651
commit 7aa6eb8ed1
14 changed files with 400 additions and 37 deletions

View File

@@ -48,4 +48,33 @@ DiskSaveLoad.SaveGraphImageOnDisk = function (imageName, rectParams, imageBase64
dataType: "text",
success: callback
});
}
}
DiskSaveLoad.SaveAutoSaveGraphOnDisk = function (savedGraphName, graphAsString, callback)
{
$.ajax({
type: "POST",
url: "/" + SiteDir + "backend/saveGraph.php?name=autosave_" + savedGraphName,
data: graphAsString,
dataType: "text"
})
.done(callback);
}
DiskSaveLoad.LoadAutoSaveGraphFromDisk = function (graphName, callback)
{
$.ajax({
type: "GET",
url: "/" + SiteDir + "backend/loadGraph.php?name=autosave_" + graphName
})
.done(callback);
}
DiskSaveLoad.RemoveAutoSaveGraphFromDisk = function (graphName, callback)
{
$.ajax({
type: "GET",
url: "/" + SiteDir + "backend/removeGraph.php?name=autosave_" + graphName
})
.done(callback);
}