Commit f4bfab1e authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

kml saving results display

parent dbfa2f03
......@@ -93,6 +93,20 @@ function postKmlData(filename, xml) {
data: xml,
async:true,
complete: function(response){
//console.log(response.responseText);
var res = parseInt(response.responseText);
if (res==0){
console.log("test!");
$("#kmlstatus").css({color:"rgba(70,200,70,1)"}).html("saved");
$("#kmlstatus").show(0).delay(500).fadeOut(250);
}else{
var msg = "some error";
if ((res==-1)||(res==-2)) msg = "file does not exist";
if (res==-3) msg = "read only file";
$("#kmlstatus").css({color:"rgba(200,70,70,1)"}).html("fail: "+msg);
$("#kmlstatus").show(0).delay(1000).fadeOut(250);
}
//do nothing
},
contentType: "text/xml; charset=\"utf-8\""
......
......@@ -139,6 +139,9 @@ Instructions:
<button id='restorekml' class='ic donothide' title='restore'><img src='js/images/ic_file_download_black_48dp_1x.png' class='icim donothide'/></button>
<button id='savekml' class='ic donothide' title='save'><img src='js/images/ic_file_upload_black_48dp_1x.png' class='icim donothide'/></button>
</td>
<td valign='middle'>
<div id='kmlstatus'></div>
</td>
</tr>
<tr class='experimental'>
<td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment