|
[
Permlink
| « Hide
]
Laura Kolker added a comment - 28/Nov/07 02:38 PM
Confirmed
I've changed the group picker code in src/etc/templates/extra/markforreview/customize/customizeui.vm a bit which works for me. The missing piece for me is the existionGroups parameter which I wasn't able to fill from the CustomizeAction.getExistingGroups() method
<form name="$!formName" action="$addAction" method="post"> #if ($action.isSpaceAction()) </div> <!-- end div id = moderator-picker --> Hi Daniel,
I'm not 100% I'm clear on the patch. Are you saying: ## Group picker #set ($formName = "addModeratorGroups") #set ($addAction = $action.addAction) <form name="$!formName" action="$addAction" method="post"> <div id="moderator-picker" style="$marginSpacer"> <label>$action.getText("markforreview.grant.permission.to")</label> #set ($elementName = "moderatorText") #set ($pickerAction = "dosearchgroupsfilterexisting.action") ## group picker will search for all terms that are not in the $existingGroups variable (set by the action) #set ($groupnameTerm = "*") <input type="textfield" id='$elementName' name="$elementName" value="" size="40" /> ## the group picker image element. #set ($pickerAlt = $action.getText("markforreview.customize.picker.alt")) #set ($pickerTitle = $action.getText("markforreview.customize.picker.title")) <a href="#" onClick="picker = window.open('$req.contextPath/spaces/$pickerAction?key=$!key&formName=$!formName&elementName=$!elementName&multiSelect=true&startIndex=0&groupsPerPage=10&actionName=$!pickerName&existingGroups=$!existingGroups&groupnameTerm=$!groupnameTerm', 'GroupPicker', 'status=yes,resizable=yes,top=100,left=200,width=580,height=550,scrollbars=yes'); picker.focus(); return false;"> <img src="$req.contextPath/images/icons/srch_16.gif" height=16 width=16 border=0 align=absmiddle alt="$pickerAlt" title="$pickerTitle"/> </a> ## add moderator button #set ($addButtonText = $action.getText("markforreview.customize.button.add")) <input type="submit" value="$addButtonText" /> </form> with this: ## Group picker #set ($formName = "addModeratorGroups") #set ($addAction = $action.addAction) <form name="$!formName" action="$addAction" method="post"> <div id="moderator-picker" style="$marginSpacer"> <div style="margin:10px 0px"> #bodytag (Component "theme='custom'" "label='Grant privileges to'" "name='moderatorText'" "template='textfield-and-picker.vm'") #param ("formName" "$formName") #param ("buttonOff" false) #param ("value" $editPermissionGroup) #param ("buttonName" "groupsToAddButton") #param ("imgTitle" "$action.getText('find.groups')") #end </div> </form> ? Cheers, Attached screenshot of existing grouppicker functionality.
(cmfr-26-grouppicker-existing.png) Attaching screenshot of patch described in this comment:
http://developer.atlassian.com/jira/browse/CMFR-26?focusedCommentId=16675#action_16675 (cmfr-26-grouppicker-patch.png) So here's what I'm noticing about the patch.
The list of existing groups does not appear to get provided, (see cmfr-26-grouppicker-patch.png) BUT after using the search tool, the select group button correctly does what it's supposed to. This is as opposed to the unpatched grouppicker, which provides both search and existing groups list (see cmfr-26-grouppicker-existing.png), but does not have a correctly functioning select group button. The problem I run into with the broken select group button gives me the following error: missing ; before statement
[Break on this error] opener.${onPopupSubmit}(getEntityNames()); window.close();
dosearchgroupsfilterexisting.action (line 1)
Daniel: Does this match your experience? Cheers, Followed up on Daniel's patch by making a customized textfield-and-picker template which could use the groupnameTerm, necessary to get the grouppicker to do the initial
* Details: Results:
Attached plugin jar for release candidate 5
plugins-mark-for-review-1.3-RC5.jar which should have the fix for |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||