- File:
-
- 1 edited
-
src/webapp/webclient/javascript/main.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/webapp/webclient/javascript/main.js
rd7ee6ae r4ab1c0a 102 102 } 103 103 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 117 104 $(document).ready(function() { 118 105 displayDataGet(); … … 120 107 121 108 $.getJSON("../webservice/tileserver.php?/map.json", mapSetup); 122 123 $("#shutdownButton").click(shutdown);124 109 });
Note:
See TracChangeset
for help on using the changeset viewer.
