Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rob Watkins 369 posts 701 karma points
    Jan 23, 2012 @ 18:29
    Rob Watkins
    0

    Syncing member tree

    I've written a new dashboard user control to replace the built in member search (basically does exactly the same but allows you to also search on defined custom properties); I'd like it to sync with the tree like content does when you click the edit member link - this would make deleting members a bit simpler for the user.

    However I've noticed that the existing control does not do this; is there no existing Javascript function for it?

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Jan 23, 2012 @ 21:50
    Lee Kelleher
    1

    Hi Rob,

    In your JavaScript make a call to the following:

    UmbClientMgr.mainTree().syncTree('loginname', false);

    Replace"loginname" with the username of the member.

    Cheers, Lee.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jan 23, 2012 @ 22:06
    Jeroen Breuer
    0

    That member search dashboard looks interesting. Can you perhaps share the code or create a package of it?

    Jeroen

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jan 23, 2012 @ 22:38
    Tom Fulton
    0

    FYI, not sure if you know about this but Blackpoint Member Admin allows you to search members by custom properties (as well as group membership) and has some cool features like bulk operations

  • Rob Watkins 369 posts 701 karma points
    Jan 24, 2012 @ 10:48
    Rob Watkins
    0

    Brilliant, ta Lee, I'll give it bash later and see if it works.

    Jeroen: It has a few project specific dependencies currently but I was def thinking of sharing it when I get a chance to make it a bit more standalone.

    Tom: I installed the Blackpoint one and was going to use it; however I didn't have requirements for the bulk operations and I didn't want the user to have to select the custom fields they were searching on each time; just have a single simple search box as in the default that happens to search some extra fields.

  • Rob Watkins 369 posts 701 karma points
    Jan 24, 2012 @ 12:16
    Rob Watkins
    0

    I'm calling the synctree as follows:

    <a class="member_link" onclick="UmbClientMgr.mainTree().syncTree('aardvark', false);" href="members/EditMember.aspx?id=1545">Aardvark Law</a>

    ..but no joy? No errors or anything, it just does nothing. Am I calling it from the correct place? I tried the ID just in case, and that did nothing as well.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jan 24, 2012 @ 12:18
    Jeroen Breuer
    0

    I think the UmbClientMgr is a helper method for doing it in C#. It generates some javascript which is executed. If you look in the source you can see what it is and call that.

    Jeroen

  • Rob Watkins 369 posts 701 karma points
    Jan 24, 2012 @ 12:23
    Rob Watkins
    0

    Hi Jeroen, this post: http://our.umbraco.org/forum/developers/extending-umbraco/13094-Where-is-UmbClientMgr- ...implies it's a clientside function?

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jan 24, 2012 @ 12:27
    Jeroen Breuer
    0

    Hmm guess you're right. My bad. I was confused with this:

    BasePage.Current.ClientTools.SyncTree(path, true)

    That is how it's called in C#.

    Jeroen

  • Rob Watkins 369 posts 701 karma points
    Jan 24, 2012 @ 13:00
    Rob Watkins
    0

    I tried adding the path in as the content tree seems to pass a comma separated list of IDs - so syncTree(-1,101,username) where 101 is the ID of whatever letter node the member is under, but still no joy :o(

Please Sign in or register to post replies

Write your reply to:

Draft