1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-25 09:18:34 +00:00
Sonarr/UI/Mixins/AutoComplete.js
kay.one 769331d45d updated jshint to 2.1.3
single quotes
2013-06-21 23:24:24 -07:00

23 lines
611 B
JavaScript

'use strict';
define(['app'], function () {
$.fn.autoComplete = function (resource) {
$(this).typeahead({
source : function (filter, callback) {
$.ajax({
url : NzbDrone.Constants.ApiRoot + resource,
dataType: 'json',
type : 'GET',
data : { query: filter },
success : function (data) {
callback(data);
}
});
},
minLength: 3,
items :20
});
};
});