/wiki_pages: sort autocomplete by post count.

* Add search[order]=post_count param to /wiki_pages.
* Make autocomplete do a prefix match ordered by post count, so that it
  works the same way that tag autocomplete does elsewhere.
This commit is contained in:
evazion
2017-03-30 13:14:57 -05:00
parent 6b462c865e
commit b9693827c3
4 changed files with 11 additions and 5 deletions

View File

@@ -20,8 +20,9 @@
$.ajax({
url: "/wiki_pages.json",
data: {
"search[title]": "*" + req.term + "*",
"search[title]": req.term + "*",
"search[hide_deleted]": "Yes",
"search[order]": "post_count",
"limit": 10
},
method: "get",