rails-tables 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,13 @@
1
+ @rails_tables = {}
2
+ @rails_tables.columns = ->
3
+ for column, order of $(@).data() when /_ordering/.test(column)
4
+ asSorting: [ order ], aTargets: [ column.substring(0, column.length - "_ordering".length) ]
5
+
6
+ @rails_tables.params = (aoData) ->
7
+ aoData.push
8
+ name: 'bUseDefaultSort', value: if $(@).data('unsorted') then true else false
9
+
10
+ $ ->
11
+ $('table.datatable').each ->
12
+ $(@).find('.aria-sort').click ->
13
+ $(@).parents('table.datatable').data('unsorted', false)
@@ -1,3 +1,3 @@
1
1
  module RailsTables
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-tables
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-19 00:00:00.000000000 Z
12
+ date: 2012-11-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -98,7 +98,7 @@ executables: []
98
98
  extensions: []
99
99
  extra_rdoc_files: []
100
100
  files:
101
- - app/assets/javascripts/rails-tables.js
101
+ - app/assets/javascripts/rails-tables.js.coffee
102
102
  - app/tables/column.rb
103
103
  - app/tables/datatable.rb
104
104
  - app/tables/search.rb
@@ -1,13 +0,0 @@
1
- $ ->
2
- $('table.datatable').each ->
3
- ordering_options = for column, order of $(@).data() when /_ordering/.test(column)
4
- asSorting: [ order ], aTargets: [ column.substring(0, column.length - "_ordering".length) ]
5
-
6
- $(@).dataTable
7
- aoColumnDefs: ordering_options
8
- fnServerParams: (aoData)->
9
- aoData.push
10
- name: 'bUseDefaultSort', value: if $(@).data('unsorted') then true else false
11
-
12
- $(@).find('.aria-sort').click ->
13
- $(@).parents('table.datatable').data('unsorted', false)