rails3-jquery-autocomplete 0.3.5 → 0.3.6
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.
data/README.markdown
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
Given /^I choose "([^"]*)" in the autocomplete list$/ do |text|
|
2
|
+
page.execute_script %Q{ $('input[data-autocomplete]').trigger("focus") }
|
2
3
|
page.execute_script %Q{ $('input[data-autocomplete]').trigger("keydown") }
|
3
4
|
sleep 1
|
4
5
|
page.execute_script %Q{ $('.ui-menu-item a:contains("#{text}")').trigger("mouseenter").trigger("click"); }
|
@@ -5,17 +5,17 @@
|
|
5
5
|
* with the autocomplete URL as the value
|
6
6
|
*
|
7
7
|
* Example:
|
8
|
-
* <input type="text" autocomplete="/url/to/autocomplete">
|
8
|
+
* <input type="text" data-autocomplete="/url/to/autocomplete">
|
9
9
|
*
|
10
10
|
* Optionally, you can use a jQuery selector to specify a field that can
|
11
11
|
* be updated with the element id whenever you find a matching value
|
12
12
|
*
|
13
13
|
* Example:
|
14
|
-
* <input type="text" autocomplete="/url/to/autocomplete" id_element="#id_field">
|
14
|
+
* <input type="text" data-autocomplete="/url/to/autocomplete" id_element="#id_field">
|
15
15
|
*/
|
16
16
|
|
17
17
|
$(document).ready(function(){
|
18
|
-
$('input[data-autocomplete]').
|
18
|
+
$('input[data-autocomplete]').live('focus', function(i){
|
19
19
|
$(this).autocomplete({
|
20
20
|
source: $(this).attr('data-autocomplete'),
|
21
21
|
select: function(event, ui) {
|
@@ -27,4 +27,4 @@ $(document).ready(function(){
|
|
27
27
|
}
|
28
28
|
});
|
29
29
|
});
|
30
|
-
});
|
30
|
+
});
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails3-jquery-autocomplete
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 6
|
10
|
+
version: 0.3.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Padilla
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-10-12 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|