corn_starch 1.8.17 → 1.8.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80d40112396800a7dba85744a9cd6b99e170f3b4
4
- data.tar.gz: 462c35fe2276feb655bd0a8ec62e5028a9dc728a
3
+ metadata.gz: 010d053ebe65d8aac211c955fe612f89b51c2497
4
+ data.tar.gz: 91a5d17d48ce836f07830d8dbd5d5890b379e85f
5
5
  SHA512:
6
- metadata.gz: cdbbd73283be71201f24ff36ef5da45868ba9ab17e493f090d4087d4a341801629f62b9bd3e0fc8eb07424ae84d3037d84b4fac97acf7b6648d64e5d00b2c1ca
7
- data.tar.gz: c6f08b27c2d87fd5f7d7ad4e9b3a84586b2285df4950e45562a3ce0c502376e63995dea36b07530109f9e2bdca516f1487f630cb9a650c363f07cd1ac3841f92
6
+ metadata.gz: 09bfe0932a12460fda50db9c9ef6874228209985a157f044374fe1079697a3ad13d79587128611f75a89b8fcf1c119d6b43a25bd953d879119f4ce14ed12b34a
7
+ data.tar.gz: 4eea93349c7e0b2713f7ca81e2400d00e1be5b6d4bb68ae7d68e075c62508f2dd7b704184f86ca58afa3eaa7d22d179a574dc63574f0290445d2d7ca26f73f4c
@@ -47,7 +47,7 @@ window.infiniscroll_should_reload = (container) ->
47
47
 
48
48
  # Check Element Scroll
49
49
  e = container[0]
50
- (e.scrollTop + e.offsetHeight) >= (e.scrollHeight - container.attr('infiniscroll-margin'))
50
+ (e.scrollTop + e.clientHeight) >= (e.scrollHeight - container.attr('infiniscroll-margin'))
51
51
 
52
52
  # InfiniScroll
53
53
  window.infiniscroll = (container) ->
@@ -8,7 +8,7 @@ module CornStarch
8
8
  module InfiniscrollHelper
9
9
 
10
10
  # InfiniScroll Container
11
- def infiniscroll_container id, target, template = nil, control = :self, extra_args = nil, n = 1
11
+ def infiniscroll_container id, target, template = nil, control = :window, container_classes = [], extra_args = nil, n = 1
12
12
 
13
13
  # Prep Args
14
14
  first = true
@@ -29,7 +29,7 @@ module CornStarch
29
29
  args = args + (first ? '?' : '&') + extra_args.to_query if extra_args
30
30
 
31
31
  # Produce Container
32
- div_tag id: id, class: 'infiniscroll-container', 'infiniscroll-trgt' => target, 'infiniscroll-args' => args, 'infiniscroll-next' => n, 'infiniscroll-ctrl' => control, 'infiniscroll-margin' => CORNSTARCH_CONF[:infiniscroll][:margin] do
32
+ div_tag id: id, class: %w(infiniscroll-container) + container_classes, 'infiniscroll-trgt' => target, 'infiniscroll-args' => args, 'infiniscroll-next' => n, 'infiniscroll-ctrl' => control, 'infiniscroll-margin' => CORNSTARCH_CONF[:infiniscroll][:margin] do
33
33
  if template
34
34
  render partial: template.to_s, locals: extra_args
35
35
  else
@@ -1,3 +1,3 @@
1
1
  module CornStarch
2
- VERSION = '1.8.17'
2
+ VERSION = '1.8.18'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: corn_starch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.17
4
+ version: 1.8.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eresse