Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
fb4531a3
提交
fb4531a3
authored
12月 19, 2013
作者:
noelgrandin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
H2 console: add SHIFT+ENTER "run selected" functionality
上级
a97193f8
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
59 行增加
和
9 行删除
+59
-9
changelog.html
h2/src/docsrc/html/changelog.html
+1
-0
_text_en.prop
h2/src/main/org/h2/server/web/res/_text_en.prop
+2
-0
header.jsp
h2/src/main/org/h2/server/web/res/header.jsp
+15
-4
help.jsp
h2/src/main/org/h2/server/web/res/help.jsp
+7
-1
icon_run_selected.gif
h2/src/main/org/h2/server/web/res/icon_run_selected.gif
+0
-0
query.jsp
h2/src/main/org/h2/server/web/res/query.jsp
+34
-4
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
fb4531a3
...
@@ -50,6 +50,7 @@ Change Log
...
@@ -50,6 +50,7 @@ Change Log
</li><li>
Issue 528: Add Oracle-compatible TO_CHAR function, patch by Daniel Gredler.
</li><li>
Issue 528: Add Oracle-compatible TO_CHAR function, patch by Daniel Gredler.
</li><li>
Issue 534: CREATE ALIAS NOCACHE, Patch by Nicolas Fortin
</li><li>
Issue 534: CREATE ALIAS NOCACHE, Patch by Nicolas Fortin
</li><li>
Fix an issue with storing Unicode surrogate pairs in CLOB columns.
</li><li>
Fix an issue with storing Unicode surrogate pairs in CLOB columns.
</li><li>
H2 console: add SHIFT+ENTER "run selected" functionality
</li></ul>
</li></ul>
<h2>
Version 1.3.174 (2013-10-19)
</h2>
<h2>
Version 1.3.174 (2013-10-19)
</h2>
...
...
h2/src/main/org/h2/server/web/res/_text_en.prop
浏览文件 @
fb4531a3
...
@@ -46,6 +46,7 @@ helpDisconnect=Disconnects from the database
...
@@ -46,6 +46,7 @@ helpDisconnect=Disconnects from the database
helpDisplayThis=Displays this Help Page
helpDisplayThis=Displays this Help Page
helpDropTable=Delete the table if it exists
helpDropTable=Delete the table if it exists
helpExecuteCurrent=Executes the current SQL statement
helpExecuteCurrent=Executes the current SQL statement
helpExecuteSelected=Executes the SQL statement defined by the text selection
helpIcon=Icon
helpIcon=Icon
helpImportantCommands=Important Commands
helpImportantCommands=Important Commands
helpOperations=Operations
helpOperations=Operations
...
@@ -101,6 +102,7 @@ toolbar.maxRows=Max rows
...
@@ -101,6 +102,7 @@ toolbar.maxRows=Max rows
toolbar.refresh=Refresh
toolbar.refresh=Refresh
toolbar.rollback=Rollback
toolbar.rollback=Rollback
toolbar.run=Run (Ctrl+Enter)
toolbar.run=Run (Ctrl+Enter)
toolbar.runSelected=Run Selected (Shift+Enter)
toolbar.sqlStatement=SQL statement
toolbar.sqlStatement=SQL statement
tools.backup=Backup
tools.backup=Backup
tools.backup.help=Creates a backup of a database.
tools.backup.help=Creates a backup of a database.
...
...
h2/src/main/org/h2/server/web/res/header.jsp
浏览文件 @
fb4531a3
...
@@ -82,10 +82,21 @@ Initial Developer: H2 Group
...
@@ -82,10 +82,21 @@ Initial Developer: H2 Group
</select>
</select>
</td>
</td>
<td
class=
"toolbar"
>
<td
class=
"toolbar"
>
<a
href=
"javascript:top.frames['h2query'].document.forms['h2query'].submit();"
><img
src=
"icon_run.gif"
<a
href=
"javascript:top.frames['h2query'].submitAll();"
>
<img
src=
"icon_run.gif"
onmouseover=
"this.className ='icon_hover'"
onmouseover=
"this.className ='icon_hover'"
onmouseout=
"this.className ='icon'"
onmouseout=
"this.className ='icon'"
class=
"icon"
alt=
"${text.toolbar.run}"
title=
"${text.toolbar.run}"
border=
"1"
>
class=
"icon"
alt=
"${text.toolbar.run}"
title=
"${text.toolbar.run}"
border=
"1"
>
</a>
</td>
<td
class=
"toolbar"
>
<a
href=
"javascript:top.frames['h2query'].submitSelected();"
>
<img
src=
"icon_run_selected.gif"
onmouseover=
"this.className ='icon_hover'"
onmouseout=
"this.className ='icon'"
class=
"icon"
alt=
"${text.toolbar.runSelected}"
title=
"${text.toolbar.runSelected}"
border=
"1"
>
</a>
</a>
</td>
</td>
<td
class=
"toolbar"
>
<td
class=
"toolbar"
>
...
...
h2/src/main/org/h2/server/web/res/help.jsp
浏览文件 @
fb4531a3
...
@@ -39,11 +39,17 @@ function set(s) {
...
@@ -39,11 +39,17 @@ function set(s) {
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td
style=
"padding:0px"
><img
src=
"icon_run.gif"
alt=
"${text.toolbar.run}"
/></td>
<td
style=
"padding:0px"
><img
src=
"icon_run
_selected
.gif"
alt=
"${text.toolbar.run}"
/></td>
<td
style=
"vertical-align: middle;"
>
<td
style=
"vertical-align: middle;"
>
${text.helpExecuteCurrent}
${text.helpExecuteCurrent}
</td>
</td>
</tr>
</tr>
<tr>
<td
style=
"padding:0px"
><img
src=
"icon_run.gif"
alt=
"${text.toolbar.runSelected}"
/></td>
<td
style=
"vertical-align: middle;"
>
${text.helpExecuteSelected}
</td>
</tr>
<tr>
<tr>
<td
style=
"padding:0px"
><img
src=
"icon_disconnect.gif"
alt=
"${text.toolbar.disconnect}"
/></td>
<td
style=
"padding:0px"
><img
src=
"icon_disconnect.gif"
alt=
"${text.toolbar.disconnect}"
/></td>
<td
style=
"vertical-align: middle;"
>
<td
style=
"vertical-align: middle;"
>
...
...
h2/src/main/org/h2/server/web/res/icon_run_selected.gif
0 → 100644
浏览文件 @
fb4531a3
990 Bytes
h2/src/main/org/h2/server/web/res/query.jsp
浏览文件 @
fb4531a3
...
@@ -204,7 +204,11 @@ function keyDown(event) {
...
@@ -204,7 +204,11 @@ function keyDown(event) {
}
}
if
(
key
==
13
&&
(
event
.
ctrlKey
||
event
.
metaKey
))
{
if
(
key
==
13
&&
(
event
.
ctrlKey
||
event
.
metaKey
))
{
// ctrl + return, cmd + return
// ctrl + return, cmd + return
document
.
h2query
.
submit
();
submitAll
();
return
false
;
}
else
if
(
key
==
13
&&
event
.
shiftKey
)
{
// shift + return
submitSelected
();
return
false
;
return
false
;
}
else
if
(
key
==
32
&&
(
event
.
ctrlKey
||
event
.
altKey
))
{
}
else
if
(
key
==
32
&&
(
event
.
ctrlKey
||
event
.
altKey
))
{
// ctrl + space
// ctrl + space
...
@@ -265,13 +269,17 @@ function keyDown(event) {
...
@@ -265,13 +269,17 @@ function keyDown(event) {
}
}
function
keyUp
(
event
)
{
function
keyUp
(
event
)
{
var
key
=
event
==
null
?
0
:
(
event
.
keyCode
?
event
.
keyCode
:
event
.
charCode
);
if
(
autoComplete
!=
0
)
{
if
(
autoComplete
!=
0
)
{
var
key
=
event
==
null
?
0
:
(
event
.
keyCode
?
event
.
keyCode
:
event
.
charCode
);
if
(
key
!=
37
&&
key
!=
38
&&
key
!=
39
&&
key
!=
40
)
{
if
(
key
!=
37
&&
key
!=
38
&&
key
!=
39
&&
key
!=
40
)
{
// left, right, up, down: don't show autocomplete
// left, right, up, down: don't show autocomplete
showAutoComplete
();
showAutoComplete
();
}
}
}
}
if
(
key
==
13
&&
event
.
shiftKey
)
{
// shift + return
return
false
;
}
return
true
;
return
true
;
}
}
...
@@ -448,13 +456,35 @@ function processAsyncResponse() {
...
@@ -448,13 +456,35 @@ function processAsyncResponse() {
}
}
}
}
function
submitAll
()
{
document
.
h2querysubmit
.
sql
.
value
=
document
.
h2query
.
sql
.
value
;
document
.
h2querysubmit
.
submit
();
}
function
submitSelected
()
{
var
field
=
document
.
h2query
.
sql
;
//alert('contents ' + field.selectionStart + ' ' + field.selectionEnd);
if
(
field
.
selectionStart
==
field
.
selectionEnd
)
{
return
;
}
var
startPos
=
field
.
selectionStart
;
var
endPos
=
field
.
selectionEnd
;
var
selectedText
=
field
.
value
.
substring
(
startPos
,
endPos
);
document
.
h2querysubmit
.
sql
.
value
=
selectedText
;
document
.
h2querysubmit
.
submit
();
}
//-->
//-->
</script>
</script>
</head>
</head>
<body
onresize=
"sizeTextArea();"
onload=
"sizeTextArea();"
style=
"margin: 0px; padding: 0px;"
>
<body
onresize=
"sizeTextArea();"
onload=
"sizeTextArea();"
style=
"margin: 0px; padding: 0px;"
>
<form
name=
"h2query"
method=
"post"
action=
"query.do?jsessionid=${sessionId}"
target=
"h2result"
>
<form
name=
"h2querysubmit"
method=
"post"
action=
"query.do?jsessionid=${sessionId}"
target=
"h2result"
style=
"display:none"
>
<input
type=
"text"
id=
"sql"
name=
"sql"
>
</form>
<form
name=
"h2query"
action=
"javascript:alert('should not be submitting this form');"
>
<span
style=
"white-space:nowrap"
>
<span
style=
"white-space:nowrap"
>
<input
type=
"button"
class=
"button"
value=
"${text.toolbar.run}"
onclick=
"javascript:submit();sql.focus();return true;"
/>
<input
type=
"button"
class=
"button"
value=
"${text.toolbar.run}"
onclick=
"javascript:submitAll();sql.focus();return true;"
/>
<input
type=
"button"
class=
"button"
value=
"${text.toolbar.runSelected}"
onclick=
"javascript:submitSelected();sql.focus();return true;"
/>
<input
type=
"button"
class=
"button"
value=
"${text.toolbar.clear}"
onclick=
"javascript:sql.value='';keyUp();sql.focus();return true;"
/>
<input
type=
"button"
class=
"button"
value=
"${text.toolbar.clear}"
onclick=
"javascript:sql.value='';keyUp();sql.focus();return true;"
/>
${text.toolbar.sqlStatement}:
${text.toolbar.sqlStatement}:
</span>
</span>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论