mirror of
https://github.com/TheGreyDiamond/elevatormapRewritten.git
synced 2026-01-31 08:10:24 +01:00
Added restore dialoge
This commit is contained in:
@@ -50,8 +50,11 @@
|
|||||||
<body>
|
<body>
|
||||||
<!-- Primary Page Layout
|
<!-- Primary Page Layout
|
||||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||||
<div id="overlay" onclick="off()">
|
<div id="overlay">
|
||||||
<div id="text"><TODO>Add this dialoge</TODO></div>
|
<div id="text">
|
||||||
|
We've detected that there is a draft in your current session. Do you want to restore it?<br>
|
||||||
|
<button class="button-primary" onclick="restoreFunc()">Yes, restore it</button>
|
||||||
|
<button onclick="noRestore()">No, don't restore it</button></div>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin: 0px">
|
<div style="margin: 0px">
|
||||||
<div class="map" id="map"></div>
|
<div class="map" id="map"></div>
|
||||||
@@ -119,10 +122,13 @@
|
|||||||
<i style="color: black; cursor: pointer" class="fas fa-map-marker-alt" onclick="home()"></i>
|
<i style="color: black; cursor: pointer" class="fas fa-map-marker-alt" onclick="home()"></i>
|
||||||
</aside>
|
</aside>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
dataBlock = Cookies.get("tempStore");
|
|
||||||
if(dataBlock == undefined){
|
function noRestore(){
|
||||||
dataBlock = {};
|
off();
|
||||||
}else{
|
Cookies.remove("tempStore")
|
||||||
|
}
|
||||||
|
|
||||||
|
function restoreFunc(){
|
||||||
try{
|
try{
|
||||||
dataBlock = JSON.parse(dataBlock)
|
dataBlock = JSON.parse(dataBlock)
|
||||||
document.getElementById("lat").value = dataBlock["lat"]
|
document.getElementById("lat").value = dataBlock["lat"]
|
||||||
@@ -132,10 +138,17 @@
|
|||||||
document.getElementById("pepl").value = dataBlock["pepl"]
|
document.getElementById("pepl").value = dataBlock["pepl"]
|
||||||
document.getElementById("weig").value = dataBlock["weig"]
|
document.getElementById("weig").value = dataBlock["weig"]
|
||||||
document.getElementById("description").value = dataBlock["description"]
|
document.getElementById("description").value = dataBlock["description"]
|
||||||
on()
|
|
||||||
}catch(ex){
|
}catch(ex){
|
||||||
dataBlock = {}
|
dataBlock = {}
|
||||||
}
|
}
|
||||||
|
off()
|
||||||
|
}
|
||||||
|
|
||||||
|
dataBlock = Cookies.get("tempStore");
|
||||||
|
if(dataBlock == undefined){
|
||||||
|
dataBlock = {};
|
||||||
|
}else{
|
||||||
|
on()
|
||||||
}
|
}
|
||||||
|
|
||||||
var currentPage = 0;
|
var currentPage = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user