app/assets/javascripts/effective_datatables/initialize.js.coffee.erb in effective_datatables-1.5.0 vs app/assets/javascripts/effective_datatables/initialize.js.coffee.erb in effective_datatables-1.5.1
- old
+ new
@@ -39,12 +39,12 @@
dataTableSearch = (event) -> # This is the function called by a select or input to run the search
obj = $(event.currentTarget)
table = obj.closest('table.dataTable')
# We're using our own scroll wrapper, not the ScrollX support
- # if table.parent().hasClass('dataTables_scrollHeadInner') # ScrollX support
- # table = table.closest('.dataTables_scroll').children('.dataTables_scrollBody').children('table.dataTable')
- # table.DataTable().column("#{obj.data('column-name')}:name").search(obj.val()).draw()
+ if table.parent().hasClass('dataTables_scrollHeadInner') # ScrollX support
+ table = table.closest('.dataTables_scroll').children('.dataTables_scrollBody').children('table.dataTable')
+ table.DataTable().column("#{obj.data('column-name')}:name").search(obj.val()).draw()
# For every existing Input, Set up the search events
(search_inputs = datatable.find('thead').first().find('input,select')).each (index, input) ->
$input = $(input)
$input.on 'click', (event) -> false # Dont order columns when you click inside the input