mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-15 01:23:53 -07:00
Using SortValue instead of API hack for history
Fixed jshint for series collection
This commit is contained in:
parent
df055d191f
commit
4d6d477947
4 changed files with 5 additions and 9 deletions
|
@ -39,11 +39,6 @@ namespace NzbDrone.Api.History
|
||||||
pagingSpec.FilterExpression = h => h.EpisodeId == i;
|
pagingSpec.FilterExpression = h => h.EpisodeId == i;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pagingSpec.SortKey.Equals("series", StringComparison.InvariantCultureIgnoreCase))
|
|
||||||
{
|
|
||||||
pagingSpec.SortKey = "series.title";
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApplyToPage(_historyService.Paged, pagingSpec);
|
return ApplyToPage(_historyService.Paged, pagingSpec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,8 @@ define(
|
||||||
{
|
{
|
||||||
name : 'series',
|
name : 'series',
|
||||||
label: 'Series',
|
label: 'Series',
|
||||||
cell : SeriesTitleCell
|
cell : SeriesTitleCell,
|
||||||
|
sortValue: 'series.title'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name : 'episode',
|
name : 'episode',
|
||||||
|
|
|
@ -40,7 +40,7 @@ define(
|
||||||
|
|
||||||
var _storeState = function (column, sortDirection) {
|
var _storeState = function (column, sortDirection) {
|
||||||
var order = _convertDirectionToInt(sortDirection);
|
var order = _convertDirectionToInt(sortDirection);
|
||||||
var sortKey = column.get('name');
|
var sortKey = column.has('sortValue') ? column.get('sortValue') : column.get('name');
|
||||||
|
|
||||||
Config.setValue('{0}.sortKey'.format(this.tableName), sortKey);
|
Config.setValue('{0}.sortKey'.format(this.tableName), sortKey);
|
||||||
Config.setValue('{0}.sortDirection'.format(this.tableName), order);
|
Config.setValue('{0}.sortDirection'.format(this.tableName), order);
|
||||||
|
|
|
@ -47,7 +47,7 @@ define(
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var mixedIn = AsPersistedStateCollection.call(Collection);
|
var MixedIn = AsPersistedStateCollection.call(Collection);
|
||||||
var collection = new mixedIn(SeriesData);
|
var collection = new MixedIn(SeriesData);
|
||||||
return collection;
|
return collection;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue