alphabetical_paginate 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -17,7 +17,7 @@ module AlphabeticalPaginate
|
|
17
17
|
elsif params[:numbers]
|
18
18
|
range = ["0-9"] + range
|
19
19
|
end
|
20
|
-
range.unshift "All" if params[:include_all]
|
20
|
+
range.unshift "All" if (params[:include_all] && !range.include? "All")
|
21
21
|
range.each do |l|
|
22
22
|
value = params[:language].output_letter(l)
|
23
23
|
if l == params[:currentField]
|
@@ -31,7 +31,7 @@ module AlphabeticalPaginate
|
|
31
31
|
else
|
32
32
|
params[:availableLetters].sort!
|
33
33
|
params[:availableLetters] = params[:availableLetters][1..-1] + ["*"] if params[:availableLetters][0] == "*"
|
34
|
-
params[:availableLetters].unshift "All" if params[:include_all]
|
34
|
+
params[:availableLetters].unshift "All" if (params[:include_all] && !params[:availableLetters].include? "All")
|
35
35
|
params[:availableLetters] -= (1..9).to_a.map{|x| x.to_s} if !params[:numbers]
|
36
36
|
params[:availableLetters] -= ["*"] if !params[:others]
|
37
37
|
|
@@ -32,8 +32,8 @@ $(function() {
|
|
32
32
|
$(".pagination").html(img);
|
33
33
|
//$.load(url + " #pagination_table");
|
34
34
|
$.get(url, function(result) {
|
35
|
-
$(".pagination").html($(".pagination", result));
|
36
|
-
$("#pagination_table").html($("#pagination_table", result));
|
35
|
+
$(".pagination").html($(".pagination", result).html());
|
36
|
+
$("#pagination_table").html($("#pagination_table", result).html());
|
37
37
|
});
|
38
38
|
history.pushState(null, document.title, url);
|
39
39
|
}
|
@@ -43,8 +43,8 @@ $(function() {
|
|
43
43
|
if (once) {
|
44
44
|
$(".pagination").html(img);
|
45
45
|
$.get(location.href, function(result) {
|
46
|
-
$(".pagination").html($(".pagination", result));
|
47
|
-
$("#pagination_table").html($("#pagination_table", result));
|
46
|
+
$(".pagination").html($(".pagination", result).html());
|
47
|
+
$("#pagination_table").html($("#pagination_table", result).html());
|
48
48
|
});
|
49
49
|
} else {
|
50
50
|
once = true;
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alphabetical_paginate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-04-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|