UI Cleanup - Updated Settings subtree.

This commit is contained in:
Taloth Saldono
2015-02-14 00:37:11 +01:00
parent b69ea349ce
commit 019525dd9d
72 changed files with 1458 additions and 1039 deletions
@@ -2,19 +2,24 @@ var Backbone = require('backbone');
var DownloadClientModel = require('./DownloadClientModel');
module.exports = Backbone.Collection.extend({
model : DownloadClientModel,
url : window.NzbDrone.ApiRoot + '/downloadclient',
comparator : function(left, right, collection){
model : DownloadClientModel,
url : window.NzbDrone.ApiRoot + '/downloadclient',
comparator : function(left, right, collection) {
var result = 0;
if(left.get('protocol')) {
if (left.get('protocol')) {
result = -left.get('protocol').localeCompare(right.get('protocol'));
}
if(result === 0 && left.get('name')) {
if (result === 0 && left.get('name')) {
result = left.get('name').localeCompare(right.get('name'));
}
if(result === 0) {
if (result === 0) {
result = left.get('implementation').localeCompare(right.get('implementation'));
}
return result;
}
});