Ignore:
Timestamp:
Jul 21, 2016, 8:27:37 AM (10 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
0.5, app-cordova, debian/bullseye, debian/jessie, master
Children:
d9af413, fefafdf
Parents:
1d2acb7 (diff), 09adf3e (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:

Pulled upstream

Merge branch 'master' of ​https://svn.falaba.de/gnuboat

File:
1 edited

Legend:

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

    r1d2acb7 r2cf9b0b  
    102102}
    103103
     104function 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
    104117$(document).ready(function() {
    105118        displayDataGet();
    … …  
    107120       
    108121        $.getJSON("../webservice/tileserver.php?/map.json", mapSetup);
     122       
     123        $("#shutdownButton").click(shutdown);
    109124});
Note: See TracChangeset for help on using the changeset viewer.