Precision patch ported from this issue

Removed only the:
ctools_ajax_command_messages - enable drupal messages for ajax callbacks.

Tries to identify top of form and adds the messages where you would expect them.
Works great for messages after modal submits and closes.

Rolled against head, your comments welcome.

Comments

merlinofchaos’s picture

Status: Needs review » Needs work

Patch failed to apply, probably due to #478438: ajax command $.data. I like this too, though, and am willing to put it in as well.

nickl’s picture

Apologies Earl, this got lost under all the papers... bumping it up on My issues to pay attention to it again.
Coming to think of it there were some plugin stuff I also wanted to contribute, where's that yellow paper with the coffee mug stain...

dawehner’s picture

StatusFileSize
new2.1 KB

I don't get why we need this cod:

+    $('form:not([id*="search"]):first').before(data.data);

Anyway here is a rerole

merlinofchaos’s picture

Status: Needs work » Needs review

I guess with the reroll this should be nr again.

merlinofchaos’s picture

I'm not sure I like the assumption about placing the messages before the first form that isn't the search form. What if there is no form?

I understand that this is generally difficult because there isn't necessarily a marker to tell us where the messages should go, but I think this assumption will break a lot.

merlinofchaos’s picture

Status: Needs review » Closed (won't fix)

Decided to won't fix this because we cannot rely on messages div, nor should we force that issue.