mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Moved source code under src folder - massive change
This commit is contained in:
22
src/UI/Mixins/AutoComplete.js
Normal file
22
src/UI/Mixins/AutoComplete.js
Normal file
@@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
define(function () {
|
||||
|
||||
$.fn.autoComplete = function (resource) {
|
||||
$(this).typeahead({
|
||||
source : function (filter, callback) {
|
||||
$.ajax({
|
||||
url : window.NzbDrone.ApiRoot + resource,
|
||||
dataType: 'json',
|
||||
type : 'GET',
|
||||
data : { query: filter },
|
||||
success : function (data) {
|
||||
callback(data);
|
||||
}
|
||||
});
|
||||
},
|
||||
minLength: 3,
|
||||
items : 20
|
||||
});
|
||||
};
|
||||
});
|
Reference in New Issue
Block a user