Commit f4bfab1e authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

kml saving results display

parent dbfa2f03
...@@ -93,6 +93,20 @@ function postKmlData(filename, xml) { ...@@ -93,6 +93,20 @@ function postKmlData(filename, xml) {
data: xml, data: xml,
async:true, async:true,
complete: function(response){ 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 //do nothing
}, },
contentType: "text/xml; charset=\"utf-8\"" contentType: "text/xml; charset=\"utf-8\""
......
...@@ -139,6 +139,9 @@ Instructions: ...@@ -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='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> <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>
<td valign='middle'>
<div id='kmlstatus'></div>
</td>
</tr> </tr>
<tr class='experimental'> <tr class='experimental'>
<td> <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