Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you remove the throbber from drupal 7 Ajax link?

we are using drupal 7 ajax framework to load content on a page. When the link is clicked a throbber shows up after the link while the request is processed.

I can't find documentation on how to set or remove the throbber. In a form it looks really simple, but using an ajax link and a callback menu item I can't find any documentation.

I see that there is a $settings variable that can be passed to the ajax_command_html function, but I don't see any docs as to how it should be formatted.

like image 379
mirzu Avatar asked May 23 '11 17:05

mirzu


2 Answers

when you build your form item you need to define the "progress" property:

$mycheckbox=array(
  '#type' => 'checkbox',
  '#title' => 'Load it up',
  '#ajax' => array(
      'callback' => 'ajax_example_callback', 
      'wrapper' => 'checkboxes-div',
      'effect' => 'slide', 
      'progress' => array('type' => 'none'),
    ),
);

You can find more information and examples here

like image 183
Trey Avatar answered Oct 16 '22 06:10

Trey


You may just hide the div.ajax-progress-throbber by set the display value to none:

.ajax-progress-throbber {
  display: none;
}

The module like CSS Injector (http://drupal.org/project/css_injector) might be useful.

like image 25
BoogieBug Avatar answered Oct 16 '22 08:10

BoogieBug