epi_js 1 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -1
- data/lib/epi_js/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0ea0f23ad95d3bbe7fe2a10dad4b3a3c465f2f6
|
4
|
+
data.tar.gz: 480cd8bd092bbba61b7e60bdd047eb45821fa27c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 177c29ef9d5e9fb26f2a70722a5eecf05b65ffa96fb1eafbd3cf3160321f4e24ceb869316d21b19ff8d3482584f2af79a195ff6f8d667e5131e2bff142dda7f0
|
7
|
+
data.tar.gz: 84d07e1bf1caafc49c9d3ca690c5b516f661f725999ddacbc1157e19be30a140f0c7bca2d069f3d892acd5bdcac610968c3034339a0765eec76b543705410718
|
data/README.md
CHANGED
@@ -4,6 +4,7 @@ Some jQuery based scripts, including:
|
|
4
4
|
|
5
5
|
* A simple AJAX lightbox using Twitter Bootstrap modal
|
6
6
|
* A simple Growl-like using Twitter Bootstrap alert
|
7
|
+
* A simple table filter
|
7
8
|
* A script to hide / show HTML elements based on user input
|
8
9
|
|
9
10
|
## Installation
|
@@ -105,4 +106,17 @@ Or for SimpleForm, use:
|
|
105
106
|
|
106
107
|
f.input :some_select, input_html: {data: {visibility_map: {foo: '#foo', bar: '#bar'}}}
|
107
108
|
|
108
|
-
When the value of the input element is `foo`, the element `#foo` will be visible and `#bar` will be hidden, and vice versa. The value of the JSON key value pair can be any jQuery selectors.
|
109
|
+
When the value of the input element is `foo`, the element `#foo` will be visible and `#bar` will be hidden, and vice versa. The value of the JSON key value pair can be any jQuery selectors.
|
110
|
+
|
111
|
+
### Table filter
|
112
|
+
This allows you to filter out rows in a table based on an input field.
|
113
|
+
|
114
|
+
Add to your `app/assets/javascripts/application.js`
|
115
|
+
|
116
|
+
//= require table_filter
|
117
|
+
|
118
|
+
#### Via data attributes
|
119
|
+
Set `data-table-filter-target` on the input field you wish to filter by. This should be a selecter for the `table` tag you want to filter. This needs to have a `thead` and `tbody`.
|
120
|
+
|
121
|
+
|
122
|
+
You can overwrite the default 'No record found' message by setting `data-no-record` on the table. The span of this will default to the number of `tr` elements in `thead`, but is customisable with `data-no-record-span` on the table.
|
data/lib/epi_js/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: epi_js
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shuo Chen
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-04-
|
12
|
+
date: 2016-04-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|