mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-24 22:55:21 -04:00
37 lines
1017 B
JavaScript
37 lines
1017 B
JavaScript
'use strict';
|
|
|
|
define([
|
|
'AppLayout',
|
|
'marionette',
|
|
'Settings/DownloadClient/Edit/DownloadClientEditView'
|
|
], function (AppLayout, Marionette, EditView) {
|
|
|
|
return Marionette.ItemView.extend({
|
|
template: 'Settings/DownloadClient/Add/DownloadClientAddItemViewTemplate',
|
|
tagName : 'li',
|
|
|
|
events: {
|
|
'click': '_add'
|
|
},
|
|
|
|
initialize: function (options) {
|
|
this.downloadClientCollection = options.downloadClientCollection;
|
|
},
|
|
|
|
_add: function (e) {
|
|
if (this.$(e.target).hasClass('icon-info-sign')) {
|
|
return;
|
|
}
|
|
|
|
this.model.set({
|
|
id : undefined,
|
|
name : this.model.get('implementationName'),
|
|
enable : true
|
|
});
|
|
|
|
var editView = new EditView({ model: this.model, downloadClientCollection: this.downloadClientCollection });
|
|
AppLayout.modalRegion.show(editView);
|
|
}
|
|
});
|
|
});
|