Prowlarr/src/UI/Settings/DownloadClient/DownloadClientLayout.js
Mark McDowall 77b83b521e Validation, settings UI cleanup and different settings models, oh my
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
2014-02-16 23:01:36 -08:00

32 lines
No EOL
1.4 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use strict';
define(
[
'marionette',
'Settings/DownloadClient/DownloadClientCollection',
'Settings/DownloadClient/DownloadClientCollectionView',
'Settings/DownloadClient/Options/DownloadClientOptionsView',
'Settings/DownloadClient/FailedDownloadHandling/FailedDownloadHandlingView'
], function (Marionette, DownloadClientCollection, DownloadClientCollectionView, DownloadClientOptionsView, FailedDownloadHandlingView) {
return Marionette.Layout.extend({
template : 'Settings/DownloadClient/DownloadClientLayoutTemplate',
regions: {
downloadClients : '#x-download-clients-region',
downloadClientOptions : '#x-download-client-options-region',
failedDownloadHandling : '#x-failed-download-handling-region'
},
initialize: function () {
this.downloadClientCollection = new DownloadClientCollection();
this.downloadClientCollection.fetch();
},
onShow: function () {
this.downloadClients.show(new DownloadClientCollectionView({ collection: this.downloadClientCollection }));
this.downloadClientOptions.show(new DownloadClientOptionsView({ model: this.model }));
this.failedDownloadHandling.show(new FailedDownloadHandlingView({ model: this.model }));
}
});
});