rails3-jquery-autocomplete-moc 0.3.1 → 0.3.3
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/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.3
|
@@ -5,7 +5,7 @@
|
|
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
|
@@ -15,8 +15,10 @@
|
|
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
|
+
minLength: 3,
|
21
|
+
delay: 50,
|
20
22
|
source: $(this).attr('data-autocomplete'),
|
21
23
|
select: function(event, ui) {
|
22
24
|
$(this).val(ui.item.value);
|
@@ -27,6 +29,15 @@ $(document).ready(function(){
|
|
27
29
|
if($(this).attr('label_element')) {
|
28
30
|
$($(this).attr('label_element')).val(ui.item.value);
|
29
31
|
}
|
32
|
+
|
33
|
+
if(this.form.elements['auto_submit'].value == "true")
|
34
|
+
{
|
35
|
+
this.form.submit();
|
36
|
+
}
|
37
|
+
else
|
38
|
+
{
|
39
|
+
return false;
|
40
|
+
}
|
30
41
|
return false;
|
31
42
|
}
|
32
43
|
});
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rails3-jquery-autocomplete-moc}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["doug schlenker"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-10-18}
|
13
13
|
s.description = %q{Adapted from dabit's rails3-jquery-autocomplete for Moving Off Campus}
|
14
14
|
s.email = %q{doug@adeviasoftware.com}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails3-jquery-autocomplete-moc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 3
|
10
|
+
version: 0.3.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- doug schlenker
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-10-18 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|