Loading js/kml.js +14 −0 Original line number Diff line number Diff line Loading @@ -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\"" Loading test.html +3 −0 Original line number Diff line number Diff line Loading @@ -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> Loading Loading
js/kml.js +14 −0 Original line number Diff line number Diff line Loading @@ -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\"" Loading
test.html +3 −0 Original line number Diff line number Diff line Loading @@ -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> Loading