Ignore:
Timestamp:
Aug 8, 2017, 11:23:36 AM (9 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
debian/bullseye, debian/jessie
Children:
9aa387f
Parents:
a68d628 (diff), 24d4504 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into debian/jessie

File:
1 moved

Legend:

Unmodified
Added
Removed
  • src/webapp/webclient/js/main.js

    ra68d628 r018bce2  
    121121}
    122122
     123function uploadMap(form)
     124{
     125        $.ajax({
     126                type: "POST",
     127                url: "../webservice/mapupload.php",
     128                data: $(form).serialize(),
     129                success: function(data){
     130                        if(("error" in data) && data["error"] == 1){
     131                                alert("Failed to upload map: "+ data["errormessage"]);
     132                                return;
     133                        }
     134                        alert("Map upload successfully");
     135                },
     136                error: function(jqXHR, exception, errorThrown){ alert("Failed to upload map: "+ exception); }
     137        });
     138}
     139
     140
    123141$(document).ready(function() {
    124142        displayDataGet();
    … …  
    127145        $.getJSON("../webservice/tileserver.php?/map.json", mapSetup);
    128146       
    129         $("#shutdownButton").click(shutdown);
     147        $("shutdown").click(shutdown);
     148       
     149        $("#mapTileUpload").validate({
     150                rules: {
     151                        mapFile: {
     152                                required: true
     153                        }
     154                },
     155                submitHandler: function(form){
     156                        uploadMap(form);
     157                }
     158        });
    130159});
Note: See TracChangeset for help on using the changeset viewer.