data_tables 0.1.11 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/data_tables.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'data_tables'
5
- s.version = '0.1.11'
5
+ s.version = '0.1.12'
6
6
  s.date = Time.now.strftime("%Y-%m-%d")
7
7
  s.summary = "Rails friendly interface into DataTables"
8
8
  s.description = "DataTables for Rails"
@@ -39,7 +39,7 @@ module DataTablesHelper
39
39
  }"
40
40
 
41
41
  options[:fnDrawCallback] = "function() {
42
- change_scrollY();
42
+ change_scrollY2();
43
43
  }"
44
44
 
45
45
  sdom = options[:bFilter] ? '<"#datatables_search_hint">lfrtip' : 'lrtip'
@@ -93,7 +93,8 @@ $(document).ready(function() {
93
93
  });
94
94
 
95
95
  function change_scrollY() {
96
- resize_column_width();
96
+ $('.dataTable').width('100%');
97
+ $('##{datatable[:action]}').dataTable().fnAdjustColumnSizing(false);
97
98
  h = $('##{source}').height();
98
99
  if( h > $(window).height() *55/100 )
99
100
  {
@@ -105,13 +106,12 @@ $(document).ready(function() {
105
106
  }
106
107
  }
107
108
 
108
- function resize_column_width() {
109
- $('.dataTables_scrollHeadInner').width('100%');
110
- $('.dataTable').width('100%');
111
- $('##{datatable[:action]}').dataTable().fnAdjustColumnSizing(false);
109
+ function change_scrollY2() {
110
+ change_scrollY();
111
+ change_scrollY();
112
112
  }
113
113
 
114
- $(window).resize(change_scrollY);
114
+ $(window).resize(change_scrollY2);
115
115
 
116
116
  </script>
117
117
  <table id=\"#{datatable[:action]}\" #{html_opts}>
@@ -15,7 +15,15 @@ describe 'data_tables' do
15
15
 
16
16
  def save_elasticsearch(index_name, data)
17
17
  Tire.index(index_name) do
18
- create unless exists?
18
+ unless exists?
19
+ create mappings: {
20
+ document: {
21
+ properties: {
22
+ name: { type: 'string', index: 'not_analyzed'}
23
+ }
24
+ }
25
+ }
26
+ end
19
27
  data.each do |datum|
20
28
  store datum
21
29
  end
@@ -49,4 +57,4 @@ describe 'data_tables' do
49
57
  end
50
58
  context "Postgres Models" do
51
59
  end
52
- end
60
+ end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: data_tables
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.11
5
+ version: 0.1.12
6
6
  platform: ruby
7
7
  authors:
8
8
  - Duane Compton
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2013-08-08 00:00:00.000000000 Z
16
+ date: 2013-08-14 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  type: :development