Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FIY695
jenkins
提交
d2d7e43e
J
jenkins
项目概览
FIY695
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
d2d7e43e
编写于
4月 19, 2012
作者:
K
Kohsuke Kawaguchi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
by default, try to preserve the order
上级
28bcaea8
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
54 addition
and
6 deletion
+54
-6
core/src/main/resources/lib/form/hetero-list.jelly
core/src/main/resources/lib/form/hetero-list.jelly
+5
-1
core/src/main/resources/lib/hudson/project/config-publishers.jelly
...main/resources/lib/hudson/project/config-publishers.jelly
+1
-0
war/src/main/webapp/scripts/hudson-behavior.js
war/src/main/webapp/scripts/hudson-behavior.js
+48
-5
未找到文件。
core/src/main/resources/lib/form/hetero-list.jelly
浏览文件 @
d2d7e43e
...
@@ -58,6 +58,10 @@ THE SOFTWARE.
...
@@ -58,6 +58,10 @@ THE SOFTWARE.
<st:attribute name="menuAlign">
<st:attribute name="menuAlign">
Menu alignment against the button. Defaults to tl-bl
Menu alignment against the button. Defaults to tl-bl
</st:attribute>
</st:attribute>
<st:attribute name="honorOrder">
If true, insert new addition by default to their 'desired' location, which
is the order induced by the descriptors.
</st:attribute>
</st:documentation>
</st:documentation>
<d:taglib uri="local">
<d:taglib uri="local">
<d:tag name="body">
<d:tag name="body">
...
@@ -96,7 +100,7 @@ THE SOFTWARE.
...
@@ -96,7 +100,7 @@ THE SOFTWARE.
</d:taglib>
</d:taglib>
<j:set var="targetType" value="${attrs.targetType?:it.class}"/>
<j:set var="targetType" value="${attrs.targetType?:it.class}"/>
<div class="hetero-list-container ${hasHeader?'with-drag-drop':''} ${attrs.oneEach?'one-each':''}">
<div class="hetero-list-container ${hasHeader?'with-drag-drop':''} ${attrs.oneEach?'one-each':''}
${attrs.honorOrder?'honor-order':''}
">
<!-- display existing items -->
<!-- display existing items -->
<j:forEach var="i" items="${attrs.items}">
<j:forEach var="i" items="${attrs.items}">
<j:set var="descriptor" value="${i.descriptor}" />
<j:set var="descriptor" value="${i.descriptor}" />
...
...
core/src/main/resources/lib/hudson/project/config-publishers.jelly
浏览文件 @
d2d7e43e
...
@@ -34,6 +34,7 @@ THE SOFTWARE.
...
@@ -34,6 +34,7 @@ THE SOFTWARE.
items="${it.publishersList}"
items="${it.publishersList}"
oneEach="true"
oneEach="true"
menuAlign="bl-tl"
menuAlign="bl-tl"
honorOrder="true"
addCaption="${%Add post-build action}"/>
addCaption="${%Add post-build action}"/>
</f:block>
</f:block>
</f:section>
</f:section>
...
...
war/src/main/webapp/scripts/hudson-behavior.js
浏览文件 @
d2d7e43e
...
@@ -556,7 +556,53 @@ var jenkinsRules = {
...
@@ -556,7 +556,53 @@ var jenkinsRules = {
var
scroll
=
document
.
body
.
scrollTop
;
var
scroll
=
document
.
body
.
scrollTop
;
renderOnDemand
(
findElementsBySelector
(
nc
,
"
TR.config-page
"
)[
0
],
function
()
{
renderOnDemand
(
findElementsBySelector
(
nc
,
"
TR.config-page
"
)[
0
],
function
()
{
insertionPoint
.
insert
({
after
:
nc
});
function
findInsertionPoint
()
{
// given the element to be inserted 'prospect',
// and the array of existing items 'current',
// and preferred ordering function, return the position in the array
// the prospect should be inserted.
// (for example 0 if it should be the first item)
function
findBestPosition
(
prospect
,
current
,
order
)
{
function
desirability
(
pos
)
{
var
count
=
0
;
for
(
var
i
=
0
;
i
<
current
.
length
;
i
++
)
{
if
((
i
<
pos
)
==
(
order
(
current
[
i
])
<=
order
(
prospect
)))
count
++
;
}
return
count
;
}
var
bestScore
=
-
1
;
var
bestPos
=
0
;
for
(
var
i
=
0
;
i
<=
current
.
length
;
i
++
)
{
var
d
=
desirability
(
i
);
if
(
bestScore
<=
d
)
{
// prefer to insert them toward the end
bestScore
=
d
;
bestPos
=
i
;
}
}
return
bestPos
;
}
var
current
=
e
.
childElements
().
findAll
(
function
(
e
)
{
return
e
.
match
(
"
DIV.repeated-chunk
"
)});
function
o
(
did
)
{
if
(
Object
.
isElement
(
did
))
did
=
did
.
getAttribute
(
"
descriptorId
"
);
for
(
var
i
=
0
;
i
<
templates
.
length
;
i
++
)
if
(
templates
[
i
].
descriptorId
==
did
)
return
i
;
return
0
;
// can't happen
}
var
bestPos
=
findBestPosition
(
t
.
descriptorId
,
current
,
o
);
if
(
bestPos
<
current
.
length
)
return
current
[
bestPos
];
else
return
insertionPoint
;
}
(
e
.
hasClassName
(
"
honor-order
"
)
?
findInsertionPoint
()
:
insertionPoint
).
insert
({
before
:
nc
});
if
(
withDragDrop
)
prepareDD
(
nc
);
if
(
withDragDrop
)
prepareDD
(
nc
);
new
YAHOO
.
util
.
Anim
(
nc
,
{
new
YAHOO
.
util
.
Anim
(
nc
,
{
...
@@ -589,10 +635,7 @@ var jenkinsRules = {
...
@@ -589,10 +635,7 @@ var jenkinsRules = {
menuButton
.
getMenu
().
showEvent
.
subscribe
(
function
()
{
menuButton
.
getMenu
().
showEvent
.
subscribe
(
function
()
{
var
items
=
menuButton
.
getMenu
().
getItems
();
var
items
=
menuButton
.
getMenu
().
getItems
();
for
(
i
=
0
;
i
<
items
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
items
.
length
;
i
++
)
{
// TEST
items
[
i
].
cfg
.
setProperty
(
"
disabled
"
,
has
(
templates
[
i
].
descriptorId
));
if
(
has
(
templates
[
i
].
descriptorId
))
{
items
[
i
].
cfg
.
setProperty
(
"
disabled
"
,
true
);
}
}
}
});
});
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录