X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/1a949f7c97dc2f34c135f5cdf088df2927d3d652..c020cb3ffd56949b581cd812d5ce445d4daf6e44:/forum/skins/default/templates/question_edit.html?ds=inline diff --git a/forum/skins/default/templates/question_edit.html b/forum/skins/default/templates/question_edit.html index 2fec6c0..bcc1d48 100644 --- a/forum/skins/default/templates/question_edit.html +++ b/forum/skins/default/templates/question_edit.html @@ -26,8 +26,7 @@ }); //Tags autocomplete action - var tags = {{ tags|safe }}; - $("#id_tags").autocomplete(tags, { + $("#id_tags").autocomplete("/matching_tags", { matchContains: true, max: 20, multiple: true, @@ -35,11 +34,18 @@ highlightItem: true, scroll: true, scrollHeight: 300, - 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]; } });