uber_select_rails 0.4.6 → 0.5.0

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
  SHA256:
3
- metadata.gz: 7e9476e5e12129ec65c9dd22981e3a0bb5f175b151906197517ae33aa4de4266
4
- data.tar.gz: 0b792f41ef6e47776b0e011b6c4708eca9fa5e98f07d821bf866727708f4fbbe
3
+ metadata.gz: 55d7f2ac671dfba382d9ce1d1bd226fcac0b92d3c7473e720f1c200a398234e3
4
+ data.tar.gz: ff3372fdb170c871823be80159c2c654d2982a8354e76442e16ec9337c250160
5
5
  SHA512:
6
- metadata.gz: ab52406500e12ecfa53a5a44f7c4eb41f67e6b6ccbb28b6f24c54f6390077ce2b76ea0b3be04815ab104008e93aa0acff80121454fdeaeb1b4527bed55891ecf
7
- data.tar.gz: 2e76709d02c09e85b8ab0f1f5e3f05d41bdd3ac70cb099e8fabeb5f118e45edc4a0fcdae3c71ee12fbe4e00a563590872be6d068d0c66330746298cc0d754c2f
6
+ metadata.gz: 95851208aa9e978b3c544b818d27865d1015df4b62ccdc9c83aa35874f7bbd539c23dac85441aa2f9703ff7c741fb9e61d916900a619a5cd4de19ddddbf33485
7
+ data.tar.gz: f4d6512cb2e83c586eb5d462292d47490bf76d3526dcdef559c49a0df5839d2f0748984208bb3581aecafc985e77560cf63c57b8410b55d33cfc1003df02d6c2
@@ -1,3 +1,3 @@
1
1
  module UberSelectRails
2
- VERSION = "0.4.6"
2
+ VERSION = "0.5.0"
3
3
  end
@@ -196,6 +196,9 @@ as a JSON string.
196
196
  Sets the text to show when the results list is empty and no search is in progress
197
197
 
198
198
  Default: `'No options'`
199
+
200
+ - ##### searchInputAttributes
201
+ An Object containing attributes to add to the search input element.
199
202
 
200
203
  - ##### buildResult
201
204
  A function that is used to build result elements.
@@ -1,11 +1,15 @@
1
1
  function SearchField(options){
2
2
  options = $.extend({
3
3
  placeholder: 'Type to Search',
4
+ searchInputAttributes: { 'aria-label': "Type to Search" },
4
5
  clearButton:'✕' // Text content of clear search button
5
6
  }, options)
6
7
 
8
+ var inputAttrs = {}
9
+ $.extend(inputAttrs, { placeholder: options.placeholder }, options.searchInputAttributes)
10
+
7
11
  var context = this
8
- var input = this.input = $('<input type="search" class="search_input">').attr('placeholder', options.placeholder)
12
+ var input = this.input = $('<input type="search" class="search_input">').attr(inputAttrs)
9
13
  var value = input.val()
10
14
  var clearButton = this.clearButton = $('<span class="clear_search_button"></span>').html(options.clearButton)
11
15
  var view = this.view = $('<span class="search_field_container"></span>').append(input).append(clearButton)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uber_select_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Jakobsen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-08 00:00:00.000000000 Z
11
+ date: 2022-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '10.0'
55
- description:
55
+ description:
56
56
  email:
57
57
  - nicholas.jakobsen@gmail.com
58
58
  executables: []
@@ -84,7 +84,7 @@ files:
84
84
  homepage: https://github.com/culturecode/uber_select_rails
85
85
  licenses: []
86
86
  metadata: {}
87
- post_install_message:
87
+ post_install_message:
88
88
  rdoc_options: []
89
89
  require_paths:
90
90
  - lib
@@ -99,8 +99,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  - !ruby/object:Gem::Version
100
100
  version: '0'
101
101
  requirements: []
102
- rubygems_version: 3.0.3
103
- signing_key:
102
+ rubygems_version: 3.0.8
103
+ signing_key:
104
104
  specification_version: 4
105
105
  summary: A Rails gem containing a javascript plugin that adds a layer of UI goodness
106
106
  overtop of basic HTML select elements