data_tables 0.1.12 → 0.1.13
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 +10 -7
- 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_scrollY();
|
43
43
|
}"
|
44
44
|
|
45
45
|
sdom = options[:bFilter] ? '<"#datatables_search_hint">lfrtip' : 'lrtip'
|
@@ -93,6 +93,8 @@ $(document).ready(function() {
|
|
93
93
|
});
|
94
94
|
|
95
95
|
function change_scrollY() {
|
96
|
+
$('.dataTables_scrollHeadInner').css('padding-right','17px');
|
97
|
+
$('.dataTables_scrollHeadInner').width('100%');
|
96
98
|
$('.dataTable').width('100%');
|
97
99
|
$('##{datatable[:action]}').dataTable().fnAdjustColumnSizing(false);
|
98
100
|
h = $('##{source}').height();
|
@@ -104,14 +106,15 @@ $(document).ready(function() {
|
|
104
106
|
{
|
105
107
|
$('.dataTables_scrollBody').css('height', h+20);
|
106
108
|
}
|
109
|
+
$('.dataTables_scrollBody').trigger('scroll');
|
110
|
+
if($('.dataTable').width() < $('.dataTables_scrollHead').width())
|
111
|
+
{
|
112
|
+
$('.dataTable').width('100%');
|
113
|
+
$('.dataTables_scrollHeadInner').width($('##{source}').width());
|
114
|
+
}
|
107
115
|
}
|
108
116
|
|
109
|
-
|
110
|
-
change_scrollY();
|
111
|
-
change_scrollY();
|
112
|
-
}
|
113
|
-
|
114
|
-
$(window).resize(change_scrollY2);
|
117
|
+
$(window).resize(change_scrollY);
|
115
118
|
|
116
119
|
</script>
|
117
120
|
<table id=\"#{datatable[:action]}\" #{html_opts}>
|
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.13
|
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-16 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
type: :development
|