diff --git a/deluge/ui/web/js/deluge-all/TorrentGrid.js b/deluge/ui/web/js/deluge-all/TorrentGrid.js index cb083b05c..7ef8958eb 100644 --- a/deluge/ui/web/js/deluge-all/TorrentGrid.js +++ b/deluge/ui/web/js/deluge-all/TorrentGrid.js @@ -235,7 +235,7 @@ idProperty: 'id', fields: [ {name: 'queue', sortType: Deluge.data.SortTypes.asQueuePosition}, - {name: 'name'}, + {name: 'name', sortType: Deluge.data.SortTypes.asName}, {name: 'total_size', type: 'int'}, {name: 'state'}, {name: 'progress', type: 'float'}, diff --git a/deluge/ui/web/js/deluge-all/data/SortTypes.js b/deluge/ui/web/js/deluge-all/data/SortTypes.js index 2acaf8b4a..95edead5c 100644 --- a/deluge/ui/web/js/deluge-all/data/SortTypes.js +++ b/deluge/ui/web/js/deluge-all/data/SortTypes.js @@ -1,6 +1,6 @@ /*! * Deluge.data.SortTypes.js - * + * * Copyright (c) Damien Churchill 2009-2010 * * This program is free software; you can redistribute it and/or modify @@ -39,7 +39,7 @@ Ext.namespace('Deluge.data'); * * @class Deluge.data.SortTypes * @singleton - */ + */ Deluge.data.SortTypes = { asIPAddress: function(value) { 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) { return (value > -1) ? value : Number.MAX_VALUE; + }, + + asName: function(value) { + return String(value).toLowerCase(); } } diff --git a/deluge/ui/web/js/deluge-all/data/TorrentRecord.js b/deluge/ui/web/js/deluge-all/data/TorrentRecord.js index 2b89f3d7a..e372e0124 100644 --- a/deluge/ui/web/js/deluge-all/data/TorrentRecord.js +++ b/deluge/ui/web/js/deluge-all/data/TorrentRecord.js @@ -47,7 +47,8 @@ Deluge.data.Torrent = Ext.data.Record.create([{ type: 'int' }, { name: 'name', - type: 'string' + type: 'string', + sortType: Deluge.data.SortTypes.asName }, { name: 'total_size', type: 'int'