combo_auto_box 0.0.26 → 0.0.27
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.
@@ -33,6 +33,9 @@ var ComboAutoBox = {
|
|
33
33
|
}
|
34
34
|
} else if ((e.keyCode == 9) && ($('#' + inputId).val() != '') && (options.type == 'simple') && (options.source_not_found)) {
|
35
35
|
$('#' + inputId).autocomplete( "close");
|
36
|
+
if (!options.not_found_accepted) {
|
37
|
+
$('#' + inputId).val('');
|
38
|
+
}
|
36
39
|
selectData($('#' + inputId).val(), $('#' + inputId).val());
|
37
40
|
return true;
|
38
41
|
}
|
@@ -46,6 +49,9 @@ var ComboAutoBox = {
|
|
46
49
|
selectData($('#' + inputId).val(), $('#' + inputId).val());
|
47
50
|
} else if ((options.type == 'simple') && (options.source_not_found)) {
|
48
51
|
$('#' + inputId).autocomplete( "close");
|
52
|
+
if (!options.not_found_accepted) {
|
53
|
+
$('#' + inputId).val('');
|
54
|
+
}
|
49
55
|
selectData($('#' + inputId).val(), $('#' + inputId).val());
|
50
56
|
} else if (options.type == 'multiple') {
|
51
57
|
$('#' + inputId).autocomplete( "close" );
|
@@ -74,6 +80,9 @@ var ComboAutoBox = {
|
|
74
80
|
source: setAutoCompleteSource(inputId),
|
75
81
|
select: function(event, ui) {
|
76
82
|
if ((options.type == 'simple') && (options.source_not_found)) {
|
83
|
+
if (!options.not_found_accepted) {
|
84
|
+
$('#' + inputId).val('');
|
85
|
+
}
|
77
86
|
selectData($('#' + inputId).val(), $('#' + inputId).val());
|
78
87
|
return false;
|
79
88
|
} else if (options.type == 'simple') {
|
@@ -700,6 +709,10 @@ var ComboAutoBox = {
|
|
700
709
|
if (options.not_found_message == null) {
|
701
710
|
options.not_found_message = i18nSourceNotFound(options.lang);
|
702
711
|
}
|
712
|
+
|
713
|
+
if (options.not_found_accepted == null) {
|
714
|
+
options.not_found_accepted = false;
|
715
|
+
}
|
703
716
|
|
704
717
|
validLanguage();
|
705
718
|
validType();
|