X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/1a949f7c97dc2f34c135f5cdf088df2927d3d652..30beae7541b44060bdd42b55fe525a1113452b55:/forum/skins/default/templates/question_edit.html?ds=sidebyside 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]; } });