corn_starch 1.8.14 → 1.8.15

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: 0ea829f6eb8e862b2f1b992f9fbc640afad472be
4
- data.tar.gz: 0bbf743e31f95f82f1142089249d6d3c9561700c
3
+ metadata.gz: 62cf72ba8d4305c23eddabff203a5f4e3bd0df64
4
+ data.tar.gz: 130ad797a47daf8961879e1e27f8183866f6bf34
5
5
  SHA512:
6
- metadata.gz: dbeb9febc4b42532e8661a9462c498c35014b447af59d5c6c4ec6ce8bf2126a2bfc355dbc9d98c8a3cb3ea4e55c0f0016e5a52ebbab1e6c9e8de753c0e249954
7
- data.tar.gz: 053bb8505348b1268bb0004e85fb64c1b0195a5f7de646d99e4a58e9d6dd5e017dd2743ad183c5c4fb1a130a18eda0541d44d8b7b840308b1840d920f2906e19
6
+ metadata.gz: c1b5ab4a3c4579c54d71798ddc7df329976362e75b1f618592af7016399144ab984f3213d2476112ee8e63f238b5167f7108810630045293a9cf7aed0322cc71
7
+ data.tar.gz: 211d86440857289097fea369ee8b166f0658c363f6ef159c027008465aff2dd7bc8443b32591355ac970820b36bf966db9743e282d5687f50fbc4d60c85ec114
@@ -5,7 +5,8 @@
5
5
 
6
6
  # Should Element Reload
7
7
  window.infiniscroll_should_reload = (container) ->
8
- (container[0].scrollTop() + container[0].offsetHeight) >= (container[0].scrollHeight - container.attr('infiniscroll-margin'))
8
+ if container.attr('infiniscroll-control') == 'window' then e = $(window) else e = c[0]
9
+ (e.scrollTop + e.offsetHeight) >= (e.scrollHeight - container.attr('infiniscroll-margin'))
9
10
 
10
11
  # InfiniScroll
11
12
  window.infiniscroll = (container) ->
@@ -72,7 +73,7 @@ window.infiniscroll_reset = (container) ->
72
73
  window.infiniscroll_handler = (c) ->
73
74
 
74
75
  # DEBUG
75
- alert("infiniscroll_handler -> #{c.id}")
76
+ alert("infiniscroll_handler -> #{c[0].id}")
76
77
 
77
78
  # Check Position
78
79
  if infiniscroll_should_reload c
@@ -94,10 +95,6 @@ window.infiniscroll_init = ->
94
95
 
95
96
  # Acquire
96
97
  c = $(@)
97
-
98
- # DEBUG
99
- alert "CONTAINER[0] : #{c[0].id}"
100
- alert "CONTAINER : #{c.id}"
101
98
 
102
99
  # Unbind Shit
103
100
  c.unbind 'scroll'
@@ -105,15 +102,11 @@ window.infiniscroll_init = ->
105
102
  # Check Scroll
106
103
  if infiniscroll_should_reload c
107
104
 
108
- # DEBUG
109
- alert("infiniscroll_init -> #{c.id}")
110
-
111
105
  # Scroll it, bitch !
112
- infiniscroll c.id
106
+ infiniscroll c[0].id
113
107
 
114
108
  # Handle Scroll Events
115
109
  c.scroll infiniscroll_handler
116
110
 
117
111
  # Initialize InfiniScroll for the Page
118
- $(document).on 'page:load', infiniscroll_init
119
112
  $(document).ready infiniscroll_init
@@ -8,5 +8,4 @@
8
8
 
9
9
  <%# Init Modal %>
10
10
  $(document).ready(function() { modal_init('<%= modal[:name] %>'); });
11
- $(document).on('page:load', function() { modal_init('<%= modal[:name] %>'); });
12
- </script>
11
+ </script>
@@ -1,3 +1,3 @@
1
1
  module CornStarch
2
- VERSION = '1.8.14'
2
+ VERSION = '1.8.15'
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.14
4
+ version: 1.8.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eresse