fix ajax indicator delay: select2 filters don't break anymore
* no JS code changes, just a different inclusion method
This commit is contained in:
parent
f1ada7eb96
commit
4e3f89e5f5
@ -6,6 +6,7 @@
|
||||
<% end %>
|
||||
<%= additionals_library_load(:font_awesome) %>
|
||||
<%= stylesheet_link_tag 'additionals', plugin: 'additionals' %>
|
||||
<%= additionals_library_load(:delay_ajax_indicator) %>
|
||||
|
||||
<%
|
||||
if User.current.try(:hrm_user_manager).nil?
|
||||
|
@ -1,4 +1,4 @@
|
||||
function delayAjaxIndicator() {
|
||||
function delayAjaxIndicator() {
|
||||
$(document).off('ajaxSend').bind('ajaxSend', function(event, xhr, settings) {
|
||||
if ($('.ajax-loading').length === 0 && settings.contentType != 'application/octet-stream') {
|
||||
$('#ajax-indicator').stop(true, false).delay(300).show(0);
|
||||
@ -9,6 +9,6 @@
|
||||
$('#ajax-indicator').hide(0);
|
||||
});
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
$(document).ready(delayAjaxIndicator)
|
||||
$(document).ready(delayAjaxIndicator)
|
||||
|
@ -188,8 +188,10 @@ module Additionals
|
||||
|
||||
def additionals_load_select2
|
||||
additionals_include_js('additionals_to_select2')
|
||||
# TODO: breaks query filters with select2
|
||||
# additionals_include_js('additionals_delay_ajax_indicator')
|
||||
end
|
||||
|
||||
def additionals_load_delay_ajax_indicator
|
||||
additionals_include_js('additionals_delay_ajax_indicator')
|
||||
end
|
||||
|
||||
def additionals_load_font_awesome
|
||||
|
Loading…
Reference in New Issue
Block a user