]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/media/js/osqa.main.js
fixes osqa-152: interesting and ignored tags work again. also fixed potential perfor...
[osqa.git] / forum / skins / default / media / js / osqa.main.js
index e3726389178511360a33b8ba66cb93f815fb09ec..6264fb42ee6e4a4aca8b63de7bd2a0fa3056ea54 100644 (file)
@@ -400,17 +400,19 @@ function pickedTags(){
         init: function(){\r
             collectPickedTags();\r
             setupHideIgnoredQuestionsControl();\r
-            $("#interestingTagInput, #ignoredTagInput").autocomplete(tags, {\r
+            $("#interestingTagInput, #ignoredTagInput").autocomplete("/matching_tags", {\r
                 minChars: 1,\r
                 matchContains: true,\r
                 max: 20,\r
-                multiple: true,\r
-                multipleSeparator: " ",\r
-                formatItem: function(row, i, max) {\r
-                    return row.n + " ("+ row.c +")";\r
+                /*multiple: false, - the favorite tags and ignore tags don't let you do multiple tags\r
+                multipleSeparator: " "*/\r
+\r
+                formatItem: function(row, i, max, value) {\r
+                    return row[1].split(".")[0] + " (" + row[1].split(".")[1] + ")";\r
                 },\r
-                formatResult: function(row, i, max){\r
-                    return row.n;\r
+\r
+                formatResult: function(row, i, max, value){\r
+                    return row[0];\r
                 }\r
 \r
             });\r
@@ -421,7 +423,7 @@ function pickedTags(){
 }\r
 \r
 $(document).ready( function(){\r
-    if (window.tags != undefined)\r
+    //if (window.tags != undefined)\r
         pickedTags().init();\r
 });\r
 \r