comparison mercurial/templates/spartan/filelogentry.tmpl @ 15375:fe9d36a6853e stable

hgweb: fix dynamic date calculation not working under Safari While Chrome, Firefox, and IE 6+ support the current date format being passed to Date(), Safari doesn't: > new Date('Mon Oct 24 13:58:01 2011 +0200') Invalid Date However, the rfc822date format--officially supported by ECMAScript[1]--does work: > new Date('Mon, 24 Oct 2011 13:58:01 +0200') Mon Oct 24 2011 04:58:01 GMT-0700 (PDT) This change replaces all instances of {date|date} in HTML with {date|rfc822date}. For elements that only have the "age" class, there's no outward change for users with JavaScript enabled. For elements with both the "age" and "date" classes, the full date displayed uses the new format. Tested in IE 6, Safari 5.1.1, Google Chrome 15, and Firefox 7.0.1. [1]: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/parse
author Brodie Rao <brodie@bitheap.org>
date Thu, 27 Oct 2011 11:57:08 -0700
parents b24e5a708fad
children 9409aeaafdc1
comparison
equal deleted inserted replaced
15374:6cb8b46ea90a 15375:fe9d36a6853e
1 <table class="logEntry parity{parity}"> 1 <table class="logEntry parity{parity}">
2 <tr> 2 <tr>
3 <th><span class="age">{date|date}</span>:</th> 3 <th><span class="age">{date|rfc822date}</span>:</th>
4 <th class="firstline"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a></th> 4 <th class="firstline"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a></th>
5 </tr> 5 </tr>
6 <tr> 6 <tr>
7 <th class="revision">revision {filerev}:</td> 7 <th class="revision">revision {filerev}:</td>
8 <td class="node"> 8 <td class="node">
16 <th class="author">author:</th> 16 <th class="author">author:</th>
17 <td class="author">{author|obfuscate}</td> 17 <td class="author">{author|obfuscate}</td>
18 </tr> 18 </tr>
19 <tr> 19 <tr>
20 <th class="date">date:</th> 20 <th class="date">date:</th>
21 <td class="date">{date|date}</td> 21 <td class="date">{date|rfc822date}</td>
22 </tr> 22 </tr>
23 </table> 23 </table>
24 24
25 25