tabulatr2 0.9.1 → 0.9.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3a100eb6202380170c5e957e104a93d5b359f3ba
4
- data.tar.gz: 65259c8ffd88e967eaf1d51dcd888d4446f379e7
3
+ metadata.gz: 7714cdb5e97ef698c0207c832c9778f107f01aed
4
+ data.tar.gz: 6193fd43909b6a071223e54c78e628ccb7fcbec3
5
5
  SHA512:
6
- metadata.gz: f9516e1047006e55ba663b9a86d6f31bff0d45733e0da4ae78fb0c0cf13d562b8dcf4d5bfbc88daaed98613633d29c3061ba532dcff1b93fb12c670abb2615a9
7
- data.tar.gz: ebb911b6ce9d4abcf4003abc1898745a03b4f9167b082516ef023c0592bfd12a76dbea9d7998b76390d4d579d43887a0fd950d9c07752486be6f93a40261d911
6
+ metadata.gz: 88d9ba05b6785fe460e33266274b13acdb0231db38c29cbc4306492f18d6ed3ed8d5eef47094e9cfbb60bb39693ae1d5090e5556d9eb641a280b22ecab4b39de
7
+ data.tar.gz: 0ee34fdbaa64d8693333ba27d4cd14ebcc1bfc88117f42635d055871a3e4b77d7d996c449c28f0319b592f7aa0b57f8256f50417111142060a1d834bfe1e24b0
data/.travis.yml CHANGED
@@ -2,3 +2,4 @@ language: ruby
2
2
  rvm:
3
3
  - '2.0.0'
4
4
  script: "bundle exec rspec spec"
5
+
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.9.2
2
+
3
+ * Fixed bug which caused a reload of the website when clicking on the current
4
+ table page again.
5
+
1
6
  ## 0.9.1
2
7
 
3
8
  * Show spinner when data is loading. Type of spinner can be overriden via
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Tabulatr2 - Index Tables made easy
2
- [![Code Climate](https://codeclimate.com/github/provideal/tabulatr2.png)](https://codeclimate.com/github/provideal/tabulatr2)
3
2
  [![Gem Version](https://badge.fury.io/rb/tabulatr2.png)](http://badge.fury.io/rb/tabulatr2)
4
- **WARNING: Tabulatr2 is not production ready yet!**
3
+ [![Code Climate](https://codeclimate.com/github/provideal/tabulatr2.png)](https://codeclimate.com/github/provideal/tabulatr2)
4
+ [![Travis CI](https://api.travis-ci.org/provideal/tabulatr2.png)](https://travis-ci.org/provideal/tabulatr2)
5
5
 
6
6
  ## Installation
7
7
 
@@ -100,8 +100,8 @@ Tabulatr.prototype = {
100
100
  //old page should be stored
101
101
  this.storePage = true;
102
102
  // check if this page was already loaded
103
+ $table.find('tbody tr').hide();
103
104
  if($table.find('tbody tr[data-page='+ hash.page +']').length > 0){
104
- $table.find('tbody tr').hide();
105
105
  $table.find('tbody tr[data-page='+ hash.page +']').show();
106
106
 
107
107
  this.updatePagination(hash.page,
@@ -469,7 +469,7 @@ $(document).on('click', '.pagination a', function(){
469
469
  var a = $(this);
470
470
  if(a.parent().hasClass('active') ||
471
471
  a.parent().hasClass('disabled')){
472
- return;
472
+ return false;
473
473
  }
474
474
  var tableId = $(a).closest('.pagination').data('table');
475
475
  $('.tabulatr_mark_all[data-table='+ tableId +']').prop('checked', false);
@@ -51,7 +51,7 @@ form.form.form-horizontal.tabulatr_filter_form data-table=table_id data-remote=
51
51
  = column.checkbox_label
52
52
  - elsif column.filter == :exact
53
53
  .col-md-11
54
- input.tabulatr_filter.form-control type="text" id="#{name}_from" data-tabulatr-attribute="#{name}" name="#{iname}"
54
+ input.tabulatr_filter.form-control type="text" id="#{name}_exact" data-tabulatr-attribute="#{name}" name="#{iname}"
55
55
  - elsif column.filter == :date
56
56
  .col-md-3
57
57
  select.form-control name="#{iname}[date][simple]" data-tabulatr-date-filter="#{formatted_name}_#{name}_filter"
@@ -73,7 +73,7 @@ form.form.form-horizontal.tabulatr_filter_form data-table=table_id data-remote=
73
73
  input.tabulatr_filter.form-control.date-picker.from_to.hidden type="text" id="#{formatted_name}_#{name}_filter_to" name="#{iname}[date][to]"
74
74
  - else
75
75
  .col-md-11
76
- input.tabulatr_filter.form-control type="text" id="#{name}_from" data-tabulatr-attribute="#{name}" name="#{iname}[like]"
76
+ input.tabulatr_filter.form-control type="text" id="#{name}_like" data-tabulatr-attribute="#{name}" name="#{iname}[like]"
77
77
  .col-md-1
78
78
  = link_to "✕", '#', 'data-hide-table-filter' => name, class: 'form-control btn btn-danger btn-mini'
79
79
 
@@ -22,5 +22,5 @@
22
22
  #++
23
23
 
24
24
  module Tabulatr
25
- VERSION = "0.9.1"
25
+ VERSION = "0.9.2"
26
26
  end
@@ -137,7 +137,7 @@ describe "Tabulatr" do
137
137
  find(".tabulatr-filter-menu-wrapper a.btn").trigger('click')
138
138
  within(".tabulatr_filter_form") do
139
139
  fill_in("product_filter[title][like]", with: "ore")
140
- expect(find('#title_from').visible?)
140
+ expect(find('#title_like').visible?)
141
141
  click_button("Apply")
142
142
  end
143
143
  page.should have_content("lorem")
@@ -205,7 +205,7 @@ describe "Tabulatr" do
205
205
  find(".tabulatr-filter-menu-wrapper a.btn").trigger('click')
206
206
  within(".tabulatr_filter_form") do
207
207
  fill_in("product_filter[title][like]", with: "foo")
208
- expect(find('#title_from').visible?)
208
+ expect(find('#title_like').visible?)
209
209
  click_button("Apply")
210
210
  end
211
211
  expect(page).to have_content('foo')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tabulatr2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Horn
@@ -10,48 +10,48 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-01-08 00:00:00.000000000 Z
13
+ date: 2014-01-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - '>='
19
+ - - ">="
20
20
  - !ruby/object:Gem::Version
21
21
  version: 4.0.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - '>='
26
+ - - ">="
27
27
  - !ruby/object:Gem::Version
28
28
  version: 4.0.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: slim
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - '>='
33
+ - - ">="
34
34
  - !ruby/object:Gem::Version
35
35
  version: 2.0.1
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - '>='
40
+ - - ">="
41
41
  - !ruby/object:Gem::Version
42
42
  version: 2.0.1
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: activerecord_outer_joins
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - ~>
47
+ - - "~>"
48
48
  - !ruby/object:Gem::Version
49
49
  version: 0.0.1
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
- - - ~>
54
+ - - "~>"
55
55
  - !ruby/object:Gem::Version
56
56
  version: 0.0.1
57
57
  description: A tight DSL to build tables of ActiveRecord models with sorting, pagination,
@@ -62,9 +62,9 @@ executables: []
62
62
  extensions: []
63
63
  extra_rdoc_files: []
64
64
  files:
65
- - .gitignore
66
- - .rspec
67
- - .travis.yml
65
+ - ".gitignore"
66
+ - ".rspec"
67
+ - ".travis.yml"
68
68
  - CHANGELOG.md
69
69
  - Gemfile
70
70
  - LICENSE
@@ -189,22 +189,22 @@ licenses:
189
189
  metadata: {}
190
190
  post_install_message:
191
191
  rdoc_options:
192
- - --charset=UTF-8
192
+ - "--charset=UTF-8"
193
193
  require_paths:
194
194
  - lib
195
195
  required_ruby_version: !ruby/object:Gem::Requirement
196
196
  requirements:
197
- - - '>='
197
+ - - ">="
198
198
  - !ruby/object:Gem::Version
199
199
  version: '0'
200
200
  required_rubygems_version: !ruby/object:Gem::Requirement
201
201
  requirements:
202
- - - '>='
202
+ - - ">="
203
203
  - !ruby/object:Gem::Version
204
204
  version: '0'
205
205
  requirements: []
206
206
  rubyforge_project:
207
- rubygems_version: 2.0.3
207
+ rubygems_version: 2.2.1
208
208
  signing_key:
209
209
  specification_version: 4
210
210
  summary: A tight DSL to build tables of ActiveRecord models with sorting, pagination,
@@ -272,4 +272,3 @@ test_files:
272
272
  - spec/lib/tabulatr/data/data_spec.rb
273
273
  - spec/lib/tabulatr/json_builder_spec.rb
274
274
  - spec/spec_helper.rb
275
- has_rdoc: