Unverified 提交 1c185f1b authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov 提交者: GitHub

Merge pull request #1734 from katzyn/console

Redirect source.html to GitHub
......@@ -21,7 +21,9 @@ Change Log
<h2>Next Version (unreleased)</h2>
<ul>
<li>Issue #1730: console can no longer connect to psql dbs in v1.4.197 (works in v1.4.196)
<li>Issue #1732: source.html does not work
</li>
<li>Issue #1730: Show error in H2 Console if specified driver is not compatible with URL
</li>
<li>Issue #1590: Error on executing "DELETE FROM table1 WHERE ID = ?; DELETE FROM table2 WHERE ID = ?;"
</li>
......
......@@ -4,30 +4,30 @@ and the EPL 1.0 (http://h2database.com/html/license.html).
Initial Developer: H2 Group
-->
<html><head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Source Code Viewer</title>
</head>
<body>
<script type="text/javascript">
// <!--
function getVersion(build) {
if (build == 64) {
return '1.0/version-1.0.' + build;
} else if (build >= 177) {
return '1.4.' + build;
function getPath(build) {
if (build >= 177) {
return 'version-1.4.' + build + '/h2';
} else if (build >= 146 && build != 147) {
return '1.3/version-1.3.' + build;
return 'version-1.3/version-1.3.' + build + '/h2';
} else if (build >= 120) {
return '1.2/version-1.2.' + build;
return 'version-1.2/version-1.2.' + build + '/h2';
} else if (build >= 100) {
return '1.1/version-1.1.' + build;
return 'version-1.1/version-1.1.' + build + '/h2';
} else if (build == 64) {
return 'version-1.0/version-1.0.64';
} else {
return 'version-1.0/version-1.0.' + build + '/h2';
}
return '1.0.' + build;
}
var line = 0, file = '';
var params = location.search.substring(1).split('&');
var tag = 'trunk/h2';
var path = 'master/h2';
for (var i = 0; i<params.length; i++) {
var k = params[i].split('=');
var key = k[0], value = k[1];
......@@ -36,43 +36,17 @@ for (var i = 0; i<params.length; i++) {
} else if (key == 'file') {
file = value;
} else if (key == 'build') {
tag = 'tags/version-' + getVersion(value) + '/h2';
path = getPath(value);
}
}
var url = 'https://github.com/h2database/h2database/blob/' + path + '/src/main/' + file;
if (line > 0 && file !== '') {
url += '#L' + line;
}
window.location.replace(url);
// -->
</script>
<pre>
<table width="100%">
<tr>
<td style="width: 50px; vertical-align: top">
<script type="text/javascript">
// <!--
for(var i = 1; i <= 5000; i++) {
if (line == i) {
document.write('<b>' + i + '></b><br />');
} else if (line <= 4 || i + 4 == line) {
document.write(i + '<a id = "here"></a><br />');
} else {
document.write(i + '<br />');
}
}
// -->
</script>
</td>
<td style="width: 3950px; vertical-align: top">
<iframe id = "source" frameborder="0" marginwidth="0" marginheight="0" width="100%" height="80000px" scrolling="no" src="">
</iframe>
</td>
</tr>
</table>
<a href="#here"></a>
<script type="text/javascript">
// <!--
var source = document.getElementById('source');
source.src = 'http://h2database.googlecode.com/svn/' + tag + '/src/main/' + file;
document.location = '#here';
// -->
</script>
<!-- analytics -->
</pre></html>
</body>
</html>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论