effective_form_inputs 0.4.0 → 0.4.1

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: 0b20db9741d49dbba717dccb759e8b9ae7bdf3b9
4
- data.tar.gz: 9bb2c5154ca44a3e38841e3e155062ecc187506a
3
+ metadata.gz: c1e577be5802efc63230b2b66f9f3d52bec1ee06
4
+ data.tar.gz: 3dfe18e3f27b3039a16fbbb638b615ababe9be03
5
5
  SHA512:
6
- metadata.gz: 495e6b9cc1f4730b3c013bf82d9f41fc20eeceef1c0b6ee7aede0ab030886613b7f42b445b8b8eed2924eadfa262a3573c4f5faeff015db8f46c0357f942b981
7
- data.tar.gz: f66163842a292ab829de08dd79c5c428b3e9827f75d5291705602cf16f500e04bd3f05256dedc0e9d5610c34a221365ae4dca830518de12814f471b1a6402fa3
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 :categores, :as => :effective_select, :collection => 10.times.map { |x| "Category #{x}"}, :multiple => true, :tags => true
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 equivelant to `:multiple => false` and is a replacement for the default single select box.
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
- .select2-container {
2
- display: block;
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
@@ -1,3 +1,3 @@
1
1
  module EffectiveFormInputs
2
- VERSION = '0.4.0'.freeze
2
+ VERSION = '0.4.1'.freeze
3
3
  end
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.0
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-05-28 00:00:00.000000000 Z
11
+ date: 2015-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails