mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
UI dependency graph cleanup
This commit is contained in:
parent
86ea33b638
commit
4948d0608b
87 changed files with 1119 additions and 735 deletions
|
@ -1,10 +1,13 @@
|
|||
'use strict';
|
||||
define(['app',
|
||||
'marionette',
|
||||
'Settings/Indexers/ItemView',
|
||||
'Settings/Indexers/EditView',
|
||||
'Settings/Indexers/Collection'],
|
||||
function (App, Marionette, IndexerItemView, IndexerEditView, IndexerCollection) {
|
||||
define(
|
||||
[
|
||||
'AppLayout',
|
||||
'marionette',
|
||||
'Settings/Indexers/ItemView',
|
||||
'Settings/Indexers/EditView',
|
||||
'Settings/Indexers/Collection',
|
||||
'underscore'
|
||||
], function (AppLayout, Marionette, IndexerItemView, IndexerEditView, IndexerCollection, _) {
|
||||
return Marionette.CompositeView.extend({
|
||||
itemView : IndexerItemView,
|
||||
itemViewContainer: '#x-indexers',
|
||||
|
@ -18,7 +21,7 @@ define(['app',
|
|||
'click .x-add-card': '_openSchemaModal'
|
||||
},
|
||||
|
||||
appendHtml: function(collectionView, itemView, index){
|
||||
appendHtml: function (collectionView, itemView, index) {
|
||||
collectionView.ui.addCard.parent('li').before(itemView.el);
|
||||
},
|
||||
|
||||
|
@ -33,13 +36,13 @@ define(['app',
|
|||
var model = _.first(collection.models);
|
||||
|
||||
model.set({
|
||||
id: undefined,
|
||||
name: '',
|
||||
id : undefined,
|
||||
name : '',
|
||||
enable: true
|
||||
});
|
||||
|
||||
var view = new IndexerEditView({ model: model, indexerCollection: self.collection});
|
||||
App.modalRegion.show(view);
|
||||
AppLayout.modalRegion.show(view);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue