rjs -> webpack

This commit is contained in:
Keivan Beigi
2015-02-02 17:18:45 -08:00
parent 344f3d66ef
commit 428a1439e5
399 changed files with 11591 additions and 16139 deletions
@@ -1,31 +1,20 @@
'use strict';
var Backbone = require('backbone');
var DownloadClientModel = require('./DownloadClientModel');
define([
'backbone',
'Settings/DownloadClient/DownloadClientModel'
], function (Backbone, DownloadClientModel) {
return Backbone.Collection.extend({
model: DownloadClientModel,
url : window.NzbDrone.ApiRoot + '/downloadclient',
comparator : function(left, right, collection) {
var result = 0;
if (left.get('protocol')) {
result = -left.get('protocol').localeCompare(right.get('protocol'));
}
if (result === 0 && left.get('name')) {
result = left.get('name').localeCompare(right.get('name'));
}
if (result === 0) {
result = left.get('implementation').localeCompare(right.get('implementation'));
}
return result;
module.exports = Backbone.Collection.extend({
model : DownloadClientModel,
url : window.NzbDrone.ApiRoot + '/downloadclient',
comparator : function(left, right, collection){
var result = 0;
if(left.get('protocol')) {
result = -left.get('protocol').localeCompare(right.get('protocol'));
}
});
});
if(result === 0 && left.get('name')) {
result = left.get('name').localeCompare(right.get('name'));
}
if(result === 0) {
result = left.get('implementation').localeCompare(right.get('implementation'));
}
return result;
}
});