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
+5 -3
View File
@@ -15,7 +15,7 @@ define(
this.state.filterValue = filter[1];
if (options.reset) {
if (this.mode != 'server') {
if (this.mode !== 'server') {
this.fullCollection.resetFiltered();
} else {
return this.fetch();
@@ -35,10 +35,12 @@ define(
self.shadowCollection = originalMakeFullCollection.call(this, models, options);
var filterModel = function(model) {
if (!self.state.filterKey || !self.state.filterValue)
if (!self.state.filterKey || !self.state.filterValue) {
return true;
else
}
else {
return model.get(self.state.filterKey) === self.state.filterValue;
}
};
self.shadowCollection.filtered = function() {
+29 -13
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);
}
});
}
});
};
});