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

Issue #2395569 by Елин Й., psf_,Anybody: Exclude if the link has target="_blank" attribute

parent 925d7b9e
No related branches found
No related tags found
1 merge request!2Issue #3342445: jQuery .live() is deprecated
......@@ -18,6 +18,7 @@
.find("a[href]" + settings.subselector)
.not('a[href*="javascript:"]')
.not('a[href^="#"]')
.not('a[target="_blank"]')
.not(".noLoadingAnimation")
.each(
function(i, element) {
......@@ -41,7 +42,7 @@
if (Drupal.settings.jquery_loadinganimation.show_on_form_submit) {
// Only execute if no other js events are registered to prevent cases
// where page is not being reloaded and layer does not close though.
$(context).find("form" + subselectorSuffix).submit(function() {
$(context).find("form" + subselectorSuffix).not(".noLoadingAnimation").submit(function() {
Drupal.behaviors.jquery_loadinganimation.Loadinganimation.show();
$(context).ajaxStop(function() {
// Hide loading animation after ALL ajax events have finished
......@@ -118,7 +119,7 @@
Drupal.behaviors.jquery_loadinganimation = {
/**
* Run Drupal module JS initialization.
*
*
* @param context
* @param settings
*/
......@@ -128,4 +129,4 @@
context, settings.jquery_loadinganimation);
}
};
})(jQuery);
\ No newline at end of file
})(jQuery);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment