提交 fa154b77 编写于 作者: T Thorsten Scherler

[JENKINS-53462] Use a workaround to submit the form with a trusted event. No...

[JENKINS-53462] Use a workaround to submit the form with a trusted event. No comments on the underlying insanity of hudson-behavior.
上级 b057abc7
......@@ -517,7 +517,16 @@ function registerRegexpValidator(e,regexp,message) {
* YUI Button widget.
*/
function makeButton(e,onclick) {
var h = e.onclick;
var type = e.type;
var h = e.onclick || function (event) {
if (type && type.toLowerCase() === 'submit') {
var target = event.target;
var form = findAncestor(target, "FORM");
form.submit();
} else {
//FIXME: get some usecases for else
}
};
var clsName = e.className;
var n = e.name;
var btn = new YAHOO.widget.Button(e,{});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册