grid_table 1.0.4 → 1.0.5.rails3

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.
@@ -92,7 +92,7 @@ class GridTable::Control
92
92
  end
93
93
  records
94
94
  else
95
- joined_control? ? records.includes(active_source).references(active_source) : records
95
+ joined_control? ? records.includes(active_source) : records
96
96
  end
97
97
  end
98
98
 
@@ -1,3 +1,3 @@
1
1
  module GridTable
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5.rails3"
3
3
  end
@@ -109,7 +109,7 @@ GridTable = (function() {
109
109
  $column = $(column);
110
110
  $column.append(" <i class='" + sortIcons['default'] + "'></i>");
111
111
  if ($column.data('default-sort')) {
112
- _this.setSort($column.data('field'), $column.data('default-sort'));
112
+ _this.setSort($column.data('field'), $column.data('default-sort'), true);
113
113
  }
114
114
  return $column.on('click', function(event) {
115
115
  _this.gridTableParams.setSort($(event.currentTarget).data('field'), null);
@@ -196,9 +196,12 @@ GridTable = (function() {
196
196
  }
197
197
  };
198
198
 
199
- GridTable.prototype.setSort = function(column, direction) {
199
+ GridTable.prototype.setSort = function(column, direction, initialSort) {
200
+ if (typeof initialSort === 'undefined') {
201
+ initialSort = false;
202
+ }
200
203
  this.gridTableParams.setSort(column, direction);
201
- if (this.gridTableDOM !== null) {
204
+ if (this.gridTableDOM !== null && initialSort === false) {
202
205
  return this.loadData();
203
206
  }
204
207
  };
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grid_table
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5.rails3
5
+ prerelease: 6
5
6
  platform: ruby
6
7
  authors:
7
8
  - Jon Principe
@@ -9,11 +10,12 @@ authors:
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2014-11-11 00:00:00.000000000 Z
13
+ date: 2014-12-16 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: bundler
16
17
  requirement: !ruby/object:Gem::Requirement
18
+ none: false
17
19
  requirements:
18
20
  - - ~>
19
21
  - !ruby/object:Gem::Version
@@ -21,6 +23,7 @@ dependencies:
21
23
  type: :development
22
24
  prerelease: false
23
25
  version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
24
27
  requirements:
25
28
  - - ~>
26
29
  - !ruby/object:Gem::Version
@@ -28,15 +31,17 @@ dependencies:
28
31
  - !ruby/object:Gem::Dependency
29
32
  name: rake
30
33
  requirement: !ruby/object:Gem::Requirement
34
+ none: false
31
35
  requirements:
32
- - - '>='
36
+ - - ! '>='
33
37
  - !ruby/object:Gem::Version
34
38
  version: '0'
35
39
  type: :development
36
40
  prerelease: false
37
41
  version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
38
43
  requirements:
39
- - - '>='
44
+ - - ! '>='
40
45
  - !ruby/object:Gem::Version
41
46
  version: '0'
42
47
  description: Library to help manage powerful HTML Tables through the Model, View and
@@ -63,25 +68,26 @@ files:
63
68
  homepage: http://github.com/jprincipe/grid_table
64
69
  licenses:
65
70
  - MIT
66
- metadata: {}
67
71
  post_install_message:
68
72
  rdoc_options: []
69
73
  require_paths:
70
74
  - lib
71
75
  required_ruby_version: !ruby/object:Gem::Requirement
76
+ none: false
72
77
  requirements:
73
- - - '>='
78
+ - - ! '>='
74
79
  - !ruby/object:Gem::Version
75
80
  version: '0'
76
81
  required_rubygems_version: !ruby/object:Gem::Requirement
82
+ none: false
77
83
  requirements:
78
- - - '>='
84
+ - - ! '>'
79
85
  - !ruby/object:Gem::Version
80
- version: '0'
86
+ version: 1.3.1
81
87
  requirements: []
82
88
  rubyforge_project:
83
- rubygems_version: 2.0.14
89
+ rubygems_version: 1.8.25
84
90
  signing_key:
85
- specification_version: 4
91
+ specification_version: 3
86
92
  summary: Utility for powerful HTML Tables
87
93
  test_files: []
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 9e5ed4b7a68cc385ba7c63dbbe1ad87f966388f2
4
- data.tar.gz: 2f566ad1b7c7382d10f06027fee7028fa88e4bf9
5
- SHA512:
6
- metadata.gz: bf8f5b5dd5a792b55c90568f2b2d49f35b8abd08b763119d48957312b5d74366218d49deb1a77948976c76f48ec44ea4f69d93f46c3704cb29657b45ec65a793
7
- data.tar.gz: 8c8382bcde2bbeaf8b87b181166caba958842b03c6528e92e576020cefc6685c5d3fca64f3f9ddc31753a88ded964a12fffd6ab4333800e8e4df5d063996f8db