Ignore:
File:
1 edited

Legend:

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

    rd7ee6ae r4ab1c0a  
    102102}
    103103
    104 function shutdown(){
    105         $.getJSON("../webservice/?request=shutdown", function(data){
    106                 var shutdownTime = data["shutdownstart"];
    107                 var shutdownDate = Date.parse(shutdownTime);
    108                 var currentDate = new Date();
    109                 var shutdownHint = "Shutting down in "+ Math.floor((shutdownDate - currentDate)/1000) +"s at "+ shutdownTime.toLocaleString();
    110                 if(shutdownTime == -1){
    111                         shutdownHint = "Failed to initiate shutdown!";
    112                 }
    113                 $("#shutdownMessage").text(shutdownHint);
    114         });
    115 }
    116 
    117104$(document).ready(function() {
    118105        displayDataGet();
    … …  
    120107       
    121108        $.getJSON("../webservice/tileserver.php?/map.json", mapSetup);
    122        
    123         $("#shutdownButton").click(shutdown);
    124109});
Note: See TracChangeset for help on using the changeset viewer.