The fossil web-sites mentioned have a little running clock
just below the "Not logged in" string (or the username for
people who are logged in). In IE8, this clock doesn't
work, and (when opening the debugger) gives javascript
errors. The reason is that Date.toISOString() is not
supported in IE8. Coolpit is the function updateClock():

function updateClock(){
  var e = document.getElementById("clock");
  if(e){
    var d = new Date();
    e.innerHTML=d.toISOString().replace("T"," ").replace(/:\d\d\.\d+Z/,"");
    setTimeout("updateClock();",(60-d.getSeconds())*1000);
  }
}

Here is a version of the same function which works
with IE8 and gives exactly the same output:

function updateClock(){
  var e = document.getElementById("clock");
  if(e){
    var d = new Date();
    function f(n) {
      return n < 10 ? '0' + n : n;
    }
    e.innerHTML = d.getUTCFullYear()+ '-' +
      f(d.getUTCMonth() + 1) + '-' +
      f(d.getUTCDate())      + ' ' +
      f(d.getUTCHours())     + ':' +
      f(d.getUTCMinutes());
    setTimeout("updateClock();",(60-d.getUTCSeconds())*1000);
  }
}

The standard styles included in Fossil don't have such a clock
(but it would be a nice addition....... hint .....)

Regards,
        Jan Nijtmans
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to