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

Location:
src/webapp/webclient
Files:
3 edited

Legend:

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

    r1d2acb7 r2cf9b0b  
    1818body {
    1919        margin: 1em;
     20        width: 58.3mm;
    2021}
    2122
    … …  
    3536#display {
    3637        background-color: #E6E6E6;
    37         width: 58.3mm;
     38        width: 100%;
    3839        height: 38.2mm;
    3940        font-size: 12pt;
    … …  
    9495
    9596#map {
    96         width: 58.3mm;
     97        width: 100%;
    9798        height: 76mm;
    9899        border: 1px solid black;
    … …  
    111112form p input {
    112113        border: 1px solid #ACDFAC;
    113         height: 2em;
    114         width: 58.3mm;
     114        height: 3em;
     115        width: 100%;
    115116}
    116117
    117118.formButtons {
    118         text-align: right;
    119         margin-right: 5em;
    120         margin-top: 1em;
     119        text-align: center;
     120        margin-top: 2em;
    121121}
    122122
    123123.button {
    124124        border: 0;
    125         height: 2em;
    126         width: 10em;
     125        height: 3em;
     126        width: 100%;
    127127        background-repeat: no-repeat;
    128128        background-position: 0.5em 0.25em;
    … …  
    133133
    134134}
     135
     136#shutdown {
     137        width: 100%;
     138        margin-top: 3em;
     139}
     140
     141#shutdown button {
     142        background-color: #8C1C00;
     143        color: white;
     144        font-weight: bold;
     145        font-size: 24pt;
     146        width: 100%;
     147        height: 3em;
     148}
  • 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});
  • src/webapp/webclient/root/index.php

    r1d2acb7 r2cf9b0b  
    100100                </div>
    101101        </form>
     102        <div id="shutdown">
     103                <p id="shutdownMessage"/>
     104                <form>
     105                        <button type="button" id="shutdownButton">SHUTDOWN</button>
     106                </form>
     107        </div>
    102108<?php
    103109require_once("inc/footer.php");
Note: See TracChangeset for help on using the changeset viewer.