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

rcmail.add_element(elm, 'messagemenu') appends elm to wrong element #4791

Closed
rcubetrac opened this issue Mar 11, 2015 · 3 comments
Closed

rcmail.add_element(elm, 'messagemenu') appends elm to wrong element #4791

rcubetrac opened this issue Mar 11, 2015 · 3 comments

Comments

@rcubetrac
Copy link

Reported by pavel zubkou on 11 Mar 2015 21:06 UTC as Trac ticket #1490313

Issue can be seen on larry skin.

Steps to reproduce

  • let elm be '<li>Foo</li>'
  • call rcmail.add_element(elm, 'messagemenu') on init
  • notice that elm will be appended to div#messagemenu, not the container inside <ul>

Expected result

elm is expected to be appended to <ul> which has #messagemenu-menu in larry skin.

This expected result can be received via usage of rcube_plugin_api::add_content() on server side. My expectation is that these two methods do the same, namely append element to container.

Actual result

elm is appended to div#messagemenu, thus placing it outside <ul> containing <roundcube:container name="messagemenu" id="messagemenu" />. Which is non intuitive.

Migrated-From: http://trac.roundcube.net/ticket/1490313

@rcubetrac
Copy link
Author

Comment by @thomascube on 12 Mar 2015 15:34 UTC

That's indeed not as intended. I guess

<roundcube:container name="messagemenu" id="messagemenu" />

should become

<roundcube:container name="messagemenu" id="messagemenu-menu" />

Basically that's the case for all the menu containers.

@rcubetrac
Copy link
Author

Comment by @thomascube on 12 Mar 2015 15:42 UTC

Fixed in commit [and backported in bb345b4(619891c])

@rcubetrac
Copy link
Author

Status changed by @thomascube on 12 Mar 2015 15:42 UTC

new => closed

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

No branches or pull requests

1 participant