blob: 82c3b8e30335d94573d0e30b94de8dc7861d88b0 [file] [log] [blame]
<!-- Copyright 2012 Google Inc. -->
<!-- Licensed under the Apache License, Version 2.0 (the "License"); you -->
<!-- may not use this file except in compliance with the License. You may -->
<!-- may obtain a copy of the License at -->
<!-- -->
<!-- http://www.apache.org/licenses/LICENSE-2.0 -->
<!-- -->
<!-- Unless required by applicable law or agreed to in writing, software -->
<!-- distributed under the License is distributed on an "AS IS" BASIS, -->
<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -->
<!-- implied. License for the specific language governing permissions and -->
<!-- limitations under the License. -->
<html>
<head>
<title>Loading...</title>
<script>
function updatePage(config) {
var title = config.moduleName + " Source (GWT Code Server)";
document.title = title;
setTextContent(document.getElementById("title"), title);
document.getElementById("logLink")
.setAttribute("href", "/log/" + config.moduleName);
document.getElementById("topLink")
.setAttribute("href", "/sourcemaps/" + config.moduleName + "/");
document.getElementById("subhead")
.appendChild(document.createTextNode(" in " + config.directory));
updateFileList(config, document.getElementById("files"));
}
function updateFileList(config, resultElement) {
for (var i = 0; i < config.files.length; i++) {
var file = config.files[i];
var anchor = document.createElement("a");
anchor.setAttribute("href", file.link);
setTextContent(anchor, file.name);
var listItem = document.createElement("li");
listItem.appendChild(anchor);
resultElement.appendChild(listItem);
}
}
function setTextContent(element, text) {
if (typeof element.textContent === 'string') {
element.textContent = text;
} else {
// Use innerText when textContent is not supported (e.g. IE8).
element.innerText = text;
}
}
function onPageLoad() {
updatePage(config);
}
if (window.addEventListener) {
window.addEventListener("load", onPageLoad, false);
}
else if (window.attachEvent) {
window.attachEvent("onload", onPageLoad);
}
</script>
</head>
<body>
<h1 id="title">Loading...</h1>
<p><a id="logLink">Messages</a> from the last time this module was compiled.</p>
<p><a id="topLink">Source Directories</a></p>
<h2 id="subhead">Files</h2>
<p>(From the last successful compile.)</p>
<ul id="files">
</ul>
</body>
</html>