corn_starch 1.9.57 → 1.9.58

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: 6b6e9b3b7d553910edafa2de7999036e07495b2b
4
- data.tar.gz: 1e0dde3ed9fbbdac744dcc855b0140afcf3fdd25
3
+ metadata.gz: 2701faa7a1945c40bcc36f4ab648f6325265718d
4
+ data.tar.gz: da37cc7ebdc41e043b018f000d67cd17478a2918
5
5
  SHA512:
6
- metadata.gz: 76981015624f58ddf42651521d2915b5ea4be46851437f41b1b1942366caf96c5183b42852c12457e0907fc4f5ba06fa6024a0ef4acc42426fe4a60e12392fcc
7
- data.tar.gz: 18f7c0a3c590cbdb4c7d8dc5c4ca5a866525d1e3072b9c542570a34d21d785d3fedb373ae8ebafc9dc2a51ed9c3951e85c449100824555757d16122f10e87f7b
6
+ metadata.gz: 4833ee730c139e376a496c47d38b855644439fef4560cc95b5a74b9e5dc7bb8af30526484c5b3017d8d93956d6aa0e1b57af91c84cbb8aa843ebc87090e1b42a
7
+ data.tar.gz: e9cd4a61c8bf6d7116c3468e4ac0ccb68987361f929ed29130f0d2cf21844edd31982f25b920dcd8ff3eea6ca90ac7b767aa6a2c83393294fc1cd4159317f87c
@@ -58,6 +58,7 @@ window.infiniscroll = (container) ->
58
58
  # Acquire Path & Next
59
59
  path = c.attr 'infiniscroll-trgt'
60
60
  args = c.attr 'infiniscroll-args'
61
+ onload = c.attr 'infiniscroll-onload'
61
62
  next = c.attr 'infiniscroll-next'
62
63
 
63
64
  # Check End
@@ -79,6 +80,9 @@ window.infiniscroll = (container) ->
79
80
  # Append Content
80
81
  c.append data['content']
81
82
 
83
+ # Run onload Callback
84
+ window[onload](); if onload && onload != ''
85
+
82
86
  # Detach Handler
83
87
  infiniscroll_detach_handler c
84
88
 
@@ -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 = :window, container_classes = [], extra_args = nil, n = 1
11
+ def infiniscroll_container id, target, template = nil, onload = 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: %w(infiniscroll-container) + container_classes, '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-onload' => onload, '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
@@ -5,5 +5,5 @@
5
5
  module CornStarch
6
6
 
7
7
  # Version
8
- VERSION = '1.9.57'
8
+ VERSION = '1.9.58'
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: corn_starch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.57
4
+ version: 1.9.58
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eresse
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-09 00:00:00.000000000 Z
11
+ date: 2017-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  version: '0'
95
95
  requirements: []
96
96
  rubyforge_project:
97
- rubygems_version: 2.6.10
97
+ rubygems_version: 2.5.1
98
98
  signing_key:
99
99
  specification_version: 4
100
100
  summary: Simple UI tools for Rails