Minor fixes on consumptions page, research is now faster
This commit is contained in:
parent
a1f8ef721a
commit
8c795c38dc
5 changed files with 14 additions and 9 deletions
|
|
@ -44,11 +44,9 @@ function refreshBalance() {
|
|||
* This function is synchronous.
|
||||
*/
|
||||
function getMatchedNotes(pattern, fun) {
|
||||
getJSONSync("/api/note/alias/?format=json&alias=" + pattern + "&search=user|club", function(aliases) {
|
||||
getJSONSync("/api/note/alias/?format=json&alias=" + pattern + "&search=user|club&ordering=normalized_name", function(aliases) {
|
||||
aliases.results.forEach(function(alias) {
|
||||
getJSONSync("/api/note/note/" + alias.note + "/?format=json", function (note) {
|
||||
fun(note, alias);
|
||||
});
|
||||
fun(alias, alias.note);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue