Skip to content
Snippets Groups Projects
Commit 4360cc32 authored by Julian Pustkuchen's avatar Julian Pustkuchen
Browse files

Fixed AJAX functionality.

parent 29a9c97f
No related branches found
No related tags found
No related merge requests found
......@@ -143,10 +143,7 @@
*/
attach : function(context, settings) {
// Initialize general loading animation.
// Only if not already initialized!
if(Loadinganimation == undefined){
Loadinganimation = new Loadinganimation(context, settings.jquery_loadinganimation);
}
Drupal.behaviors.jquery_loadinganimation.Loadinganimation = new Loadinganimation(context, settings.jquery_loadinganimation);
if (context == document) {
// Global context!
......@@ -154,12 +151,12 @@
// Register loading animations for ajax events!
$(context).ajaxSend(function() {
// Show loading animation on request.
Loadinganimation.show();
Drupal.behaviors.jquery_loadinganimation.Loadinganimation.show();
});
$(context).ajaxSuccess(function() {
// Hide loading animation after finish.
Loadinganimation.hide();
Drupal.behaviors.jquery_loadinganimation.Loadinganimation.hide();
});
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment