By lauriii on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.6.x
Introduced in version:
8.6.0
Issue links:
Description:
Previously it was only possible to override the CSS to change the design of throbbers. Now it is also possible to override the markup which will make it easier to customize the throbber design.
For example if you want to replace the throbber by a simple text you could do following:
Drupal.theme.ajaxProgressThrobber = () => '<div>Loading...</div>';
Drupal.theme.ajaxProgressIndicatorFullscreen = () => '<div>Loading...</div>';
You can also customize only throbber message:
Drupal.theme.ajaxProgressMessage = message => '<div class="my-message">' + message + '</div>';
Impacts:
Themers
Comments
Great! Got my own fancy
Great! Got my own fancy throbber override now! Thanks.
For those people who want to know how:
In my theme_name.info.yml file I had to add to following lines:
Then, in my theme_name.libraries.yml I had to add my library with the above examples and desired changed to the html.
I name the library 'throbber'. You can name it anything you want.
Aouuwww, thats great!
Aouuwww, thats great!
Javascript example:
Please mind that this should
Please mind that this should perhaps be es2015 compatible using the es2015 syntax, your example:
http://www.DROWL.de || Professionelle Drupal Lösungen aus Ostwestfalen-Lippe (OWL)
http://www.webks.de || webks: websolutions kept simple - Webbasierte Lösungen die einfach überzeugen!
http://www.drupal-theming.com || Individuelle Responsive Themes
I created a new theme based
I created a new theme based on Classy, here are my dependencies.
The throbber (progress) just doesn't appear. Why?
Test if the custom Javascript library is being loaded.
The first thing I can recommend you do is test if the custom library is being loaded by checking the source code. Also, check if your custom Javascript file isn't throwing any console errors.