1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-24 22:35:49 -04:00

WIP UI Update for adding lists.

This commit is contained in:
Leonardo Galli
2017-01-21 22:13:55 +01:00
parent 451f2d30e4
commit dd553b9439
19 changed files with 1221 additions and 1212 deletions
@@ -1,39 +1,39 @@
var _ = require('underscore');
var AppLayout = require('../../../AppLayout');
var Backbone = require('backbone');
var SchemaCollection = require('../IndexerCollection');
var SchemaCollection = require('../NetImportCollection');
var AddCollectionView = require('./IndexerAddCollectionView');
module.exports = {
open : function(collection) {
var schemaCollection = new SchemaCollection();
var originalUrl = schemaCollection.url;
schemaCollection.url = schemaCollection.url + '/schema';
schemaCollection.fetch();
schemaCollection.url = originalUrl;
open : function(collection) {
var schemaCollection = new SchemaCollection();
var originalUrl = schemaCollection.url;
schemaCollection.url = schemaCollection.url + '/schema';
schemaCollection.fetch();
schemaCollection.url = originalUrl;
var groupedSchemaCollection = new Backbone.Collection();
var groupedSchemaCollection = new Backbone.Collection();
schemaCollection.on('sync', function() {
schemaCollection.on('sync', function() {
var groups = schemaCollection.groupBy(function(model, iterator) {
return model.get('protocol');
});
var modelCollection = _.map(groups, function(values, key, list) {
return {
"header" : key,
collection : values
};
});
var groups = schemaCollection.groupBy(function(model, iterator) {
return model.get('protocol');
});
var modelCollection = _.map(groups, function(values, key, list) {
return {
"header" : key,
collection : values
};
});
groupedSchemaCollection.reset(modelCollection);
});
groupedSchemaCollection.reset(modelCollection);
});
var view = new AddCollectionView({
collection : groupedSchemaCollection,
targetCollection : collection
});
var view = new AddCollectionView({
collection : groupedSchemaCollection,
targetCollection : collection
});
AppLayout.modalRegion.show(view);
}
};
AppLayout.modalRegion.show(view);
}
};