mirror of
https://github.com/Readarr/Readarr
synced 2025-12-16 21:34:23 +01:00
New: Download client UI matches other settings Fixed: Prevent drone factory folder from being set to invalid paths/root path for series Fixed: Switching pages in settings will not hide changes Fixed: Test download clients Fixed: Settings are validated before saving
34 lines
1 KiB
JavaScript
34 lines
1 KiB
JavaScript
'use strict';
|
|
|
|
define(
|
|
[
|
|
'AppLayout',
|
|
'marionette',
|
|
'Settings/DownloadClient/Edit/DownloadClientEditView',
|
|
'Settings/DownloadClient/Delete/DownloadClientDeleteView'
|
|
], function (AppLayout, Marionette, EditView, DeleteView) {
|
|
|
|
return Marionette.ItemView.extend({
|
|
template: 'Settings/DownloadClient/DownloadClientItemViewTemplate',
|
|
tagName : 'li',
|
|
|
|
events: {
|
|
'click .x-edit' : '_edit',
|
|
'click .x-delete' : '_delete'
|
|
},
|
|
|
|
initialize: function () {
|
|
this.listenTo(this.model, 'sync', this.render);
|
|
},
|
|
|
|
_edit: function () {
|
|
var view = new EditView({ model: this.model, downloadClientCollection: this.model.collection });
|
|
AppLayout.modalRegion.show(view);
|
|
},
|
|
|
|
_delete: function () {
|
|
var view = new DeleteView({ model: this.model});
|
|
AppLayout.modalRegion.show(view);
|
|
}
|
|
});
|
|
});
|