mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
UI fixes
Fixed: Series search won't break when term contains brackets Fixed: Attempting to apply the activity spinner incorrectly
This commit is contained in:
parent
4bcab7ae9a
commit
3411c4e5a7
@ -34,11 +34,8 @@ define(
|
|||||||
|
|
||||||
var substringMatcher = function() {
|
var substringMatcher = function() {
|
||||||
return function findMatches(q, cb) {
|
return function findMatches(q, cb) {
|
||||||
// regex used to determine if a string contains the substring `q`
|
|
||||||
var substrRegex = new RegExp(q, 'i');
|
|
||||||
|
|
||||||
var matches = _.select(SeriesCollection.toJSON(), function (series) {
|
var matches = _.select(SeriesCollection.toJSON(), function (series) {
|
||||||
return substrRegex.test(series.title);
|
return series.title.toLowerCase().indexOf(q.toLowerCase()) > -1;
|
||||||
});
|
});
|
||||||
|
|
||||||
cb(matches);
|
cb(matches);
|
||||||
|
@ -21,6 +21,10 @@ define(
|
|||||||
|
|
||||||
var icon = this.find('i').andSelf('i');
|
var icon = this.find('i').andSelf('i');
|
||||||
|
|
||||||
|
if (!icon || !icon.attr('class')) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
var iconClasses = icon.attr('class').match(/(?:^|\s)icon\-.+?(?:$|\s)/);
|
var iconClasses = icon.attr('class').match(/(?:^|\s)icon\-.+?(?:$|\s)/);
|
||||||
|
|
||||||
if (iconClasses.length === 0) {
|
if (iconClasses.length === 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user