effective_form_inputs 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1e577be5802efc63230b2b66f9f3d52bec1ee06
|
4
|
+
data.tar.gz: 3dfe18e3f27b3039a16fbbb638b615ababe9be03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 220cd031a9bd83bd4999b3f69dc387bc0d899ecb3cb1462ac0d9900df841ec028606d526e6fbdf3e24f2db366645ef6d61e622a0b23251c6c6368fe73ca32a25
|
7
|
+
data.tar.gz: 1a2a5508b86cd3ad67e17622eb32719d7d8b7f131adc2c9c8fa5187984b80ce61f69373a4eaa15616658088b9908f532e523a5a0c41410e1746936656b65b8e5
|
data/README.md
CHANGED
@@ -221,12 +221,12 @@ and as a SimpleForm input:
|
|
221
221
|
= simple_form_for @user do |f|
|
222
222
|
= f.input :category, :as => :effective_select, :collection => 10.times.map { |x| "Category #{x}"}
|
223
223
|
= f.input :categories, :as => :effective_select, :collection => 10.times.map { |x| "Category #{x}"}, :multiple => true
|
224
|
-
= f.input :
|
224
|
+
= f.input :categories, :as => :effective_select, :collection => 10.times.map { |x| "Category #{x}"}, :multiple => true, :tags => true
|
225
225
|
```
|
226
226
|
|
227
227
|
### Modes
|
228
228
|
|
229
|
-
The standard mode is
|
229
|
+
The standard mode is a replacement for the default single select box.
|
230
230
|
|
231
231
|
Passing `:multiple => true` will allow multiple selections to be made.
|
232
232
|
|
@@ -239,6 +239,7 @@ The default options used to initialize this form input are as follows:
|
|
239
239
|
|
240
240
|
```ruby
|
241
241
|
:allowClear => !(options[:multiple]) # Only display the Clear 'x' on a single selection box
|
242
|
+
:tokenSeparators => [',', ' ']
|
242
243
|
```
|
243
244
|
|
244
245
|
### Interesting Available Options
|
@@ -1,3 +1,12 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
// These are overrides from the bootstrap-theme
|
2
|
+
|
3
|
+
.select2-container--bootstrap .select2-selection--single span.select2-selection__clear {
|
4
|
+
margin-top: -1px;
|
5
|
+
margin-right: 0px;
|
6
|
+
}
|
7
|
+
|
8
|
+
.form-group {
|
9
|
+
.select2-container--bootstrap {
|
10
|
+
min-width: 178px;
|
11
|
+
}
|
3
12
|
}
|
@@ -4,7 +4,7 @@ module Inputs
|
|
4
4
|
delegate :collection_select, :to => :@template
|
5
5
|
|
6
6
|
def default_input_js_options
|
7
|
-
{:minimumResultsForSearch => 6, :tokenSeparators => [',', ' '], :width => 'style'}
|
7
|
+
{:theme => 'bootstrap', :minimumResultsForSearch => 6, :tokenSeparators => [',', ' '], :width => 'style'}
|
8
8
|
end
|
9
9
|
|
10
10
|
def default_input_classes
|
@@ -3,4 +3,5 @@
|
|
3
3
|
= form_for Effective::StyleGuide.new(:category => 'Category 2'), :url => '/' do |f|
|
4
4
|
= f.effective_date_time_picker :updated_at
|
5
5
|
= f.effective_date_picker :updated_at
|
6
|
+
= f.select :category, 10.times.map { |x| "Category #{x}"}, :include_blank => false, :placeholder => 'Pleze chooze', :multiple => true
|
6
7
|
= f.effective_select :category, 10.times.map { |x| "Category #{x}"}, :include_blank => false, :placeholder => 'Pleze chooze', :multiple => true
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_form_inputs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|