Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
jenkins
提交
574d8b9a
J
jenkins
项目概览
xxadev
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
574d8b9a
编写于
2月 08, 2016
作者:
T
tfennelly
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Nested row groupings
Some tests are failing through
上级
1a213ccc
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
57 addition
and
40 deletion
+57
-40
core/src/main/resources/lib/form/optionalBlock.jelly
core/src/main/resources/lib/form/optionalBlock.jelly
+2
-2
core/src/main/resources/lib/form/radioBlock.jelly
core/src/main/resources/lib/form/radioBlock.jelly
+2
-2
core/src/main/resources/lib/form/rowSet.jelly
core/src/main/resources/lib/form/rowSet.jelly
+2
-2
war/src/main/js/widgets/config/model/ConfigRowSet.js
war/src/main/js/widgets/config/model/ConfigRowSet.js
+22
-3
war/src/main/js/widgets/config/model/ConfigSection.js
war/src/main/js/widgets/config/model/ConfigSection.js
+29
-31
未找到文件。
core/src/main/resources/lib/form/optionalBlock.jelly
浏览文件 @
574d8b9a
...
...
@@ -66,7 +66,7 @@ THE SOFTWARE.
<j:choose>
<j:when test="${attrs.title!=null}">
<tr class="optional-block-start ${attrs.inline?'':'row-set-start'}" hasHelp="${attrs.help!=null}"><!-- this ID marks the beginning -->
<tr class="optional-block-start
row-group-start
${attrs.inline?'':'row-set-start'}" hasHelp="${attrs.help!=null}"><!-- this ID marks the beginning -->
<td colspan="3">
<f:checkbox name="${attrs.name}" class="optional-block-control block-control" onclick="javascript:updateOptionalBlock(this,true)"
negative="${attrs.negative}" checked="${attrs.checked}" field="${attrs.field}" title="${title}" />
...
...
@@ -79,7 +79,7 @@ THE SOFTWARE.
<tr class="rowvg-start" />
<d:invokeBody />
<!-- end marker -->
<tr class="${attrs.inline?'':'row-set-end'} rowvg-end optional-block-end" />
<tr class="${attrs.inline?'':'row-set-end'} rowvg-end optional-block-end
row-group-end
" />
</j:when>
<j:otherwise>
...
...
core/src/main/resources/lib/form/radioBlock.jelly
浏览文件 @
574d8b9a
...
...
@@ -54,7 +54,7 @@ THE SOFTWARE.
<st:adjunct includes="lib.form.radioBlock.radioBlock"/>
<tr class="radio-block-start ${attrs.inline?'':'row-set-start'}" hasHelp="${attrs.help!=null}"><!-- this ID marks the beginning -->
<tr class="radio-block-start
row-group-start
${attrs.inline?'':'row-set-start'}" hasHelp="${attrs.help!=null}"><!-- this ID marks the beginning -->
<td colspan="3">
<label>
<input type="radio" name="${name}" value="${value}"
...
...
@@ -69,5 +69,5 @@ THE SOFTWARE.
</j:if>
<d:invokeBody />
<!-- end marker -->
<tr class="${attrs.inline?'':'row-set-end'} radio-block-end" style="display:none" />
<tr class="${attrs.inline?'':'row-set-end'} radio-block-end
row-group-end
" style="display:none" />
</j:jelly>
core/src/main/resources/lib/form/rowSet.jelly
浏览文件 @
574d8b9a
...
...
@@ -43,9 +43,9 @@ THE SOFTWARE.
<d:invokeBody />
</j:when>
<j:otherwise>
<tr ref="${attrs.ref}" class="row-set-start" style="display:none" name="${attrs.name}" />
<tr ref="${attrs.ref}" class="row-set-start
row-group-start
" style="display:none" name="${attrs.name}" />
<d:invokeBody />
<tr class="row-set-end" />
<tr class="row-set-end
row-group-end
" />
</j:otherwise>
</j:choose>
</j:jelly>
\ No newline at end of file
war/src/main/js/widgets/config/model/ConfigRowSet.js
浏览文件 @
574d8b9a
...
...
@@ -4,17 +4,36 @@ module.exports = ConfigRowSet;
/*
* =======================================================================================
* Configuration table row
-set.
* Configuration table row
grouping i.e. row-set-*, optional-block-*,
* =======================================================================================
*/
function
ConfigRowSet
(
startRow
)
{
function
ConfigRowSet
(
startRow
,
parentRowSetContainer
)
{
this
.
startRow
=
startRow
;
this
.
rows
=
[]
;
this
.
parentRowSetContainer
=
parentRowSetContainer
;
this
.
endRow
=
undefined
;
this
.
rows
=
[];
this
.
rowSets
=
[];
this
.
toggleWidget
=
undefined
;
this
.
label
=
undefined
;
}
ConfigRowSet
.
prototype
.
updateVisibility
=
function
()
{
if
(
this
.
toggleWidget
!==
undefined
)
{
var
isChecked
=
this
.
toggleWidget
.
is
(
'
:checked
'
);
for
(
var
i
=
0
;
i
<
this
.
rows
.
length
;
i
++
)
{
if
(
isChecked
)
{
this
.
rows
[
i
].
show
();
}
else
{
this
.
rows
[
i
].
hide
();
}
}
}
for
(
var
ii
=
0
;
ii
<
this
.
rowSets
.
length
;
ii
++
)
{
var
rowSet
=
this
.
rowSets
[
ii
];
rowSet
.
updateVisibility
();
}
};
/*
* Find the row-set toggle widget i.e. the input element that indicates that
* the row-set rows should be made visible or not.
...
...
war/src/main/js/widgets/config/model/ConfigSection.js
浏览文件 @
574d8b9a
...
...
@@ -89,16 +89,7 @@ ConfigSection.prototype.updateRowSetVisibility = function() {
}
for
(
var
i
=
0
;
i
<
this
.
rowSets
.
length
;
i
++
)
{
var
rowSet
=
this
.
rowSets
[
i
];
if
(
rowSet
.
toggleWidget
!==
undefined
)
{
var
isChecked
=
rowSet
.
toggleWidget
.
is
(
'
:checked
'
);
for
(
var
ii
=
0
;
ii
<
rowSet
.
rows
.
length
;
ii
++
)
{
if
(
isChecked
)
{
rowSet
.
rows
[
ii
].
show
();
}
else
{
rowSet
.
rows
[
ii
].
hide
();
}
}
}
rowSet
.
updateVisibility
();
}
};
...
...
@@ -112,29 +103,36 @@ ConfigSection.prototype.gatherRowSets = function() {
// Also seems like you can have these "optional-block" thingies which are not wrapped
// in 'row-set-start' etc. Grrrrrr :(
var
curRowSet
=
undefined
;
// jshint ignore:line
var
rows
=
this
.
getRows
();
for
(
var
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
var
row
=
rows
[
i
];
if
(
row
.
hasClass
(
'
row-set-start
'
))
{
curRowSet
=
new
ConfigRowSet
(
row
);
curRowSet
.
findToggleWidget
(
row
);
}
else
if
(
curRowSet
!==
undefined
)
{
if
(
row
.
hasClass
(
'
row-set-end
'
))
{
curRowSet
.
endRow
=
row
;
// Only capture the row-set if we find a 'row-set-end'.
// Yeah, this does not handle hierarchical stuff (see above TO-DO).
this
.
rowSets
.
push
(
curRowSet
);
curRowSet
=
undefined
;
}
else
if
(
curRowSet
.
toggleWidget
===
undefined
)
{
curRowSet
.
findToggleWidget
(
row
);
if
(
rows
.
length
>
0
)
{
// Create a top level "fake" ConfigRowSet just to capture
// the top level groupings. We copy the rowSets info out
// of this and use it in the top "this" ConfigSection instance.
var
rowSetContainer
=
new
ConfigRowSet
(
rows
[
0
],
undefined
);
this
.
rowSets
=
rowSetContainer
.
rowSets
;
for
(
var
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
var
row
=
rows
[
i
];
if
(
row
.
hasClass
(
'
row-group-start
'
))
{
var
newRowSet
=
new
ConfigRowSet
(
row
,
rowSetContainer
);
rowSetContainer
.
rowSets
.
push
(
newRowSet
);
rowSetContainer
=
newRowSet
;
newRowSet
.
findToggleWidget
(
row
);
}
else
{
// we have the toggleWidget, which means that this row is
// one of the rows after that row and is one of the rows that's
// subject to being made visible/hidden when the input is
// checked or unchecked.
curRowSet
.
rows
.
push
(
row
);
if
(
row
.
hasClass
(
'
row-group-end
'
))
{
rowSetContainer
.
endRow
=
row
;
rowSetContainer
=
rowSetContainer
.
parentRowSetContainer
;
// pop back off the "stack"
}
else
if
(
rowSetContainer
.
toggleWidget
===
undefined
)
{
rowSetContainer
.
findToggleWidget
(
row
);
}
else
{
// we have the toggleWidget, which means that this row is
// one of the rows after that row and is one of the rows that's
// subject to being made visible/hidden when the input is
// checked or unchecked.
rowSetContainer
.
rows
.
push
(
row
);
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录