ajax_pagination 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -1
- data/.travis.yml +0 -1
- data/CHANGELOG.md +15 -0
- data/README.md +5 -5
- data/lib/ajax_pagination/controller_additions.rb +48 -31
- data/lib/ajax_pagination/helper_additions.rb +48 -24
- data/lib/ajax_pagination/rails.rb +0 -7
- data/lib/ajax_pagination/version.rb +1 -1
- data/lib/assets/javascripts/ajax_pagination.js.erb +11 -14
- data/spec/ajax_pagination/controller_additions_spec.rb +15 -3
- data/spec/ajax_pagination/helper_additions_spec.rb +1 -1
- data/spec/ajax_pagination/integration/ajaxpaginate_spec.rb +10 -9
- data/spec/ajax_pagination/integration/nojavascript_spec.rb +7 -7
- data/spec/ajax_pagination/integration/paginate_spec.rb +8 -8
- data/spec/ajax_pagination/integration/rails30_spec.rb +1 -1
- data/spec/rails30_app/app/controllers/application_controller.rb +2 -2
- data/spec/rails30_app/app/controllers/changelog_controller.rb +1 -1
- data/spec/rails30_app/app/controllers/pages_controller.rb +2 -9
- data/spec/rails30_app/app/views/changelog/_page.html.erb +6 -2
- data/spec/rails30_app/app/views/changelog/index.html.erb +1 -1
- data/spec/rails30_app/app/views/layouts/application.html.erb +5 -5
- data/spec/rails30_app/app/views/sessions/count.html.erb +1 -1
- data/spec/rails30_app/public/javascripts/ajax_pagination.js +12 -15
- data/spec/rails_app/app/controllers/application_controller.rb +2 -2
- data/spec/rails_app/app/controllers/changelog_controller.rb +1 -1
- data/spec/rails_app/app/controllers/pages_controller.rb +3 -3
- data/spec/rails_app/app/controllers/posts_controller.rb +3 -3
- data/spec/rails_app/app/views/changelog/_page.html.erb +6 -2
- data/spec/rails_app/app/views/changelog/index.html.erb +1 -1
- data/spec/rails_app/app/views/layouts/application.html.erb +5 -5
- data/spec/rails_app/app/views/pages/warnings.html.erb +8 -7
- data/spec/rails_app/app/views/posts/_page.html.erb +9 -5
- data/spec/rails_app/app/views/posts/_upcomingpage.html.erb +6 -2
- data/spec/rails_app/app/views/posts/index.html.erb +2 -2
- data/spec/rails_app/app/views/posts/show.html.erb +1 -1
- data/spec/rails_app/app/views/sessions/count.html.erb +1 -1
- metadata +86 -132
- data/spec/rails30_app/Gemfile.lock +0 -96
- data/spec/rails30_app/app/views/pages/warnings.html.erb +0 -43
- data/spec/rails_app/Gemfile.lock +0 -107
@@ -1,96 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ../..
|
3
|
-
specs:
|
4
|
-
ajax_pagination (0.5.1)
|
5
|
-
jquery-historyjs
|
6
|
-
jquery-rails (>= 1.0.17)
|
7
|
-
rails (>= 3.0)
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: https://rubygems.org/
|
11
|
-
specs:
|
12
|
-
abstract (1.0.0)
|
13
|
-
actionmailer (3.0.12)
|
14
|
-
actionpack (= 3.0.12)
|
15
|
-
mail (~> 2.2.19)
|
16
|
-
actionpack (3.0.12)
|
17
|
-
activemodel (= 3.0.12)
|
18
|
-
activesupport (= 3.0.12)
|
19
|
-
builder (~> 2.1.2)
|
20
|
-
erubis (~> 2.6.6)
|
21
|
-
i18n (~> 0.5.0)
|
22
|
-
rack (~> 1.2.5)
|
23
|
-
rack-mount (~> 0.6.14)
|
24
|
-
rack-test (~> 0.5.7)
|
25
|
-
tzinfo (~> 0.3.23)
|
26
|
-
activemodel (3.0.12)
|
27
|
-
activesupport (= 3.0.12)
|
28
|
-
builder (~> 2.1.2)
|
29
|
-
i18n (~> 0.5.0)
|
30
|
-
activerecord (3.0.12)
|
31
|
-
activemodel (= 3.0.12)
|
32
|
-
activesupport (= 3.0.12)
|
33
|
-
arel (~> 2.0.10)
|
34
|
-
tzinfo (~> 0.3.23)
|
35
|
-
activeresource (3.0.12)
|
36
|
-
activemodel (= 3.0.12)
|
37
|
-
activesupport (= 3.0.12)
|
38
|
-
activesupport (3.0.12)
|
39
|
-
arel (2.0.10)
|
40
|
-
builder (2.1.2)
|
41
|
-
erubis (2.6.6)
|
42
|
-
abstract (>= 1.0.0)
|
43
|
-
i18n (0.5.0)
|
44
|
-
jquery-historyjs (0.2.3)
|
45
|
-
railties (>= 3.0)
|
46
|
-
thor (>= 0.14)
|
47
|
-
jquery-rails (1.0.19)
|
48
|
-
railties (~> 3.0)
|
49
|
-
thor (~> 0.14)
|
50
|
-
json (1.6.5)
|
51
|
-
mail (2.2.19)
|
52
|
-
activesupport (>= 2.3.6)
|
53
|
-
i18n (>= 0.4.0)
|
54
|
-
mime-types (~> 1.16)
|
55
|
-
treetop (~> 1.4.8)
|
56
|
-
mime-types (1.17.2)
|
57
|
-
polyglot (0.3.3)
|
58
|
-
rack (1.2.5)
|
59
|
-
rack-mount (0.6.14)
|
60
|
-
rack (>= 1.0.0)
|
61
|
-
rack-test (0.5.7)
|
62
|
-
rack (>= 1.0)
|
63
|
-
rails (3.0.12)
|
64
|
-
actionmailer (= 3.0.12)
|
65
|
-
actionpack (= 3.0.12)
|
66
|
-
activerecord (= 3.0.12)
|
67
|
-
activeresource (= 3.0.12)
|
68
|
-
activesupport (= 3.0.12)
|
69
|
-
bundler (~> 1.0)
|
70
|
-
railties (= 3.0.12)
|
71
|
-
railties (3.0.12)
|
72
|
-
actionpack (= 3.0.12)
|
73
|
-
activesupport (= 3.0.12)
|
74
|
-
rake (>= 0.8.7)
|
75
|
-
rdoc (~> 3.4)
|
76
|
-
thor (~> 0.14.4)
|
77
|
-
rake (0.9.2.2)
|
78
|
-
rdoc (3.12)
|
79
|
-
json (~> 1.4)
|
80
|
-
thor (0.14.6)
|
81
|
-
treetop (1.4.10)
|
82
|
-
polyglot
|
83
|
-
polyglot (>= 0.3.1)
|
84
|
-
tzinfo (0.3.32)
|
85
|
-
will_paginate (3.0.3)
|
86
|
-
|
87
|
-
PLATFORMS
|
88
|
-
ruby
|
89
|
-
|
90
|
-
DEPENDENCIES
|
91
|
-
ajax_pagination!
|
92
|
-
jquery-historyjs
|
93
|
-
jquery-rails
|
94
|
-
json
|
95
|
-
rails (~> 3.0.0)
|
96
|
-
will_paginate
|
@@ -1,43 +0,0 @@
|
|
1
|
-
|
2
|
-
This page gives examples of the warnings that may be given, from AJAX Pagination, when some configuration or otherwise is suboptimal, or prevents proper functioning of the gem.
|
3
|
-
|
4
|
-
<%= content_tag :div, :style => "display: inline-block; width: 300px; height: 100px; border: 1px solid black; margin: 10px; padding: 10px; vertical-align: middle;" do %>
|
5
|
-
<%= ajax_section do %>
|
6
|
-
<p>You are on page <%= params[:page] ||= 1 %>.</p>
|
7
|
-
|
8
|
-
<p><%= ajax_link_to "Reload whole page just to refresh this content", pages_warnings_path(:page => (params[:page].to_i+1)), :pagination => "page", :id => "fullpagelink" %></p>
|
9
|
-
<% end %>
|
10
|
-
<% end %>
|
11
|
-
|
12
|
-
<%= content_tag :div, :style => "display: inline-block; width: 300px; height: 100px; border: 1px solid black; margin: 10px; padding: 10px; vertical-align: middle;" do %>
|
13
|
-
<p>AJAX Pagination Status: <%= raw (params[:disable] ||= false)?"<span style=\"color:red;\">Disabled":"<span style=\"color:green;\">Enabled" %></span></p>
|
14
|
-
<% if params[:disable] %>
|
15
|
-
<script type="text/javascript">History = null;</script>
|
16
|
-
<p><%= link_to "Enable History.js", pages_warnings_path %></p>
|
17
|
-
<% else %>
|
18
|
-
<p><%= link_to "Disable History.js", pages_warnings_path(:disable => true), :id => "disablehistoryjslink" %></p>
|
19
|
-
<% end %>
|
20
|
-
<p><i>Note: History.js is an AJAX Pagination dependency.</i></p>
|
21
|
-
<% end %>
|
22
|
-
|
23
|
-
<%= content_tag :div, :style => "display: inline-block; width: 300px; height: 100px; border: 1px solid black; margin: 10px; padding: 10px; vertical-align: middle;" do %>
|
24
|
-
<p>AJAX Links need to reference a valid pagination section, otherwise AJAX Pagination doesn't know where the new content should go.</p>
|
25
|
-
<p><%= ajax_link_to "Link without valid AJAX Pagination section", pages_warnings_path, :pagination => "RANDOM", :id => "nosectionlink" %></p>
|
26
|
-
<% end %>
|
27
|
-
|
28
|
-
<%= content_tag :div, :style => "display: inline-block; width: 300px; height: 100px; border: 1px solid black; margin: 10px; padding: 10px; vertical-align: middle;" do %>
|
29
|
-
<%= content_tag :div, :style => "border: 1px solid black; margin: 10px;" do %>
|
30
|
-
<%= ajax_section :pagination => "double" do %>My section name is "double".<% end %>
|
31
|
-
<% end %>
|
32
|
-
<%= content_tag :div, :style => "border: 1px solid black; margin: 10px;" do %>
|
33
|
-
<%= ajax_section :pagination => "double" do %>My section name is "double".<% end %>
|
34
|
-
<% end %>
|
35
|
-
<p><%= ajax_link_to "Load stuff in section named \"double\"", pages_warnings_path, :pagination => "double", :id => "doublesectionlink" %></p>
|
36
|
-
<% end %>
|
37
|
-
|
38
|
-
<%= content_tag :div, :class => "paginated_section", :style => "display: inline-block; width: 300px; height: 100px; border: 1px solid black; margin: 10px; padding: 10px; vertical-align: middle;" do %>
|
39
|
-
<%= content_tag :div, :class => "ajaxpagination" do %>
|
40
|
-
<p>If a link does not reference a section into which content can be loaded, AJAX will be cancelled, and the link will load in the whole window.</p>
|
41
|
-
<p><%= link_to "Link without reference to any section", pages_warnings_path, :id => "missingreferencelink" %></p>
|
42
|
-
<% end %>
|
43
|
-
<% end %>
|
data/spec/rails_app/Gemfile.lock
DELETED
@@ -1,107 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ../..
|
3
|
-
specs:
|
4
|
-
ajax_pagination (0.5.1)
|
5
|
-
jquery-historyjs
|
6
|
-
jquery-rails (>= 1.0.17)
|
7
|
-
rails (>= 3.0)
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: https://rubygems.org/
|
11
|
-
specs:
|
12
|
-
actionmailer (3.2.1)
|
13
|
-
actionpack (= 3.2.1)
|
14
|
-
mail (~> 2.4.0)
|
15
|
-
actionpack (3.2.1)
|
16
|
-
activemodel (= 3.2.1)
|
17
|
-
activesupport (= 3.2.1)
|
18
|
-
builder (~> 3.0.0)
|
19
|
-
erubis (~> 2.7.0)
|
20
|
-
journey (~> 1.0.1)
|
21
|
-
rack (~> 1.4.0)
|
22
|
-
rack-cache (~> 1.1)
|
23
|
-
rack-test (~> 0.6.1)
|
24
|
-
sprockets (~> 2.1.2)
|
25
|
-
activemodel (3.2.1)
|
26
|
-
activesupport (= 3.2.1)
|
27
|
-
builder (~> 3.0.0)
|
28
|
-
activerecord (3.2.1)
|
29
|
-
activemodel (= 3.2.1)
|
30
|
-
activesupport (= 3.2.1)
|
31
|
-
arel (~> 3.0.0)
|
32
|
-
tzinfo (~> 0.3.29)
|
33
|
-
activeresource (3.2.1)
|
34
|
-
activemodel (= 3.2.1)
|
35
|
-
activesupport (= 3.2.1)
|
36
|
-
activesupport (3.2.1)
|
37
|
-
i18n (~> 0.6)
|
38
|
-
multi_json (~> 1.0)
|
39
|
-
arel (3.0.2)
|
40
|
-
builder (3.0.0)
|
41
|
-
erubis (2.7.0)
|
42
|
-
hike (1.2.1)
|
43
|
-
i18n (0.6.0)
|
44
|
-
journey (1.0.3)
|
45
|
-
jquery-historyjs (0.2.2)
|
46
|
-
railties (>= 3.0)
|
47
|
-
thor (>= 0.14)
|
48
|
-
jquery-rails (2.0.1)
|
49
|
-
railties (>= 3.2.0, < 5.0)
|
50
|
-
thor (~> 0.14)
|
51
|
-
json (1.6.5)
|
52
|
-
mail (2.4.1)
|
53
|
-
i18n (>= 0.4.0)
|
54
|
-
mime-types (~> 1.16)
|
55
|
-
treetop (~> 1.4.8)
|
56
|
-
mime-types (1.17.2)
|
57
|
-
multi_json (1.1.0)
|
58
|
-
polyglot (0.3.3)
|
59
|
-
rack (1.4.1)
|
60
|
-
rack-cache (1.2)
|
61
|
-
rack (>= 0.4)
|
62
|
-
rack-ssl (1.3.2)
|
63
|
-
rack
|
64
|
-
rack-test (0.6.1)
|
65
|
-
rack (>= 1.0)
|
66
|
-
rails (3.2.1)
|
67
|
-
actionmailer (= 3.2.1)
|
68
|
-
actionpack (= 3.2.1)
|
69
|
-
activerecord (= 3.2.1)
|
70
|
-
activeresource (= 3.2.1)
|
71
|
-
activesupport (= 3.2.1)
|
72
|
-
bundler (~> 1.0)
|
73
|
-
railties (= 3.2.1)
|
74
|
-
railties (3.2.1)
|
75
|
-
actionpack (= 3.2.1)
|
76
|
-
activesupport (= 3.2.1)
|
77
|
-
rack-ssl (~> 1.3.2)
|
78
|
-
rake (>= 0.8.7)
|
79
|
-
rdoc (~> 3.4)
|
80
|
-
thor (~> 0.14.6)
|
81
|
-
rake (0.9.2.2)
|
82
|
-
rdoc (3.12)
|
83
|
-
json (~> 1.4)
|
84
|
-
sprockets (2.1.2)
|
85
|
-
hike (~> 1.2)
|
86
|
-
rack (~> 1.0)
|
87
|
-
tilt (~> 1.1, != 1.3.0)
|
88
|
-
sqlite3 (1.3.5)
|
89
|
-
thor (0.14.6)
|
90
|
-
tilt (1.3.3)
|
91
|
-
treetop (1.4.10)
|
92
|
-
polyglot
|
93
|
-
polyglot (>= 0.3.1)
|
94
|
-
tzinfo (0.3.32)
|
95
|
-
will_paginate (3.0.3)
|
96
|
-
|
97
|
-
PLATFORMS
|
98
|
-
ruby
|
99
|
-
|
100
|
-
DEPENDENCIES
|
101
|
-
ajax_pagination!
|
102
|
-
jquery-historyjs
|
103
|
-
jquery-rails
|
104
|
-
json
|
105
|
-
rails (= 3.2.1)
|
106
|
-
sqlite3
|
107
|
-
will_paginate
|