Item10818: New groups UI doesn't add groups to a group because JQueryAjaxHelper?section=user
only lists users
Priority: Normal
Current State: Closed
Released In: 1.1.4
Target Release: patch
Applies To: Extension
Component: JQueryPlugin
Branches: Release01x01 trunk
--
PaulHarvey - 01 Jun 2011
Patch I'm using atm:
diff --git a/data/System/JQueryAjaxHelper.txt b/data/System/JQueryAjaxHelper.txt
index dc3d74d..d624fec 100644
--- a/data/System/JQueryAjaxHelper.txt
+++ b/data/System/JQueryAjaxHelper.txt
@@ -239,16 +239,16 @@ jQuery(function($){
* =q=: search term substring typed so far
* =limit=: number of search results to return, defaults to 10
<verbatim class="tml">
-%STARTSECTION{"user"}%%SEARCH{
- "^%URLPARAM{"q" default="does not exist"}%.*"
- type="regex"
+%STARTSECTION{"user"}%<noautolink>%SEARCH{
+ "lc(name)~lc('*%URLPARAM{"q" default="does not exist"}%*') AND (form.name='UserForm' OR lc(name)~'*group')"
+ type="query"
scope="topic"
- format="$percntUSERINFO{\"$topic\" format=\"<nop>$dollarwikiname|$dollaremails|$percntFORMFIELD{\"Photo\" topic=\"$web.$topic\" default=\"%PUBURLPATH%/%SYSTEMWEB%/JQueryPlugin/images/nobody.gif\" alttext=\"%PUBURLPATH%/%SYSTEMWEB%/JQueryPlugin/images/nobody.gif\"}$percnt$n\"}$percnt"
+ format="$percntIF{\"'$formname'~'*UserForm'\" then=\"$percntUSERINFO{\"$topic\" format=\"<nop>$dollarwikiname|$dollaremails|$formfield(Photo)\"}$percnt\" else=\"<nop>$topic|$percntCALC{$LISTMAP(<nop>$item, $LISTTRUNCATE(5, $percntQUERY{'$web.$topic'/preferences[name='GROUP'].value}$percnt))}$percnt, ...\"}$percnt|$n"
separator=""
limit="%URLPARAM{"limit" default="10"}%"
nonoise="on"
web="%USERSWEB%"
-}%%ENDSECTION{"user"}%
+}%</noautolink>%ENDSECTION{"user"}%
</verbatim>
---+++ Example
--
PaulHarvey - 22 Jun 2011
Paul, Does this still apply? I'm able to add groups to groups just fine. I think enforcing the list to existing users (or groups) has been disabled.
--
GeorgeClark - 28 Oct 2011
The current
JQueryAjaxHelper uses a
format
that works only for users. It still doesn't work for me: *Group suggestions are not present in the add members autocomplete
--
PaulHarvey - 29 Oct 2011
Paul, I've spent quite a few hours on this today - the
JQueryAjaxHelper seems to have changed a lot since your patch - I'm getting lost in the nested quotes and percents and dollars. I'm beginning to wonder if it makes more sense to update the
USERINFO macro to return some similar information if the target is a groupname instead of a username. A group being a special form of a "user".
--
GeorgeClark - 29 Oct 2011
Ok. I need to revisit this at a later date.
--
PaulHarvey - 30 Oct 2011