mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-13 13:05:37 +00:00
Fix #2103 : WebUI: Sorting by name is case-sensitive
This commit is contained in:
parent
0676d7e2dc
commit
84bc2e78bc
@ -265,7 +265,7 @@
|
|||||||
idProperty: 'id',
|
idProperty: 'id',
|
||||||
fields: [
|
fields: [
|
||||||
{name: 'queue', sortType: Deluge.data.SortTypes.asQueuePosition},
|
{name: 'queue', sortType: Deluge.data.SortTypes.asQueuePosition},
|
||||||
{name: 'name'},
|
{name: 'name', sortType: Deluge.data.SortTypes.asName},
|
||||||
{name: 'total_size', type: 'int'},
|
{name: 'total_size', type: 'int'},
|
||||||
{name: 'state'},
|
{name: 'state'},
|
||||||
{name: 'progress', type: 'float'},
|
{name: 'progress', type: 'float'},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*!
|
/*!
|
||||||
* Deluge.data.SortTypes.js
|
* Deluge.data.SortTypes.js
|
||||||
*
|
*
|
||||||
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
|
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -39,7 +39,7 @@ Ext.namespace('Deluge.data');
|
|||||||
*
|
*
|
||||||
* @class Deluge.data.SortTypes
|
* @class Deluge.data.SortTypes
|
||||||
* @singleton
|
* @singleton
|
||||||
*/
|
*/
|
||||||
Deluge.data.SortTypes = {
|
Deluge.data.SortTypes = {
|
||||||
asIPAddress: function(value) {
|
asIPAddress: function(value) {
|
||||||
var d = value.match(/(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\:(\d+)/);
|
var d = value.match(/(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\:(\d+)/);
|
||||||
@ -48,5 +48,9 @@ Deluge.data.SortTypes = {
|
|||||||
|
|
||||||
asQueuePosition: function(value) {
|
asQueuePosition: function(value) {
|
||||||
return (value > -1) ? value : Number.MAX_VALUE;
|
return (value > -1) ? value : Number.MAX_VALUE;
|
||||||
|
},
|
||||||
|
|
||||||
|
asName: function(value) {
|
||||||
|
return String(value).toLowerCase();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*!
|
/*!
|
||||||
* Deluge.data.TorrentRecord.js
|
* Deluge.data.TorrentRecord.js
|
||||||
*
|
*
|
||||||
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
|
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -47,7 +47,8 @@ Deluge.data.Torrent = Ext.data.Record.create([{
|
|||||||
type: 'int'
|
type: 'int'
|
||||||
}, {
|
}, {
|
||||||
name: 'name',
|
name: 'name',
|
||||||
type: 'string'
|
type: 'string',
|
||||||
|
sortType: Deluge.data.SortTypes.asName
|
||||||
}, {
|
}, {
|
||||||
name: 'total_size',
|
name: 'total_size',
|
||||||
type: 'int'
|
type: 'int'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user