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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 010d053ebe65d8aac211c955fe612f89b51c2497
|
4
|
+
data.tar.gz: 91a5d17d48ce836f07830d8dbd5d5890b379e85f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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 = :
|
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:
|
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
|
data/lib/corn_starch/version.rb
CHANGED