提交 2b68ce3e authored 作者: Thomas Mueller's avatar Thomas Mueller

H2 Console: with Chrome and Safari, resizing the table/query frame doesn't work. Issue 225.

上级 d7721db1
......@@ -202,6 +202,8 @@ public class WebServer implements Service {
session.put("sessionId", newId);
session.put("ip", hostAddr);
session.put("language", DEFAULT_LANGUAGE);
session.put("frame-border", "0");
session.put("frameset-border", "4");
sessions.put(newId, session);
// always read the english translation,
// so that untranslated text appears at least in english
......
......@@ -260,6 +260,14 @@ class WebThread extends WebApp implements Runnable {
} else if (lower.startsWith("content-length")) {
len = Integer.parseInt(line.substring(line.indexOf(':') + 1).trim());
trace("len=" + len);
} else if (lower.startsWith("user-agent")) {
boolean isWebKit = lower.indexOf("webkit/") >= 0;
if (isWebKit && session != null) {
// workaround for what seems to be a WebKit bug:
// http://code.google.com/p/chromium/issues/detail?id=6402
session.put("frame-border", "1");
session.put("frameset-border", "2");
}
} else if (lower.startsWith("accept-language")) {
Locale locale = session == null ? null : session.locale;
if (locale == null) {
......
......@@ -12,13 +12,13 @@ Initial Developer: H2 Group
<title>${text.a.title}</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
</head>
<frameset cols="*" rows="36,*" frameborder="2" framespacing="4" border="4" >
<frameset cols="*" rows="36,*" frameborder="1" framespacing="4" border="${frameset-border}" bordercolor="white">
<frame noresize="noresize" frameborder="0" marginheight="0" marginwidth="0" src="header.jsp?jsessionid=${sessionId}" name="header" scrolling="no" />
<frameset cols="200,*" rows="*" frameborder="2" framespacing="4" border="4" >
<frameset cols="200,*" rows="*" frameborder="1" framespacing="4" border="${frameset-border}" bordercolor="white">
<frame frameborder="0" marginheight="0" marginwidth="0" src="tables.do?jsessionid=${sessionId}" name="h2menu" />
<frameset rows="180,*" frameborder="2" framespacing="4" border="4" >
<frame frameborder="0" marginheight="0" marginwidth="0" src="query.jsp?jsessionid=${sessionId}" name="h2query" scrolling="no" />
<frame frameborder="0" marginheight="0" marginwidth="0" src="help.jsp?jsessionid=${sessionId}" name="h2result" />
<frameset rows="180,*" frameborder="1" framespacing="4" border="${frameset-border}" bordercolor="white">
<frame frameborder="0" marginheight="0" marginwidth="0" src="query.jsp?jsessionid=${sessionId}" name="h2query" scrolling="no" >
<frame frameborder="${frame-border}" marginheight="0" marginwidth="0" src="help.jsp?jsessionid=${sessionId}" name="h2result" />
</frameset>
</frameset>
</frameset>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论