Sha256: 848c1404e5599d63adb0a5b904a62b45290bcdb29bdff6686e574df88e8e5d3d

Contents?: true

Size: 976 Bytes

Versions: 4

Compression:

Stored size: 976 Bytes

Contents

$.extend(true, $.fn.dataTable.Buttons.defaults, {
  dom: {
    button: {
      className: 'btn btn-link btn-sm'
    }
  }
});

# DataTable is the API
# dataTable is the object fnStuff

flash = (message) ->
  @context[0].oFeatures.bProcessing = false

  message ||= 'Processing...'

  $processing = $(@table().node()).siblings('.dataTables_processing')
  $processing.html(message).show()

  timeout = $processing.data('timeout')
  clearTimeout(timeout) if timeout

  $processing.html(message).data('timeout', setTimeout( =>
      $processing.html('Processing...').hide()
      @context[0].oFeatures.bProcessing = true
    , 1500)
  )

  return @

turboDestroy = ->
  @iterator('table', (settings) ->
    $(window).off('.DT-' + settings.sInstance)

    index = $.inArray(settings, $.fn.DataTable.settings)
    $.fn.DataTable.settings.splice(index, 1) if index > -1
  )

$.fn.DataTable.Api.register('flash()', flash);
$.fn.DataTable.Api.register('turboDestroy()', turboDestroy);

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
effective_datatables-4.3.3 app/assets/javascripts/effective_datatables/overrides.js.coffee
effective_datatables-4.3.2 app/assets/javascripts/effective_datatables/overrides.js.coffee
effective_datatables-4.3.1 app/assets/javascripts/effective_datatables/overrides.js.coffee
effective_datatables-4.3.0 app/assets/javascripts/effective_datatables/overrides.js.coffee