Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

river dashboard: Avatar menu missing in riverdashboard when using ajax selector for all, friends, mine (Trac #2493) #2493

Closed
elgg-gitbot opened this issue Feb 16, 2013 · 4 comments
Labels
Milestone

Comments

@elgg-gitbot
Copy link

Original ticket http://trac.elgg.org/ticket/2493 on 40739123-12-16 by trac user Gillie, assigned to unknown.

Elgg version: 1.7

The arrow and avatar dropdown menu dissapear from user icons when switching between all, following, mine in the riverdashboard.

Regards gillie

@elgg-gitbot
Copy link
Author

Title changed from Avatar menu missing in dashboard to Avatar menu missing in riverdashboard when using ajax selector for all, friends, mine by cash on 40746115-03-22

@elgg-gitbot
Copy link
Author

cash wrote on 40749477-12-07

I think Evan is better equipped than me to handle this one.

The issue is that the setup_avatar_menu() function is run on document ready. When the ajax returns the new html for the page after selecting "friends", setup_avatar_menu() is not called.

Our JavaScript guy has also overridden the default profile javascript for setup_avatar_menu() by adding a parent parameter. He may have done that so setup_avatar_menu is only run on one section of the page when called in an ajax callback.

His function starts out like this:

function setup_avatar_menu(parent) {
    if (!parent) {
        parent = document;
    }

    // avatar image menu link
    $(parent).find("div.usericon img").mouseover(function() {
...

The only other change he made was

    // avatar contextual menu
    $(parent).find(".avatar_menu_button img").click(function(e) { 

instead of

    // avatar contextual menu
    $(".avatar_menu_button img").click(function(e) {

@elgg-gitbot
Copy link
Author

brettp wrote on 40761444-05-12

(In [svn:7008]) Fixes #2493: Added optional parent argument to profile's setup_avatar_menu(). Added JS in riverdashboard to rebuild the avatar menu when loading sections via ajax.

@elgg-gitbot
Copy link
Author

cash wrote on 40804890-10-29

(In [svn:7108]) Refs #2493 - merged [svn:7008] into trunk from 1.7 branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant