]> git.openstreetmap.org Git - osqa.git/commitdiff
one more place that still had the old code for tags
authorrick <rick@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Tue, 27 Apr 2010 22:12:20 +0000 (22:12 +0000)
committerrick <rick@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Tue, 27 Apr 2010 22:12:20 +0000 (22:12 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@81 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/skins/default/templates/question_edit.html

index 2fec6c04ac2b48dfccf756ca5f82b444c73a3066..bcc1d48340185f5e5be47ba0869efcc0795983eb 100644 (file)
@@ -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,
                 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];
                 }
                 
             });