pagy 4.10.1 → 4.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/config/pagy.rb +4 -1
- data/lib/javascripts/pagy.js +6 -2
- data/lib/pagy.rb +1 -1
- data/lib/pagy/extras/trim.rb +5 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af9dd0bcf50c1a54209d29f8a13318fc72f0cb76f07a1ff4e5df04c42e2a0712
|
4
|
+
data.tar.gz: 16ec5ce47444e7ef5adc3a3db977dbdf9a518cbec5da0e3d0454c1e33433faae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb9bcf0b26ef773511e98ab5985a9ce0b4639e79deb60ca2a45ed79cbf6beca5145e032d30907cd4453085a6f2b8072580c4ec4fabd8a788c61037d243e51dc0
|
7
|
+
data.tar.gz: 2219496ad2c296a6fe3a93b7380696b29b7c77e16a6b4731d5322aa9df4be0bbf3433355f8780122be72c3149242d52afb617328d14c53522ec1b2f697b39323
|
data/lib/config/pagy.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Pagy initializer file (4.10.
|
3
|
+
# Pagy initializer file (4.10.2)
|
4
4
|
# Customize only what you really need and notice that Pagy works also without any of the following lines.
|
5
5
|
# Should you just cherry pick part of this file, please maintain the require-order of the extras
|
6
6
|
|
@@ -56,6 +56,9 @@
|
|
56
56
|
# also the elasticsearch_rails extra that defines the same
|
57
57
|
# VARS[:searchkick_search_method] = :pagy_search
|
58
58
|
# require 'pagy/extras/searchkick'
|
59
|
+
# uncomment if you are going to use Searchkick.pagy_search
|
60
|
+
# Searchkick.extend Pagy::Searchkick
|
61
|
+
|
59
62
|
|
60
63
|
# Frontend Extras
|
61
64
|
|
data/lib/javascripts/pagy.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
function Pagy(){}
|
4
4
|
|
5
|
-
Pagy.version = '4.10.
|
5
|
+
Pagy.version = '4.10.2'
|
6
6
|
|
7
7
|
Pagy.delay = 100
|
8
8
|
|
@@ -114,4 +114,8 @@ Pagy.waitForMe =
|
|
114
114
|
Pagy.tid = setTimeout(Pagy.renderNavs, Pagy.delay)
|
115
115
|
}
|
116
116
|
|
117
|
-
|
117
|
+
|
118
|
+
if (typeof window !== "undefined") {
|
119
|
+
window.addEventListener('resize', Pagy.waitForMe, true)
|
120
|
+
}
|
121
|
+
|
data/lib/pagy.rb
CHANGED
data/lib/pagy/extras/trim.rb
CHANGED
@@ -14,10 +14,14 @@ class Pagy
|
|
14
14
|
lambda do |num, text=num, extra=''|
|
15
15
|
link = +link_proc.call(num, text, extra)
|
16
16
|
return link unless num == 1
|
17
|
-
|
17
|
+
pagy_trim(pagy, link)
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
+
def pagy_trim(pagy, link)
|
22
|
+
link.sub!(/[?&]#{pagy.vars[:page_param]}=1\b(?!&)|\b#{pagy.vars[:page_param]}=1&/, '')
|
23
|
+
end
|
24
|
+
|
21
25
|
end
|
22
26
|
Frontend.prepend UseTrimExtra
|
23
27
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pagy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.10.
|
4
|
+
version: 4.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Domizio Demichelis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: 'Agnostic pagination in plain ruby: it works with any framework, ORM
|
14
14
|
and DB type, with all kinds of collections, even pre-paginated, scopes, Arrays,
|
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
119
|
- !ruby/object:Gem::Version
|
120
120
|
version: '0'
|
121
121
|
requirements: []
|
122
|
-
rubygems_version: 3.2.
|
122
|
+
rubygems_version: 3.2.3
|
123
123
|
signing_key:
|
124
124
|
specification_version: 4
|
125
125
|
summary: The Ultimate Pagination Ruby Gem
|