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
This commit is contained in:
Mark McDowall
2014-02-16 01:56:12 -08:00
parent 606d78f5e1
commit 77b83b521e
57 changed files with 667 additions and 484 deletions
@@ -5,24 +5,17 @@ define(
'marionette',
'Settings/DownloadClient/DownloadClientCollection',
'Settings/DownloadClient/DownloadClientCollectionView',
'Mixins/AsModelBoundView',
'Mixins/AutoComplete',
'bootstrap'
], function (Marionette, DownloadClientCollection, DownloadClientCollectionView, AsModelBoundView) {
'Settings/DownloadClient/Options/DownloadClientOptionsView',
'Settings/DownloadClient/FailedDownloadHandling/FailedDownloadHandlingView'
], function (Marionette, DownloadClientCollection, DownloadClientCollectionView, DownloadClientOptionsView, FailedDownloadHandlingView) {
var view = Marionette.Layout.extend({
return Marionette.Layout.extend({
template : 'Settings/DownloadClient/DownloadClientLayoutTemplate',
regions: {
downloadClients: '#x-download-clients-region'
},
ui: {
droneFactory: '.x-path'
},
events: {
'change .x-download-client': 'downloadClientChanged'
downloadClients : '#x-download-clients-region',
downloadClientOptions : '#x-download-client-options-region',
failedDownloadHandling : '#x-failed-download-handling-region'
},
initialize: function () {
@@ -32,9 +25,8 @@ define(
onShow: function () {
this.downloadClients.show(new DownloadClientCollectionView({ collection: this.downloadClientCollection }));
this.ui.droneFactory.autoComplete('/directories');
this.downloadClientOptions.show(new DownloadClientOptionsView({ model: this.model }));
this.failedDownloadHandling.show(new FailedDownloadHandlingView({ model: this.model }));
}
});
return AsModelBoundView.call(view);
});