The 'beforeSubmit' ajax callback is only valid for $.ajaxSubmit, not $.ajax. We need to use beforeSend in order to catch both.

Patch coming.

CommentFileSizeAuthor
#1 697252-ajax-send.patch1.76 KBmerlinofchaos

Comments

merlinofchaos’s picture

Status: Active » Needs review
StatusFileSize
new1.76 KB

This patch should work in both situations. Note that any place currently using AJAX links will get a progress bar by default now; this may not be the proper behavior. We possibly should default ajax links to the throbber.

rfay’s picture

I'll roll a test module for reviewing this.

rfay’s picture

Note from merlinofchaos:

<merlinofchaos> rfay: A note about my earlier patch: It looks like setting the progress type to 'bar' (which is the default) doesn't work even with that patch.
<merlinofchaos> rfay: I'm not sure what exactly is wrong but it javascript crashes.
retester2010’s picture

#1: 697252-ajax-send.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 697252-ajax-send.patch, failed testing.

merlinofchaos’s picture

Status: Needs work » Closed (duplicate)

Ironically I submitted this again, 11 months later, not realizing that 1) I'd even done this, or 2) it'd gotten lost in 'needs work' land.

#969346: AJAX calls made with things that are not forms cannot use the throbber