Add tiny little javascript to toggle visibility of the list of changes
This commit is contained in:
@@ -4,6 +4,10 @@ html {
|
||||
background-color: #1e1e1e;
|
||||
}
|
||||
|
||||
image {
|
||||
border: none;
|
||||
}
|
||||
|
||||
body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
||||
@@ -82,9 +82,10 @@ Function print_build($current, $next)
|
||||
<a href='" . URL_ROOT . "/" . $current->file . ".log'>Build Log</a></th>
|
||||
</tr>";
|
||||
if ($next) {
|
||||
print '<tr><td colspan="4">';
|
||||
print '<tr><td colspan="4">
|
||||
<a href="javascript:void(0)" id="toggle_link_'. $current->nr . '" onclick="javascript:toggleChanges('. $current->nr . ')">Show changes >></a><div style="display: none;" id="changes_' . $current->nr . '">';
|
||||
print_changes($current, $next);
|
||||
print "</td></tr>";
|
||||
print "</div></td></tr>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -38,6 +38,30 @@ class Layout
|
||||
<link rel="stylesheet" type="text/css" href="<?php print URL_ROOT ?>/buildsite.css"/>
|
||||
<link rel="shortcut icon" href="<?php print IMG_ROOT ?>/favicon.ico" type="image/x-icon" />
|
||||
<title>Singularity Viewer Automated Build System</title>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function toggleChanges(id)
|
||||
{
|
||||
var change = document.getElementById("changes_" + id);
|
||||
var link = document.getElementById("toggle_link_" + id);
|
||||
|
||||
if (change) {
|
||||
if (change.style.display == "block") {
|
||||
change.style.display = "none";
|
||||
link.innerHTML = "Show changes >>";
|
||||
} else {
|
||||
change.style.display = "block";
|
||||
link.innerHTML = "Hide changes <<";
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="everything">
|
||||
|
||||
Reference in New Issue
Block a user