mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 00:53:57 -07:00
Massive backgrid update, only one header cell left
This commit is contained in:
parent
874e98b408
commit
7e20e48023
13 changed files with 943 additions and 637 deletions
|
@ -14,7 +14,7 @@ define(
|
|||
throw 'tableName is required';
|
||||
}
|
||||
|
||||
_setState.call(this);
|
||||
_setInitialState.call(this);
|
||||
|
||||
this.on('backgrid:sort', _storeState, this);
|
||||
|
||||
|
@ -23,7 +23,7 @@ define(
|
|||
}
|
||||
};
|
||||
|
||||
var _setState = function () {
|
||||
var _setInitialState = function () {
|
||||
var key = Config.getValue('{0}.sortKey'.format(this.tableName), this.state.sortKey);
|
||||
var direction = Config.getValue('{0}.sortDirection'.format(this.tableName), this.state.order);
|
||||
var order = parseInt(direction, 10);
|
||||
|
@ -32,8 +32,9 @@ define(
|
|||
this.state.order = order;
|
||||
};
|
||||
|
||||
var _storeState = function (sortKey, sortDirection) {
|
||||
var _storeState = function (column, sortDirection) {
|
||||
var order = _convertDirectionToInt(sortDirection);
|
||||
var sortKey = column.get('name');
|
||||
|
||||
Config.setValue('{0}.sortKey'.format(this.tableName), sortKey);
|
||||
Config.setValue('{0}.sortDirection'.format(this.tableName), order);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue