]> jspc29.x-matter.uni-frankfurt.de Git - labtools.git/commitdiff
update with better display
authorJan Michel <j.michel@gsi.de>
Wed, 19 Oct 2016 16:13:45 +0000 (18:13 +0200)
committerJan Michel <j.michel@gsi.de>
Wed, 19 Oct 2016 16:13:45 +0000 (18:13 +0200)
timer/index.htm
timer/style.css

index 194a07add20936a6d50767da14db1388320348f8..3c067ccd9ee5093da4e8ac4bbcc0457aad21b1c6 100644 (file)
  
  function update() {
    timer = timer-10;
+   min = Math.floor(timer/60);
+   if(timer<0) {
+     min = Math.ceil(timer/60);
+     if(timer>-60)
+       min = '-'+min;
+     }
+   sec = ((timer%60)?(Math.abs(timer%60)):'00');
    document.getElementById('tim').innerHTML = Math.ceil(timer/60);
-   document.getElementById('timsmall').innerHTML = Math.floor(timer/60)+':'+((timer%60)?(timer%60):'00');
+   document.getElementById('timsmall').innerHTML = min+':'+sec;
    
    
    if(timer<= 0) document.getElementById('tim').className='shutup';
index 22d4056733eba5d47349bfd480a7a7ec5279ec85..48be83fe2f74adf2d4ab2f05a3669c121a4dcafc 100644 (file)
@@ -8,10 +8,15 @@ body {
 }
 
 
-#set {
+#setting {
 position:absolute;
 left:5px;
 top:5px;
+height:20px;
+}
+
+input {
+height:20px;
 }