diff --git a/core/misc/ajax.js b/core/misc/ajax.js index fefe9f3..bdca05c 100644 --- a/core/misc/ajax.js +++ b/core/misc/ajax.js @@ -53,8 +53,10 @@ // Bind Ajax behaviors to all items showing the class. $('.use-ajax').once('ajax').each(function () { var element_settings = {}; - // Clicked links look better with the throbber than the progress bar. - element_settings.progress = {type: 'throbber'}; + // Provide clicked links with a throbber as the default indicator, + // instead of the progress bar, since it looks better. + var progress_type = $(this).data('progress-type'); + element_settings.progress = {type: progress_type ? progress_type : 'throbber'}; // For anchor tags, these will go to the target of the anchor rather // than the usual location. @@ -82,9 +84,10 @@ element_settings.setClick = true; // Form buttons use the 'click' event rather than mousedown. element_settings.event = 'click'; - // Clicked form buttons look better with the throbber than the progress - // bar. - element_settings.progress = {type: 'throbber'}; + // Provide clicked buttons with a throbber as the default indicator, + // instead of the progress bar, since it looks better. + var progress_type = $(this).data('progress-type'); + element_settings.progress = {type: progress_type ? progress_type : 'throbber'}; element_settings.base = $(this).attr('id'); element_settings.element = this;