Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
野花太放肆
jenkins
提交
81bdb4be
J
jenkins
项目概览
野花太放肆
/
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,发现更多精彩内容 >>
提交
81bdb4be
编写于
8月 21, 2012
作者:
J
Jesse Glick
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated to Behaviour.specify.
上级
19e2a012
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
29 addition
and
59 deletion
+29
-59
core/src/main/resources/hudson/PluginManager/_table.js
core/src/main/resources/hudson/PluginManager/_table.js
+2
-4
core/src/main/resources/hudson/console/ExpandableDetailsNote/script.js
.../resources/hudson/console/ExpandableDetailsNote/script.js
+1
-4
core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config.jelly
...n/security/GlobalMatrixAuthorizationStrategy/config.jelly
+4
-5
core/src/main/resources/lib/form/advanced/advanced.js
core/src/main/resources/lib/form/advanced/advanced.js
+1
-3
core/src/main/resources/lib/form/apply/apply.js
core/src/main/resources/lib/form/apply/apply.js
+1
-3
core/src/main/resources/lib/form/combobox/combobox.js
core/src/main/resources/lib/form/combobox/combobox.js
+1
-3
core/src/main/resources/lib/form/hetero-list/hetero-list.js
core/src/main/resources/lib/form/hetero-list/hetero-list.js
+3
-5
core/src/main/resources/lib/form/radioBlock/radioBlock.js
core/src/main/resources/lib/form/radioBlock/radioBlock.js
+2
-6
core/src/main/resources/lib/form/repeatable/repeatable.js
core/src/main/resources/lib/form/repeatable/repeatable.js
+6
-10
core/src/main/resources/lib/form/select/select.js
core/src/main/resources/lib/form/select/select.js
+1
-3
core/src/main/resources/lib/form/textarea/textarea.js
core/src/main/resources/lib/form/textarea/textarea.js
+3
-5
core/src/main/resources/lib/layout/copyButton/copyButton.js
core/src/main/resources/lib/layout/copyButton/copyButton.js
+1
-3
war/src/main/webapp/scripts/hudson-behavior.js
war/src/main/webapp/scripts/hudson-behavior.js
+3
-5
未找到文件。
core/src/main/resources/hudson/PluginManager/_table.js
浏览文件 @
81bdb4be
...
...
@@ -20,8 +20,7 @@ function showhideCategory(col) {
row
.
style
.
display
=
newDisplay
;
}
Behaviour
.
register
({
"
#filter-box
"
:
function
(
e
)
{
Behaviour
.
specify
(
"
#filter-box
"
,
'
_table
'
,
0
,
function
(
e
)
{
function
applyFilter
()
{
var
filter
=
e
.
value
.
toLowerCase
();
[
"
TR.plugin
"
,
"
TR.plugin-category
"
].
each
(
function
(
clz
)
{
...
...
@@ -36,5 +35,4 @@ Behaviour.register({
}
e
.
onkeyup
=
applyFilter
;
}
});
});
core/src/main/resources/hudson/console/ExpandableDetailsNote/script.js
浏览文件 @
81bdb4be
(
function
()
{
Behaviour
.
register
({
"
INPUT.reveal-expandable-detail
"
:
function
(
e
)
{
Behaviour
.
specify
(
"
INPUT.reveal-expandable-detail
"
,
'
ExpandableDetailsNote
'
,
0
,
function
(
e
)
{
var
detail
=
e
.
nextSibling
;
makeButton
(
e
,
function
()
{
detail
.
style
.
display
=
(
detail
.
style
.
display
==
"
block
"
)?
"
none
"
:
"
block
"
;
});
}
});
}());
core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config.jelly
浏览文件 @
81bdb4be
...
...
@@ -144,16 +144,15 @@ THE SOFTWARE.
});
})();
Behaviour.register({
"#${strategyid} TD.stop A.remove" : function(e) {
Behaviour.specify("#${strategyid} TD.stop A.remove", 'GlobalMatrixAuthorizationStrategy', 0, function(e) {
e.onclick = function() {
var tr = findAncestor(this,"TR");
tr.parentNode.removeChild(tr);
return false;
}
e = null; <!-- avoid memory leak -->
}
,
"#${strategyid} TD.stop A.toggleall" :
function(e) {
}
);
Behaviour.specify("#${strategyid} TD.stop A.toggleall", 'GlobalMatrixAuthorizationStrategy', 0,
function(e) {
e.onclick = function() {
var tr = findAncestor(this,"TR");
var inputs = tr.getElementsByTagName("INPUT");
...
...
@@ -163,7 +162,7 @@ THE SOFTWARE.
return false;
};
e = null; <!-- avoid memory leak -->
}
,
}
);
<j:if test="${empty(descriptorPath)}">
<j:set var="descriptorPath" value="${descriptor.descriptorFullUrl}"/>
</j:if>
...
...
core/src/main/resources/lib/form/advanced/advanced.js
浏览文件 @
81bdb4be
Behaviour
.
register
({
"
INPUT.advanced-button
"
:
function
(
e
)
{
Behaviour
.
specify
(
"
INPUT.advanced-button
"
,
'
advanced
'
,
0
,
function
(
e
)
{
makeButton
(
e
,
function
(
e
)
{
var
link
=
e
.
target
;
while
(
!
Element
.
hasClassName
(
link
,
"
advancedLink
"
))
...
...
@@ -23,5 +22,4 @@ Behaviour.register({
layoutUpdateCallback
.
call
();
});
e
=
null
;
// avoid memory leak
}
});
\ No newline at end of file
core/src/main/resources/lib/form/apply/apply.js
浏览文件 @
81bdb4be
Behaviour
.
register
({
"
INPUT.apply-button
"
:
function
(
e
)
{
Behaviour
.
specify
(
"
INPUT.apply-button
"
,
'
apply
'
,
0
,
function
(
e
)
{
var
id
;
var
containerId
=
"
container
"
+
(
iota
++
);
...
...
@@ -63,5 +62,4 @@ Behaviour.register({
f
.
target
=
null
;
}
});
}
});
\ No newline at end of file
core/src/main/resources/lib/form/combobox/combobox.js
浏览文件 @
81bdb4be
Behaviour
.
register
({
"
INPUT.combobox2
"
:
function
(
e
)
{
Behaviour
.
specify
(
"
INPUT.combobox2
"
,
'
combobox
'
,
0
,
function
(
e
)
{
var
items
=
[];
var
c
=
new
ComboBox
(
e
,
function
(
value
)
{
...
...
@@ -21,5 +20,4 @@ Behaviour.register({
}
});
});
}
});
\ No newline at end of file
core/src/main/resources/lib/form/hetero-list/hetero-list.js
浏览文件 @
81bdb4be
...
...
@@ -2,8 +2,7 @@
// do the ones that extract innerHTML so that they can get their original HTML before
// other behavior rules change them (like YUI buttons.)
Behaviour
.
list
.
unshift
({
"
DIV.hetero-list-container
"
:
function
(
e
)
{
Behaviour
.
specify
(
"
DIV.hetero-list-container
"
,
'
hetero-list
'
,
-
100
,
function
(
e
)
{
e
=
$
(
e
);
if
(
isInsideRemovable
(
e
))
return
;
...
...
@@ -134,9 +133,9 @@ Behaviour.list.unshift({
}
});
}
}
,
}
);
"
DIV.dd-handle
"
:
function
(
e
)
{
Behaviour
.
specify
(
"
DIV.dd-handle
"
,
'
hetero-list
'
,
-
100
,
function
(
e
)
{
e
=
$
(
e
);
e
.
on
(
"
mouseover
"
,
function
()
{
$
(
this
).
up
(
"
.repeated-chunk
"
).
addClassName
(
"
hover
"
);
...
...
@@ -144,5 +143,4 @@ Behaviour.list.unshift({
e
.
on
(
"
mouseout
"
,
function
()
{
$
(
this
).
up
(
"
.repeated-chunk
"
).
removeClassName
(
"
hover
"
);
});
}
});
core/src/main/resources/lib/form/radioBlock/radioBlock.js
浏览文件 @
81bdb4be
...
...
@@ -24,11 +24,8 @@ var radioBlockSupport = {
}
};
Behaviour
.
list
.
unshift
({
// this needs to happen before TR.row-set-end rule kicks in.
// but this is a hack.
// TODO: how do we handle ordering?
"
INPUT.radio-block-control
"
:
function
(
r
)
{
// this needs to happen before TR.row-set-end rule kicks in.
Behaviour
.
specify
(
"
INPUT.radio-block-control
"
,
'
radioBlock
'
,
-
100
,
function
(
r
)
{
r
.
id
=
"
radio-block-
"
+
(
iota
++
);
// when one radio button is clicked, we need to update foldable block for
...
...
@@ -73,5 +70,4 @@ Behaviour.list.unshift({
// install event handlers to update visibility.
// needs to use onclick and onchange for Safari compatibility
r
.
onclick
=
r
.
onchange
=
function
()
{
g
.
updateButtons
();
};
}
});
core/src/main/resources/lib/form/repeatable/repeatable.js
浏览文件 @
81bdb4be
...
...
@@ -99,8 +99,7 @@ var repeatableSupport = {
// do the ones that extract innerHTML so that they can get their original HTML before
// other behavior rules change them (like YUI buttons.)
Behaviour
.
list
.
unshift
({
"
DIV.repeated-container
"
:
function
(
e
)
{
Behaviour
.
specify
(
"
DIV.repeated-container
"
,
'
repeatable
'
,
-
100
,
function
(
e
)
{
if
(
isInsideRemovable
(
e
))
return
;
// compute the insertion point
...
...
@@ -109,27 +108,25 @@ Behaviour.list.unshift({
ip
=
ip
.
previous
();
// set up the logic
object
(
repeatableSupport
).
init
(
e
,
e
.
firstChild
,
ip
);
}
});
Behaviour
.
register
({
// button to add a new repeatable block
"
INPUT.repeatable-add
"
:
function
(
e
)
{
Behaviour
.
specify
(
"
INPUT.repeatable-add
"
,
'
repeatable
'
,
0
,
function
(
e
)
{
makeButton
(
e
,
function
(
e
)
{
repeatableSupport
.
onAdd
(
e
.
target
);
});
e
=
null
;
// avoid memory leak
}
,
}
);
"
INPUT.repeatable-delete
"
:
function
(
e
)
{
Behaviour
.
specify
(
"
INPUT.repeatable-delete
"
,
'
repeatable
'
,
0
,
function
(
e
)
{
makeButton
(
e
,
function
(
e
)
{
repeatableSupport
.
onDelete
(
e
.
target
);
});
e
=
null
;
// avoid memory leak
}
,
}
);
// radio buttons in repeatable content
"
DIV.repeated-chunk
"
:
function
(
d
)
{
Behaviour
.
specify
(
"
DIV.repeated-chunk
"
,
'
repeatable
'
,
0
,
function
(
d
)
{
var
inputs
=
d
.
getElementsByTagName
(
'
INPUT
'
);
for
(
var
i
=
0
;
i
<
inputs
.
length
;
i
++
)
{
if
(
inputs
[
i
].
type
==
'
radio
'
)
{
...
...
@@ -145,5 +142,4 @@ Behaviour.register({
if
(
inputs
[
i
].
defaultChecked
)
inputs
[
i
].
checked
=
true
;
}
}
}
});
\ No newline at end of file
core/src/main/resources/lib/form/select/select.js
浏览文件 @
81bdb4be
...
...
@@ -40,8 +40,7 @@ function updateListBox(listBox,url,config) {
new
Ajax
.
Request
(
url
,
config
);
}
Behaviour
.
register
({
"
SELECT.select
"
:
function
(
e
)
{
Behaviour
.
specify
(
"
SELECT.select
"
,
'
select
'
,
0
,
function
(
e
)
{
// controls that this SELECT box depends on
refillOnChange
(
e
,
function
(
params
)
{
var
value
=
e
.
value
;
...
...
@@ -63,5 +62,4 @@ Behaviour.register({
}
});
});
}
});
\ No newline at end of file
core/src/main/resources/lib/form/textarea/textarea.js
浏览文件 @
81bdb4be
Behaviour
.
register
({
"
TEXTAREA.codemirror
"
:
function
(
e
)
{
Behaviour
.
specify
(
"
TEXTAREA.codemirror
"
,
'
textarea
'
,
0
,
function
(
e
)
{
var
h
=
e
.
clientHeight
;
var
config
=
e
.
getAttribute
(
"
codemirror-config
"
)
||
""
;
config
=
eval
(
'
({
'
+
config
+
'
})
'
);
...
...
@@ -14,9 +13,9 @@ Behaviour.register({
var
scroller
=
codemirror
.
getScrollerElement
();
scroller
.
setAttribute
(
"
style
"
,
"
border:1px solid black;
"
);
scroller
.
style
.
height
=
h
+
"
px
"
;
}
,
}
);
"
DIV.textarea-preview-container
"
:
function
(
e
)
{
Behaviour
.
specify
(
"
DIV.textarea-preview-container
"
,
'
textarea
'
,
0
,
function
(
e
)
{
var
previewDiv
=
findElementsBySelector
(
e
,
"
.textarea-preview
"
)[
0
];
var
showPreview
=
findElementsBySelector
(
e
,
"
.textarea-show-preview
"
)[
0
];
var
hidePreview
=
findElementsBySelector
(
e
,
"
.textarea-hide-preview
"
)[
0
];
...
...
@@ -54,5 +53,4 @@ Behaviour.register({
$
(
hidePreview
).
hide
();
$
(
previewDiv
).
hide
();
};
}
});
\ No newline at end of file
core/src/main/resources/lib/layout/copyButton/copyButton.js
浏览文件 @
81bdb4be
// @include "org.kohsuke.stapler.zeroclipboard"
Behaviour
.
register
({
"
span.copy-button
"
:
function
(
e
)
{
Behaviour
.
soecify
(
"
span.copy-button
"
,
'
copyButton
'
,
0
,
function
(
e
)
{
var
btn
=
e
.
firstChild
;
var
id
=
"
copy-button
"
+
(
iota
++
);
btn
.
id
=
id
;
...
...
@@ -35,5 +34,4 @@ Behaviour.register({
clip
.
addEventListener
(
'
onMouseUp
'
,
function
()
{
$
(
id
).
removeClassName
(
'
yui-button-active
'
)
});
}
});
war/src/main/webapp/scripts/hudson-behavior.js
浏览文件 @
81bdb4be
...
...
@@ -1159,7 +1159,9 @@ var jenkinsRules = {
adjustSticker
();
}
};
var
hudsonRules
=
jenkinsRules
;
// legacy name
for
(
var
selector
in
jenkinsRules
)
{
Behaviour
.
specify
(
selector
,
'
hudson-behavior
'
,
0
,
jenkinsRules
[
selector
]);
}
function
applyTooltip
(
e
,
text
)
{
// copied from YAHOO.widget.Tooltip.prototype.configContext to efficiently add a new element
...
...
@@ -1212,10 +1214,6 @@ function refillOnChange(e,onChange) {
h
();
// initial fill
}
Behaviour
.
register
(
hudsonRules
);
function
xor
(
a
,
b
)
{
// convert both values to boolean by '!' and then do a!=b
return
!
a
!=
!
b
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录