data_tables 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- data/data_tables.gemspec +1 -1
- data/lib/data_tables/data_tables_helper.rb +7 -7
- data/spec/data_tables_spec.rb +10 -2
- metadata +2 -2
data/data_tables.gemspec
CHANGED
@@ -39,7 +39,7 @@ module DataTablesHelper
|
|
39
39
|
}"
|
40
40
|
|
41
41
|
options[:fnDrawCallback] = "function() {
|
42
|
-
|
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
|
-
|
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
|
109
|
-
|
110
|
-
|
111
|
-
$('##{datatable[:action]}').dataTable().fnAdjustColumnSizing(false);
|
109
|
+
function change_scrollY2() {
|
110
|
+
change_scrollY();
|
111
|
+
change_scrollY();
|
112
112
|
}
|
113
113
|
|
114
|
-
$(window).resize(
|
114
|
+
$(window).resize(change_scrollY2);
|
115
115
|
|
116
116
|
</script>
|
117
117
|
<table id=\"#{datatable[:action]}\" #{html_opts}>
|
data/spec/data_tables_spec.rb
CHANGED
@@ -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
|
-
|
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.
|
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-
|
16
|
+
date: 2013-08-14 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
type: :development
|