[WebUI] Case-insensitive sort for plugins list

This commit is contained in:
Calum Lind 2016-05-15 21:46:52 +01:00
parent fa309d0d18
commit 6c233da2ff
1 changed files with 5 additions and 2 deletions

View File

@ -51,7 +51,7 @@ Deluge.preferences.Plugins = Ext.extend(Ext.Panel, {
store: new Ext.data.ArrayStore({
fields: [
{name: 'enabled', mapping: 0},
{name: 'plugin', mapping: 1}
{name: 'plugin', mapping: 1, sortType: 'asUCString'},
]
}),
columns: [{
@ -147,7 +147,10 @@ Deluge.preferences.Plugins = Ext.extend(Ext.Panel, {
updatePlugins: function() {
var onGotAvailablePlugins = function(plugins) {
this.availablePlugins = plugins;
this.availablePlugins = plugins.sort(function (a, b) {
return a.toLowerCase().localeCompare(b.toLowerCase());
});
deluge.client.core.get_enabled_plugins({
success: onGotEnabledPlugins,
scope: this