[llvm-commits] CVS: llvm-www/releases/index.html
Misha Brukman
brukman at cs.uiuc.edu
Mon Dec 15 10:00:05 PST 2008
Changes in directory llvm-www/releases:
index.html updated: 1.46 -> 1.47
---
Log message:
Made Javascript IE6-compatible.
---
Diffs of the changes: (+16 -7)
index.html | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
Index: llvm-www/releases/index.html
diff -u llvm-www/releases/index.html:1.46 llvm-www/releases/index.html:1.47
--- llvm-www/releases/index.html:1.46 Mon Dec 15 11:41:08 2008
+++ llvm-www/releases/index.html Mon Dec 15 11:59:46 2008
@@ -45,7 +45,7 @@
</tr>
</table>
-<script>
+<script language="javascript">
function addReleases() {
var RELEASES = [
['09 Nov 2008', '2.4'],
@@ -64,16 +64,25 @@
['17 Dec 2003', '1.1'],
['24 Oct 2003', '1.0']
];
+ function createCell(contents, align) {
+ var cell = document.createElement('td');
+ cell.innerHTML = contents;
+ if (align) {
+ cell.style.textAlign = align;
+ }
+ return cell;
+ }
var table = document.getElementById('download');
for (var i = 0; i < RELEASES.length; ++i) {
- var row = table.insertRow(-1);
var date = RELEASES[i][0];
var version = RELEASES[i][1];
- row.innerHTML =
- '<td align=right>' + date + '</td>' +
- '<td align=center>' + version + '</td>' +
- '<td>' + '<a href="download.html#' + version + '">download</a></td>' +
- '<td>' + '<a href="' + version + '/docs/ReleaseNotes.html">release notes</a></td>';
+ // Note: IE6 doesn't suport the much simpler version:
+ // table.insertRow(-1).innerHTML = '...';
+ var row = table.insertRow(-1);
+ row.appendChild(createCell(date, 'right'));
+ row.appendChild(createCell(version, 'center'));
+ row.appendChild(createCell('<a href="download.html#' + version + '">download</a>'));
+ row.appendChild(createCell('<a href="' + version + '/docs/ReleaseNotes.html">release notes</a>'));
}
}
addReleases();
More information about the llvm-commits
mailing list