comparison core/misc/autocomplete.js @ 4:a9cd425dd02b

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:11:55 +0000
parents c75dbcec494b
children
comparison
equal deleted inserted replaced
3:307d7a7fd348 4:a9cd425dd02b
71 } 71 }
72 } 72 }
73 response(suggestions); 73 response(suggestions);
74 } 74 }
75 75
76 var term = autocomplete.extractLastTerm(request.term);
77
76 function sourceCallbackHandler(data) { 78 function sourceCallbackHandler(data) {
77 autocomplete.cache[elementId][term] = data; 79 autocomplete.cache[elementId][term] = data;
78 80
79 showSuggestions(data); 81 showSuggestions(data);
80 } 82 }
81
82 var term = autocomplete.extractLastTerm(request.term);
83 83
84 if (autocomplete.cache[elementId].hasOwnProperty(term)) { 84 if (autocomplete.cache[elementId].hasOwnProperty(term)) {
85 showSuggestions(autocomplete.cache[elementId][term]); 85 showSuggestions(autocomplete.cache[elementId][term]);
86 } else { 86 } else {
87 var options = $.extend({ success: sourceCallbackHandler, data: { q: term } }, autocomplete.ajax); 87 var options = $.extend({ success: sourceCallbackHandler, data: { q: term } }, autocomplete.ajax);