uber_select_rails 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uber_select_rails/version.rb +1 -1
- data/vendor/assets/javascript/uber_select/README.md +3 -0
- data/vendor/assets/javascript/uber_select/javascript/jquery.uber-select.js +1 -0
- data/vendor/assets/javascript/uber_select/javascript/uber_search.js +1 -0
- data/vendor/assets/javascript/uber_select/test.html +16 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c4e02c23ba5d8d6ba50707be770694a60f4abc20cbff88c2fbe9baa7ed63619
|
4
|
+
data.tar.gz: fbcbd8c7ab7ff3910e2161fd980e78eb215bda8942f71d64c2332d874817a622
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d8afa5bdfdb0b4a50df1dc5fc9154d32f7d2b9823fb63075ce6f9cd26edf11bc274ac73a2f91a75fac64c58dc023dc3ab8c54aa80a38385493ff411d9a0d648
|
7
|
+
data.tar.gz: b8d8f1986c48ee1b2c502a16932fcc0809a10abaa8a4bc577423d1931361d55a79e3e1b4484c9a145761fa6aba9accb9a286a86c51c69c6f91d87cfcec09b179
|
@@ -97,6 +97,9 @@ Data is an array of objects. Each object may have the following properties:
|
|
97
97
|
- ##### selectedText
|
98
98
|
String shown to the user in the output container when this option is selected. *optional*
|
99
99
|
|
100
|
+
- ##### title
|
101
|
+
Title text shown to the user when hovering over the result. *optional*
|
102
|
+
|
100
103
|
- ##### value
|
101
104
|
This is matched against the *value* option passed UberSearch and will appear selected if it matches. It is also used to match against search input text when the user searches. This value is required if *text* is not provided.
|
102
105
|
|
@@ -81,6 +81,7 @@
|
|
81
81
|
text: option.textContent,
|
82
82
|
selectedText: getAttribute(option, 'data-selected-text'),
|
83
83
|
value: getAttribute(option, 'value'),
|
84
|
+
title: getAttribute(option, 'title'),
|
84
85
|
disabled: getAttribute(option, 'disabled'),
|
85
86
|
matchValue: getAttribute(option, 'data-match-value'),
|
86
87
|
visibility: getAttribute(option, 'data-visibility'),
|
@@ -243,6 +243,7 @@ var UberSearch = function(data, options){
|
|
243
243
|
.html((options.treatBlankOptionAsPlaceholder ? datum.text || options.placeholder : datum.text) || " ")
|
244
244
|
.data(datum) // Store the datum so we can get know what the value of the selected item is
|
245
245
|
|
246
|
+
if (datum.title) { result.attr('title', datum.title) }
|
246
247
|
if (datum.disabled) { result.addClass('disabled') }
|
247
248
|
|
248
249
|
options.resultPostprocessor(result, datum)
|
@@ -215,6 +215,22 @@
|
|
215
215
|
<p>This example has an option with <code>data-selected-text</code> that should show custom text in the output container when selected.</p>
|
216
216
|
</span>
|
217
217
|
|
218
|
+
<span class="example">
|
219
|
+
<label for="select">
|
220
|
+
Title Attribute
|
221
|
+
</label>
|
222
|
+
<select>
|
223
|
+
<option></option>
|
224
|
+
<option>Jimmy Johnson</option>
|
225
|
+
<option title="Cooltip!">Option with Title</option>
|
226
|
+
<option>Cosmo Kramer</option>
|
227
|
+
<option>Bob Zickowski</option>
|
228
|
+
<option>Nicholas Cage</option>
|
229
|
+
<option>Queen Latifah</option>
|
230
|
+
</select>
|
231
|
+
<p>This example has an option with a <code>title</code> attribute that should show as a tooltip.</p>
|
232
|
+
</span>
|
233
|
+
|
218
234
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
219
235
|
<script src="javascript/string_extensions.js"></script>
|
220
236
|
<script src="javascript/search_field.js"></script>
|
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
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicholas Jakobsen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|