Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
cf11224f
Unverified
提交
cf11224f
authored
3月 26, 2018
作者:
Evgenij Ryazanov
提交者:
GitHub
3月 26, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1024 from katzyn/webconsole
Improve sorting in web console
上级
ba15559f
b87f4cfc
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
39 行增加
和
14 行删除
+39
-14
changelog.html
h2/src/docsrc/html/changelog.html
+4
-0
table.js
h2/src/main/org/h2/server/web/res/table.js
+34
-13
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+1
-1
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
cf11224f
...
@@ -21,6 +21,10 @@ Change Log
...
@@ -21,6 +21,10 @@ Change Log
<h2>
Next Version (unreleased)
</h2>
<h2>
Next Version (unreleased)
</h2>
<ul>
<ul>
<li>
Issue #1019: Console incorrectly sorts BigDecimal columns alphanumerically
</li>
<li>
PR #1021: Update JdbcDatabaseMetaData to JDBC 4.1 (Java 7)
</li>
<li>
Issue #992: 1.4.196+ client cannot use DatabaseMetaData with 1.4.195- server
<li>
Issue #992: 1.4.196+ client cannot use DatabaseMetaData with 1.4.195- server
</li>
</li>
<li>
Issue #1016: ResultSet.getObject() should return enum value, not ordinal
<li>
Issue #1016: ResultSet.getObject() should return enum value, not ordinal
...
...
h2/src/main/org/h2/server/web/res/table.js
浏览文件 @
cf11224f
...
@@ -163,6 +163,10 @@ function getInnerText(el) {
...
@@ -163,6 +163,10 @@ function getInnerText(el) {
return
str
;
return
str
;
}
}
function
isNullCell
(
td
)
{
return
td
.
childNodes
.
length
==
1
&&
(
td
.
childNodes
[
0
].
nodeName
==
"I"
);
}
function
resortTable
(
link
)
{
function
resortTable
(
link
)
{
// get the span
// get the span
var
span
;
var
span
;
...
@@ -175,26 +179,39 @@ function resortTable(link) {
...
@@ -175,26 +179,39 @@ function resortTable(link) {
var
td
=
link
.
parentNode
;
var
td
=
link
.
parentNode
;
var
column
=
td
.
cellIndex
;
var
column
=
td
.
cellIndex
;
var
table
=
getParent
(
td
,
'TABLE'
);
var
table
=
getParent
(
td
,
'TABLE'
);
var
rows
=
table
.
rows
;
if
(
table
.
rows
.
length
<=
1
)
return
;
if
(
rows
.
length
<=
1
)
return
;
// detect sort type
// detect sort type
var
sortNumeric
=
false
;
var
sortNumeric
=
true
;
var
x
=
getInnerText
(
table
.
rows
[
1
].
cells
[
column
]);
for
(
i
=
1
;
i
<
rows
.
length
;
i
++
)
{
if
(
x
.
match
(
/^
[\d\.]
+$/
))
{
var
td
=
rows
[
i
].
cells
[
column
];
sortNumeric
=
true
;
if
(
!
isNullCell
(
td
))
{
var
x
=
getInnerText
(
td
);
// H2 does not return numeric values with leading +, but may return
// values in scientific notation
if
(
!
x
.
match
(
/^
\-?\d
*
\.?\d
+
(?:[
Ee
][\+\-]?\d
+
)?
$/
))
{
sortNumeric
=
false
;
break
;
}
}
}
}
var
newRows
=
new
Array
();
var
newRows
=
new
Array
();
var
rows
=
table
.
rows
;
for
(
i
=
1
;
i
<
rows
.
length
;
i
++
)
{
for
(
i
=
1
;
i
<
rows
.
length
;
i
++
)
{
var
o
=
new
Object
();
var
o
=
new
Object
();
o
.
data
=
rows
[
i
];
o
.
data
=
rows
[
i
];
o
.
id
=
i
;
o
.
id
=
i
;
var
td
=
o
.
data
.
cells
[
column
];
var
n
=
isNullCell
(
td
);
o
.
isNull
=
n
;
if
(
!
n
)
{
var
txt
=
getInnerText
(
td
);
if
(
sortNumeric
)
{
if
(
sortNumeric
)
{
o
.
sort
=
parseFloat
(
getInnerText
(
o
.
data
.
cells
[
column
])
);
o
.
sort
=
parseFloat
(
txt
);
if
(
isNaN
(
o
.
sort
))
o
.
sort
=
0
;
if
(
isNaN
(
o
.
sort
))
o
.
sort
=
0
;
}
else
{
}
else
{
o
.
sort
=
getInnerText
(
o
.
data
.
cells
[
column
]);
o
.
sort
=
txt
;
}
}
}
newRows
[
i
-
1
]
=
o
;
newRows
[
i
-
1
]
=
o
;
}
}
...
@@ -240,6 +257,10 @@ function getParent(el, pTagName) {
...
@@ -240,6 +257,10 @@ function getParent(el, pTagName) {
}
}
function
sortCallback
(
ra
,
rb
)
{
function
sortCallback
(
ra
,
rb
)
{
if
(
ra
.
isNull
)
{
return
rb
.
isNull
?
(
ra
.
id
-
rb
.
id
)
:
-
1
;
}
else
if
(
rb
.
IsNull
)
{
return
1
;
}
return
(
ra
.
sort
==
rb
.
sort
)
?
(
ra
.
id
-
rb
.
id
)
:
(
ra
.
sort
<
rb
.
sort
?
-
1
:
1
);
return
(
ra
.
sort
==
rb
.
sort
)
?
(
ra
.
id
-
rb
.
id
)
:
(
ra
.
sort
<
rb
.
sort
?
-
1
:
1
);
}
}
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
cf11224f
...
@@ -771,4 +771,4 @@ openoffice organize libre systemtables gmane sea borders announced millennium al
...
@@ -771,4 +771,4 @@ openoffice organize libre systemtables gmane sea borders announced millennium al
opti excessively
opti excessively
iterators tech enums incompatibilities loses reimplement readme reorganize milli subdirectory linkplain inspections
iterators tech enums incompatibilities loses reimplement readme reorganize milli subdirectory linkplain inspections
geometries sourceschema destschema generatedcolumn
geometries sourceschema destschema generatedcolumn
alphanumerically
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论