X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/1a949f7c97dc2f34c135f5cdf088df2927d3d652..9a37b12ee33ddaca8ec3d9a9f771e0faf8df9739:/forum/skins/default/templates/ask.html diff --git a/forum/skins/default/templates/ask.html b/forum/skins/default/templates/ask.html index e681f4f..a925e9d 100644 --- a/forum/skins/default/templates/ask.html +++ b/forum/skins/default/templates/ask.html @@ -25,23 +25,28 @@ $('#pre-collapse').text(txt); }); - //Tags autocomplete action - var tags = {{ tags|safe }}; - $("#id_tags").autocomplete(tags, { + // Tags autocomplete action + $("#id_tags").autocomplete("/matching_tags", { minChars: 1, matchContains: true, max: 20, multiple: true, multipleSeparator: " ", - formatItem: function(row, i, max) { + /*formatItem: function(row, i, max) { return row.n + " ("+ row.c +")"; }, formatResult: function(row, i, max){ return row.n; + }*/ + formatItem: function(row, i, max, value) { + return row[1].split(".")[0] + " (" + row[1].split(".")[1] + ")"; + }, + + formatResult: function(row, i, max, value){ + return row[0]; } }); - }); {% endblock %} @@ -78,7 +83,7 @@