Index: trunk/extensions/SemanticForms/libs/SemanticForms.js |
— | — | @@ -123,16 +123,7 @@ |
124 | 124 | // Remote autocompletion |
125 | 125 | var myServer = wgScriptPath + "/api.php"; |
126 | 126 | var data_type = jQuery(this).attr("autocompletedatatype"); |
127 | | - if (data_type == 'relation') |
128 | | - myServer += "?action=sfautocomplete&format=json&relation=" + data_source; |
129 | | - else if (data_type == 'attribute') |
130 | | - myServer += "?action=sfautocomplete&format=json&attribute=" + data_source; |
131 | | - else if (data_type == 'category') |
132 | | - myServer += "?action=sfautocomplete&format=json&category=" + data_source; |
133 | | - else if (data_type == 'namespace') |
134 | | - myServer += "?action=sfautocomplete&format=json&namespace=" + data_source; |
135 | | - else if (data_type == 'external_url') |
136 | | - myServer += "?action=sfautocomplete&format=json&external_url=" + data_source; |
| 127 | + myServer += "?action=sfautocomplete&format=json&" + data_type + "=" + data_source; |
137 | 128 | |
138 | 129 | if (delimiter != null) { |
139 | 130 | function split(val) { |