-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemoindex.template
24 lines (23 loc) · 1014 Bytes
/
demoindex.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<html>
<head>
<script>
function clickLink(moduleName,htmlFileName){
var href = moduleName + '/' + htmlFileName + '.html';
frames['demoFrame'].location.href=href;
document.getElementById('demoLink').innerHTML = '<a href="' + href + '"/>' + "Direct link to " + moduleName + "</a>";
}
function writeDemoLink(moduleFilePath) {
var moduleName = moduleFilePath.substring(0, moduleFilePath.length - 8).replace(/\//g, '.');
var htmlFileName = moduleName.replace(/.*\./, '');
document.getElementById('demoList').innerHTML +=
'<a href="javascript:" onclick=\'clickLink("' + moduleName +'","' + htmlFileName + '")\'>' + htmlFileName + '<\a><br>'
}
</script>
</head>
<body>
<h3>GWT Incubator Demos</h3>
<div id="demoList" style="float:left;width:19%"></div>
<iframe style="height:90%;width:80%;" id="demoFrame" name="demoFrame"></iframe>
<div id="demoLink" style="float:left;width:19%;white-space:nowrap"></div>
</body>
</html>