]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/ask.html
fixes osqa-152: interesting and ignored tags work again. also fixed potential perfor...
[osqa.git] / forum / skins / default / templates / ask.html
index e681f4f32291edfc8e4ff05f147c11ea11254ab9..1f7d6c64626435bb534c8419a6631b38c80bd856 100644 (file)
                 $('#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];
                 }
 
             });