Hi,

We run jquery 1.9 and bootstrap 3.2.0.

We have a select that triggers an ajax call.

We have some impatient users that click on submit before the ajax call is finished prompting some problem in our workflow.

We miss a throbber in there. I cannot provide a patch but I think it is related to the same kind of issue as this one: https://www.drupal.org/node/2116135

Just wanted to note that here. thanks

Comments

Ddroid_za’s picture

Same issue here, related patch doesn't apply and seem to have been applied before.

Ddroid_za’s picture

As a quick fix one can un-comment the entire "Drupal.ajax.prototype.beforeSend = function (xmlhttprequest, options)" function in your bootstrap base theme: js/misc/ajax.js

NB!! Not sure what this will break, but the throbber shows. Still investigating further.

Ddroid_za’s picture

Ok, the problem seems to be on line 56:

this.progress.element = this.progress.element = $('<div class="ajax-progress ajax-progress-throbber"><i class="glyphicon glyphicon-refresh glyphicon-spin"></i></div>');

We missing a "throbber" class as that is what we are looking for on line 60 and 67.

So simply changing line 56 to include that class:

this.progress.element = $('<div class="ajax-progress ajax-progress-throbber"><div class="throbber glyphicon glyphicon-refresh glyphicon-spin"></div></div>');

works.

In my case i was using views sexy throbber, so i ended up removing the "glyphicon-refresh glyphicon-spin" and just had a <div class"throbber"> instead of the <i class="glyphicon glyphicon-refresh glyphicon-spin">

I also changed the .append to .after on line 69 as drupal core ajax.js has it. This was specific for how i wanted it to show.

viRulENt’s picture

Thanks Ddroid_za...this fixed the issue I had with the throbber not showing up while using the bootstrap theme.

chrissnyder’s picture

I corrected this by changing line 58 from :

if ($(this.element).is('input')) {

to

if ($(this.element).is('input') || $(this.element).is('select')) {

.bert’s picture

I came to the same fix as @chrissnyder in #5. Otherwise, the throbber gets put into the select element.

markhalliwell’s picture

Version: 7.x-3.1-beta2 » 7.x-3.x-dev

  • markcarver committed 705ce08 on 7.x-3.x
    Issue #2374933 by markcarver: Ajax throbber issue with select
    

  • markcarver committed d33de90 on 8.x-3.x
    Issue #2374933 by markcarver: Ajax throbber issue with select
    
markhalliwell’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.