neat-pages 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,10 +12,9 @@ class NeatPage
12
12
  $('#neat-pages-navigation li.page a').click (e) => @thatPage $(e.target) ; return false
13
13
 
14
14
 
15
+ buildURL: (noPage) -> encodeURI(@getPage(noPage).attr('href').replace('?', '.neatpage?'))
15
16
 
16
- cachePage: (noPage) ->
17
- url = @getPage(noPage).attr('href').replace('?', '.neatpage?')
18
- $.get(url, (data) => @cachePages[noPage] = data)
17
+ cachePage: (noPage) -> $.get(@buildURL(noPage), (data) => @cachePages[noPage] = data)
19
18
 
20
19
 
21
20
  cacheNextPage: () ->
@@ -74,8 +73,7 @@ class NeatPage
74
73
  if @pageIsCached noPage
75
74
  @updatePage @cachePages[noPage], noPage
76
75
  else
77
- url = @getPage(noPage).attr('href').replace('?', '.neatpage?')
78
- $.get(url, (data) => @updatePage data, noPage)
76
+ $.get(@buildURL(noPage), (data) => @updatePage data, noPage)
79
77
 
80
78
 
81
79
  moveIsDisabled: (direction) -> $('#neat-pages-navigation li.' + direction).hasClass('disabled')
@@ -9,6 +9,7 @@ ul#neat-pages-navigation{border-top:1px solid #ddd;clear:both;padding-top:30px;t
9
9
  }
10
10
  li.page.selected a{background:#ccc;border:1px solid #777;color:#222;font-weight:normal;padding:5px 9px;}
11
11
  li.move.disabled a{background-color:#eee;border:solid 1px #DEDEDE;color:#aaa;cursor:default;}
12
+ li.move.disabled a:hover{color:#aaa;}
12
13
  }
13
14
 
14
15
  /****************************************************************************
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neat-pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,10 +9,10 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-25 00:00:00.000000000 Z
12
+ date: 2013-02-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- requirement: &2163950480 !ruby/object:Gem::Requirement
15
+ requirement: &2154413140 !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ! '>='
18
18
  - !ruby/object:Gem::Version
@@ -21,9 +21,9 @@ dependencies:
21
21
  prerelease: false
22
22
  type: :development
23
23
  name: rake
24
- version_requirements: *2163950480
24
+ version_requirements: *2154413140
25
25
  - !ruby/object:Gem::Dependency
26
- requirement: &2163949980 !ruby/object:Gem::Requirement
26
+ requirement: &2154412600 !ruby/object:Gem::Requirement
27
27
  requirements:
28
28
  - - ! '>='
29
29
  - !ruby/object:Gem::Version
@@ -32,9 +32,9 @@ dependencies:
32
32
  prerelease: false
33
33
  type: :development
34
34
  name: rspec
35
- version_requirements: *2163949980
35
+ version_requirements: *2154412600
36
36
  - !ruby/object:Gem::Dependency
37
- requirement: &2163974020 !ruby/object:Gem::Requirement
37
+ requirement: &2154412100 !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - ! '>='
40
40
  - !ruby/object:Gem::Version
@@ -43,7 +43,7 @@ dependencies:
43
43
  prerelease: false
44
44
  type: :development
45
45
  name: rails
46
- version_requirements: *2163974020
46
+ version_requirements: *2154412100
47
47
  description: A simple pagination API to paginate Mongoid Models.
48
48
  email:
49
49
  - sebastien@demarque.com