datatable 0.2pre2 → 0.2pre3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +22 -16
- data/example_app/Gemfile.lock +1 -1
- data/lib/datatable.rb +1 -2
- data/lib/datatable/version.rb +1 -1
- metadata +26 -52
data/README.md
CHANGED
@@ -1,43 +1,44 @@
|
|
1
|
+
WARNING!!!
|
2
|
+
==========
|
3
|
+
|
4
|
+
This gem is not ready for prime-time but if you're feeling adventurous read on....
|
5
|
+
|
6
|
+
It's likely the code base will experience significant churn in the next few releases as we search for the best way deliver the desired
|
7
|
+
functionality. If you think this may be a problem you should most likely avoid using this gem for now. On the other hand if you're not
|
8
|
+
afraid of diving into the code to help us improve it we will certiainly do what we can to make sure it works for you in return.
|
9
|
+
|
1
10
|
Datatable
|
2
11
|
=========
|
3
12
|
|
4
13
|
This is a [Rails 3.0](http://rubyonrails.org) plugin that provides server-side processing for the [Datatables](http://datatables.net) javascript library. The screenshot below
|
5
|
-
contains an example with global search, per column search, infinite scrolling and the optional table tools plugin installed using the jquery ui
|
14
|
+
contains an example with global search, per column search, infinite scrolling and the optional table tools plugin installed using the jquery ui theme 'smoothness'.
|
6
15
|
|
7
16
|
|
8
17
|
![Alt text](https://github.com/logic-refinery/datatable/raw/master/images/datatable_screenshot.png "optional title")
|
9
18
|
|
10
19
|
|
11
|
-
WARNING!!!
|
12
|
-
==========
|
13
|
-
|
14
|
-
This gem is not ready for primetime but if you're feeling adventurous read on....
|
15
|
-
|
16
20
|
|
17
21
|
Introduction
|
18
22
|
============
|
19
23
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
+
This library is not intended to create a zero configuration admin style interface to your data. It's intended to provide a fairly complete
|
25
|
+
and flexible interface into your data for the datatables javascript library. It will require a moderate amount of configuration to define
|
26
|
+
exactly what you want to see, how it should be displayed and the relationship between that view and the database schema. Hopefully though
|
27
|
+
we can make it so all of that configuration happens in one place with a minimal amount of redundancy.
|
24
28
|
|
25
29
|
Setup
|
26
30
|
======
|
27
31
|
|
28
|
-
Because of the fast moving nature of this project for the time being I recomend using bundler and pulling from git. If you
|
29
|
-
intend to deploy an application using this gem I'd recomend locking your dependency to a specific well tested commit.
|
30
|
-
|
31
32
|
Add the following to you Gemfile
|
32
33
|
|
33
34
|
```ruby
|
34
|
-
gem "datatable",
|
35
|
+
gem "datatable", "~>0.2pre2"
|
35
36
|
```
|
36
37
|
|
37
38
|
Then run bundle install
|
38
39
|
|
39
40
|
```sh
|
40
|
-
bundle
|
41
|
+
bundle install datatable
|
41
42
|
```
|
42
43
|
|
43
44
|
Then run the generator to create the javascript files and code templates
|
@@ -46,7 +47,8 @@ Then run the generator to create the javascript files and code templates
|
|
46
47
|
rails generate datatable:install
|
47
48
|
```
|
48
49
|
|
49
|
-
The generator will have added some
|
50
|
+
The generator will have added some files in public/datatable. At a minimum you need to include the datatables
|
51
|
+
javascript after jquery. A typical rails applicaiton layout would look something like this.
|
50
52
|
|
51
53
|
```erb
|
52
54
|
<%= javascript_include_tag :defaults %>
|
@@ -128,6 +130,10 @@ for more detailed information.
|
|
128
130
|
end
|
129
131
|
```
|
130
132
|
|
133
|
+
Documentation
|
134
|
+
=============
|
135
|
+
|
136
|
+
[wiki](https://github.com/logic-refinery/datatable/wiki)
|
131
137
|
|
132
138
|
Limitations
|
133
139
|
==========
|
data/example_app/Gemfile.lock
CHANGED
data/lib/datatable.rb
CHANGED
@@ -296,7 +296,7 @@ module Datatable
|
|
296
296
|
end
|
297
297
|
|
298
298
|
def global_search_string
|
299
|
-
return nil
|
299
|
+
return nil if @params['sSearch'].blank?
|
300
300
|
filter = @params['sSearch'].strip
|
301
301
|
result = []
|
302
302
|
|
@@ -324,7 +324,6 @@ module Datatable
|
|
324
324
|
((@params['iColumns']||1)).times do |i|
|
325
325
|
next if @params["sSearch_#{i}"].blank?
|
326
326
|
filter = @params["sSearch_#{i}"].strip
|
327
|
-
|
328
327
|
raise "can't search unsearchable column'" if column_attributes[keys[i]][:bSearchable] == false
|
329
328
|
attributes = column_attributes[keys[i]]
|
330
329
|
if attributes[:type] == :string
|
data/lib/datatable/version.rb
CHANGED
metadata
CHANGED
@@ -1,49 +1,35 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: datatable
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2pre3
|
5
5
|
prerelease: 3
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 2
|
9
|
-
- pre
|
10
|
-
- 2
|
11
|
-
version: 0.2pre2
|
12
6
|
platform: ruby
|
13
|
-
authors:
|
7
|
+
authors:
|
14
8
|
- Michael Greenly
|
15
9
|
- Mischa Fierer
|
16
10
|
autorequire:
|
17
11
|
bindir: bin
|
18
12
|
cert_chain: []
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
- !ruby/object:Gem::Dependency
|
13
|
+
date: 2011-08-07 00:00:00.000000000Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
23
16
|
name: rails
|
24
|
-
|
17
|
+
requirement: &12589440 !ruby/object:Gem::Requirement
|
25
18
|
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
segments:
|
31
|
-
- 3
|
32
|
-
- 0
|
33
|
-
version: "3.0"
|
34
|
-
prerelease: false
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '3.0'
|
35
23
|
type: :runtime
|
36
|
-
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: *12589440
|
37
26
|
description: A Rails plugin for the jquery.datatables library
|
38
|
-
email:
|
27
|
+
email:
|
39
28
|
- michaelgreenly@logic-refinery.com
|
40
29
|
executables: []
|
41
|
-
|
42
30
|
extensions: []
|
43
|
-
|
44
31
|
extra_rdoc_files: []
|
45
|
-
|
46
|
-
files:
|
32
|
+
files:
|
47
33
|
- .bundle/config
|
48
34
|
- .gitignore
|
49
35
|
- .rspec
|
@@ -237,38 +223,26 @@ files:
|
|
237
223
|
- vendor/datatable/media/js/jquery.dataTablesExt.fnSetFilteringDelay.js
|
238
224
|
homepage: https://github.com/logic-refinery/datatable
|
239
225
|
licenses: []
|
240
|
-
|
241
226
|
post_install_message:
|
242
227
|
rdoc_options: []
|
243
|
-
|
244
|
-
require_paths:
|
228
|
+
require_paths:
|
245
229
|
- lib
|
246
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
230
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
247
231
|
none: false
|
248
|
-
requirements:
|
249
|
-
- -
|
250
|
-
- !ruby/object:Gem::Version
|
251
|
-
|
252
|
-
|
253
|
-
- 0
|
254
|
-
version: "0"
|
255
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
232
|
+
requirements:
|
233
|
+
- - ! '>='
|
234
|
+
- !ruby/object:Gem::Version
|
235
|
+
version: '0'
|
236
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
256
237
|
none: false
|
257
|
-
requirements:
|
258
|
-
- -
|
259
|
-
- !ruby/object:Gem::Version
|
260
|
-
hash: 25
|
261
|
-
segments:
|
262
|
-
- 1
|
263
|
-
- 3
|
264
|
-
- 1
|
238
|
+
requirements:
|
239
|
+
- - ! '>'
|
240
|
+
- !ruby/object:Gem::Version
|
265
241
|
version: 1.3.1
|
266
242
|
requirements: []
|
267
|
-
|
268
243
|
rubyforge_project:
|
269
244
|
rubygems_version: 1.8.5
|
270
245
|
signing_key:
|
271
246
|
specification_version: 3
|
272
247
|
summary: A Rails plugin for the jquery.datatables library
|
273
248
|
test_files: []
|
274
|
-
|