From 4d3249801056983fe2bfec70c5d3bf1a0677a0a1 Mon Sep 17 00:00:00 2001 From: mindless Date: Tue, 20 Jan 2009 22:48:28 +0000 Subject: [PATCH] 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 --- .../GlobalMatrixAuthorizationStrategy/config.jelly | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config.jelly b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config.jelly index d6ef6d9ba7..21ec0d816c 100644 --- a/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config.jelly +++ b/core/src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config.jelly @@ -87,14 +87,14 @@ var table = master.parentNode; table.removeChild(master); - makeButton("${id}button", function (e) { + makeButton($$('${id}button'), function (e) { 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 @@ }); - \ No newline at end of file + -- GitLab