comparison tests/test-hgweb-filelog.t @ 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 c5c9ca3719f9
comparison
equal deleted inserted replaced
15374:6cb8b46ea90a 15375:fe9d36a6853e
177 <th class="age">age</th> 177 <th class="age">age</th>
178 <th class="author">author</th> 178 <th class="author">author</th>
179 <th class="description">description</th> 179 <th class="description">description</th>
180 </tr> 180 </tr>
181 <tr class="parity0"> 181 <tr class="parity0">
182 <td class="age">Thu Jan 01 00:00:00 1970 +0000</td> 182 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
183 <td class="author">test</td> 183 <td class="author">test</td>
184 <td class="description"><a href="/rev/01de2d66a28d">second a</a></td> 184 <td class="description"><a href="/rev/01de2d66a28d">second a</a></td>
185 </tr> 185 </tr>
186 <tr class="parity1"> 186 <tr class="parity1">
187 <td class="age">Thu Jan 01 00:00:00 1970 +0000</td> 187 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
188 <td class="author">test</td> 188 <td class="author">test</td>
189 <td class="description"><a href="/rev/5ed941583260">first a</a></td> 189 <td class="description"><a href="/rev/5ed941583260">first a</a></td>
190 </tr> 190 </tr>
191 191
192 </table> 192 </table>
278 <th class="age">age</th> 278 <th class="age">age</th>
279 <th class="author">author</th> 279 <th class="author">author</th>
280 <th class="description">description</th> 280 <th class="description">description</th>
281 </tr> 281 </tr>
282 <tr class="parity0"> 282 <tr class="parity0">
283 <td class="age">Thu Jan 01 00:00:00 1970 +0000</td> 283 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
284 <td class="author">test</td> 284 <td class="author">test</td>
285 <td class="description"><a href="/rev/01de2d66a28d">second a</a></td> 285 <td class="description"><a href="/rev/01de2d66a28d">second a</a></td>
286 </tr> 286 </tr>
287 <tr class="parity1"> 287 <tr class="parity1">
288 <td class="age">Thu Jan 01 00:00:00 1970 +0000</td> 288 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
289 <td class="author">test</td> 289 <td class="author">test</td>
290 <td class="description"><a href="/rev/5ed941583260">first a</a></td> 290 <td class="description"><a href="/rev/5ed941583260">first a</a></td>
291 </tr> 291 </tr>
292 292
293 </table> 293 </table>
379 <th class="age">age</th> 379 <th class="age">age</th>
380 <th class="author">author</th> 380 <th class="author">author</th>
381 <th class="description">description</th> 381 <th class="description">description</th>
382 </tr> 382 </tr>
383 <tr class="parity0"> 383 <tr class="parity0">
384 <td class="age">Thu Jan 01 00:00:00 1970 +0000</td> 384 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
385 <td class="author">test</td> 385 <td class="author">test</td>
386 <td class="description"><a href="/rev/5ed941583260">first a</a></td> 386 <td class="description"><a href="/rev/5ed941583260">first a</a></td>
387 </tr> 387 </tr>
388 388
389 </table> 389 </table>
475 <th class="age">age</th> 475 <th class="age">age</th>
476 <th class="author">author</th> 476 <th class="author">author</th>
477 <th class="description">description</th> 477 <th class="description">description</th>
478 </tr> 478 </tr>
479 <tr class="parity0"> 479 <tr class="parity0">
480 <td class="age">Thu Jan 01 00:00:00 1970 +0000</td> 480 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
481 <td class="author">test</td> 481 <td class="author">test</td>
482 <td class="description"><a href="/rev/5ed941583260">first a</a></td> 482 <td class="description"><a href="/rev/5ed941583260">first a</a></td>
483 </tr> 483 </tr>
484 484
485 </table> 485 </table>
602 602
603 <p>navigate: <small class="navigate"><a href="/log/1a6696706df2/c?style=spartan">(0)</a> <a href="/log/tip/c?style=spartan">tip</a> </small></p> 603 <p>navigate: <small class="navigate"><a href="/log/1a6696706df2/c?style=spartan">(0)</a> <a href="/log/tip/c?style=spartan">tip</a> </small></p>
604 604
605 <table class="logEntry parity0"> 605 <table class="logEntry parity0">
606 <tr> 606 <tr>
607 <th><span class="age">Thu Jan 01 00:00:00 1970 +0000</span>:</th> 607 <th><span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span>:</th>
608 <th class="firstline"><a href="/rev/b7682196df1c?style=spartan">change c</a></th> 608 <th class="firstline"><a href="/rev/b7682196df1c?style=spartan">change c</a></th>
609 </tr> 609 </tr>
610 <tr> 610 <tr>
611 <th class="revision">revision 1:</td> 611 <th class="revision">revision 1:</td>
612 <td class="node"> 612 <td class="node">
620 <th class="author">author:</th> 620 <th class="author">author:</th>
621 <td class="author">&#116;&#101;&#115;&#116;</td> 621 <td class="author">&#116;&#101;&#115;&#116;</td>
622 </tr> 622 </tr>
623 <tr> 623 <tr>
624 <th class="date">date:</th> 624 <th class="date">date:</th>
625 <td class="date">Thu Jan 01 00:00:00 1970 +0000</td> 625 <td class="date">Thu, 01 Jan 1970 00:00:00 +0000</td>
626 </tr> 626 </tr>
627 </table> 627 </table>
628 628
629 629
630 <table class="logEntry parity1"> 630 <table class="logEntry parity1">
631 <tr> 631 <tr>
632 <th><span class="age">Thu Jan 01 00:00:00 1970 +0000</span>:</th> 632 <th><span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span>:</th>
633 <th class="firstline"><a href="/rev/1a6696706df2?style=spartan">mv b</a></th> 633 <th class="firstline"><a href="/rev/1a6696706df2?style=spartan">mv b</a></th>
634 </tr> 634 </tr>
635 <tr> 635 <tr>
636 <th class="revision">revision 0:</td> 636 <th class="revision">revision 0:</td>
637 <td class="node"> 637 <td class="node">
653 <th class="author">author:</th> 653 <th class="author">author:</th>
654 <td class="author">&#116;&#101;&#115;&#116;</td> 654 <td class="author">&#116;&#101;&#115;&#116;</td>
655 </tr> 655 </tr>
656 <tr> 656 <tr>
657 <th class="date">date:</th> 657 <th class="date">date:</th>
658 <td class="date">Thu Jan 01 00:00:00 1970 +0000</td> 658 <td class="date">Thu, 01 Jan 1970 00:00:00 +0000</td>
659 </tr> 659 </tr>
660 </table> 660 </table>
661 661
662 662
663 663