viewer.xhtml
1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- Copyright 2009 Andrzej Zaborowski <balrogg@gmail.com> -->
<!-- Code under GNU Public License version 2 or version 3 at your option. -->
<head>
<title>Tree viewer in javascript</title>
<script type="application/javascript" src="viewer.js" />
<script type="application/javascript" src="viewer_helpers.js" />
<script type="application/javascript"><![CDATA[
function init() {
if ((!window.location.hash || window.location.hash.length < 1) &&
(!window.location.search ||
window.location.search.length < 1)) {
document.getElementById("viewer").innerHTML =
"No URL given to load";
return;
}
var viewer = new forestviewer(document.getElementById("viewer"));
viewer.helper = tree_helpers;
viewer.style = "simple";
viewer.variablewidth = true;
viewer.nativescroll = false;
viewer.display.style.position = "relative";
viewer.location = window.location.hash.length ?
window.location.hash.substr(1) :
window.location.search.substr(1);
}
]]></script>
<link type="text/css" rel="stylesheet" href="viewer.css" />
</head>
<body onload="init()">
<p>Ala ma kota, Ola ma aligatora, Ela ma żmirłacza w kropki.</p>
<div id="viewer" />
<div id="generalinfo" />
</body>
</html>