Index: trunk/extensions/SemanticForms/libs/SemanticForms.js |
— | — | @@ -28,7 +28,6 @@ |
29 | 29 | } |
30 | 30 | } |
31 | 31 | |
32 | | - var myServer = wgScriptPath + "/api.php"; |
33 | 32 | jQuery.noConflict(); |
34 | 33 | |
35 | 34 | /* extending jQuery functions for custom highlighting */ |
— | — | @@ -91,7 +90,9 @@ |
92 | 91 | jQuery(this).autocomplete({ |
93 | 92 | minLength: 0, |
94 | 93 | source: function(request, response) { |
95 | | - |
| 94 | + // We need to re-get the set of values, since |
| 95 | + // the "values" variable gets overwritten. |
| 96 | + values = sfgAutocompleteValues[field_string]; |
96 | 97 | response(jQuery.ui.autocomplete.filter(values, extractLast(request.term))); |
97 | 98 | }, |
98 | 99 | focus: function() { |
— | — | @@ -119,7 +120,8 @@ |
120 | 121 | } |
121 | 122 | } else { |
122 | 123 | // Remote autocompletion |
123 | | - data_type = sfgAutocompleteDataTypes[field_string]; |
| 124 | + var myServer = wgScriptPath + "/api.php"; |
| 125 | + var data_type = jQuery(this).attr("autocompletedatatype"); |
124 | 126 | if (data_type == 'property') |
125 | 127 | myServer += "?action=sfautocomplete&format=json&property=" + data_source; |
126 | 128 | else if (data_type == 'relation') |