mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 01:12:08 +01:00 
			
		
		
		
	Order note research results: match first aliases then normalized names
This commit is contained in:
		@@ -79,7 +79,7 @@ function refreshBalance () {
 | 
			
		||||
 * @param fun For each found note with the matched alias `alias`, fun(note, alias) is called.
 | 
			
		||||
 */
 | 
			
		||||
function getMatchedNotes (pattern, fun) {
 | 
			
		||||
    $.getJSON("/api/note/alias/?format=json&alias=" + pattern + "&search=user|club&ordering=normalized_name", fun);
 | 
			
		||||
    $.getJSON("/api/note/alias/?format=json&alias=" + pattern + "&search=user|club", fun);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -261,9 +261,7 @@ function autoCompleteNote (field_id, note_list_id, notes, notes_display, alias_p
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        $.getJSON("/api/note/consumer/?format=json&alias="
 | 
			
		||||
            + pattern
 | 
			
		||||
            + "&search=user|club&ordering=normalized_name",
 | 
			
		||||
        $.getJSON("/api/note/consumer/?format=json&alias=" + pattern + "&search=user|club",
 | 
			
		||||
            function (consumers) {
 | 
			
		||||
                // The response arrived too late, we stop the request
 | 
			
		||||
                if (pattern !== $("#" + field_id).val())
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user