Bootstrap 3

New: Updated UI
New: Mobile browser support
Fixed: /favicon.ico will return the favicon now
This commit is contained in:
Mark McDowall
2014-05-04 00:11:43 -07:00
parent 28fa264c69
commit 99f2b07a11
148 changed files with 2691 additions and 2054 deletions

View File

@@ -2,24 +2,40 @@
define(
[
'jquery',
'underscore',
'typeahead'
], function ($) {
], 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);
}
});
hint : true,
highlight : true,
minLength : 3,
items : 20
},
minLength: 3,
items : 20
{
name: resource.replace('/'),
displayKey: '',
source : function (filter, callback) {
$.ajax({
url : window.NzbDrone.ApiRoot + resource,
dataType: 'json',
type : 'GET',
data : { query: filter },
success : function (data) {
var matches = [];
$.each(data, function(i, d) {
if (d.startsWith(filter)) {
matches.push({ value: d });
}
});
callback(matches);
}
});
}
});
};
});