Sha256: 6c3b3f5951c3d5682964814108271cca56ee14a5042f26b557bbbfcc89262f51
Contents?: true
Size: 965 Bytes
Versions: 37
Compression:
Stored size: 965 Bytes
Contents
# These next three methods hijack rails/ujs and jquery_ujs data-confirm and do it our own way with a double click confirm if <%= !!EffectiveBootstrap.use_custom_data_confirm %> && (window.Rails || $.rails) $(document).on 'confirm', (event) -> $obj = $(event.target) if $obj.data('confirmed') true else $obj.data('confirm-original', $obj.html()) $obj.html($obj.data('confirm')) $obj.data('confirmed', true) setTimeout( (-> $obj.data('confirmed', false) $obj.html($obj.data('confirm-original')) ) , 4000) false # don't show the confirmation dialog (window.Rails || $.rails).confirm = (message) -> true (window.Rails || $.rails).effective_bootstrap_custom_data_confirm = true $(document).on 'confirm:complete', (event) -> $(event.target).data('confirmed') $(document).on 'click', 'a.dropdown-item[data-confirm]', (event) -> event.preventDefault() false
Version data entries
37 entries across 37 versions & 1 rubygems