提交 4d324980 编写于 作者: M mindless

makeButton expects object param, not ID string (fixes behavior in Opera; somehow still

worked in firefox).
also fixed check for adding a user/group name that is already in table.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14674 71c3de6d-444a-0410-be80-ed276b4c234a
上级 f3e9c7c9
......@@ -87,14 +87,14 @@
var table = master.parentNode;
table.removeChild(master);
makeButton("${id}button", function (e) {
makeButton($$('${id}button'), function (e) {
<!-- when 'add' is clicked... -->
var name = $$('${id}text').value;
if(name=="") {
alert("Please enter an user name or a group name");
alert("Please enter a user name or a group name");
return;
}
if(findElementsBySelector(table,"TR").find(function(n){return n.getAttribute("name")==name;})!=null) {
if(findElementsBySelector(table,"TR").find(function(n){return n.getAttribute("name")=='['+name+']';})!=null) {
alert("Entry for '"+name+"' already exists");
return;
}
......@@ -124,4 +124,4 @@
});
</script>
</f:block>
</j:jelly>
\ No newline at end of file
</j:jelly>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册