|
|
@ -15,6 +15,7 @@ define(
|
|
|
|
'Settings/DownloadClient/Layout',
|
|
|
|
'Settings/DownloadClient/Layout',
|
|
|
|
'Settings/Notifications/CollectionView',
|
|
|
|
'Settings/Notifications/CollectionView',
|
|
|
|
'Settings/Notifications/Collection',
|
|
|
|
'Settings/Notifications/Collection',
|
|
|
|
|
|
|
|
'Settings/Metadata/MetadataLayout',
|
|
|
|
'Settings/General/GeneralView',
|
|
|
|
'Settings/General/GeneralView',
|
|
|
|
'Shared/LoadingView',
|
|
|
|
'Shared/LoadingView',
|
|
|
|
'Config'
|
|
|
|
'Config'
|
|
|
@ -32,6 +33,7 @@ define(
|
|
|
|
DownloadClientLayout,
|
|
|
|
DownloadClientLayout,
|
|
|
|
NotificationCollectionView,
|
|
|
|
NotificationCollectionView,
|
|
|
|
NotificationCollection,
|
|
|
|
NotificationCollection,
|
|
|
|
|
|
|
|
MetadataLayout,
|
|
|
|
GeneralView,
|
|
|
|
GeneralView,
|
|
|
|
LoadingView,
|
|
|
|
LoadingView,
|
|
|
|
Config) {
|
|
|
|
Config) {
|
|
|
@ -44,6 +46,7 @@ define(
|
|
|
|
indexers : '#indexers',
|
|
|
|
indexers : '#indexers',
|
|
|
|
downloadClient : '#download-client',
|
|
|
|
downloadClient : '#download-client',
|
|
|
|
notifications : '#notifications',
|
|
|
|
notifications : '#notifications',
|
|
|
|
|
|
|
|
metadata : '#metadata',
|
|
|
|
general : '#general',
|
|
|
|
general : '#general',
|
|
|
|
loading : '#loading-region'
|
|
|
|
loading : '#loading-region'
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -54,8 +57,9 @@ define(
|
|
|
|
indexersTab : '.x-indexers-tab',
|
|
|
|
indexersTab : '.x-indexers-tab',
|
|
|
|
downloadClientTab : '.x-download-client-tab',
|
|
|
|
downloadClientTab : '.x-download-client-tab',
|
|
|
|
notificationsTab : '.x-notifications-tab',
|
|
|
|
notificationsTab : '.x-notifications-tab',
|
|
|
|
|
|
|
|
metadataTab : '.x-metadata-tab',
|
|
|
|
generalTab : '.x-general-tab',
|
|
|
|
generalTab : '.x-general-tab',
|
|
|
|
advancedSettings : '.x-advanced-settings'
|
|
|
|
advancedSettings : '.x-advanced-settings'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
events: {
|
|
|
|
events: {
|
|
|
@ -64,6 +68,7 @@ define(
|
|
|
|
'click .x-indexers-tab' : '_showIndexers',
|
|
|
|
'click .x-indexers-tab' : '_showIndexers',
|
|
|
|
'click .x-download-client-tab' : '_showDownloadClient',
|
|
|
|
'click .x-download-client-tab' : '_showDownloadClient',
|
|
|
|
'click .x-notifications-tab' : '_showNotifications',
|
|
|
|
'click .x-notifications-tab' : '_showNotifications',
|
|
|
|
|
|
|
|
'click .x-metadata-tab' : '_showMetadata',
|
|
|
|
'click .x-general-tab' : '_showGeneral',
|
|
|
|
'click .x-general-tab' : '_showGeneral',
|
|
|
|
'click .x-save-settings' : '_save',
|
|
|
|
'click .x-save-settings' : '_save',
|
|
|
|
'change .x-advanced-settings' : '_toggleAdvancedSettings'
|
|
|
|
'change .x-advanced-settings' : '_toggleAdvancedSettings'
|
|
|
@ -99,6 +104,7 @@ define(
|
|
|
|
self.indexers.show(new IndexerLayout({ settings: self.settings, indexersCollection: self.indexerSettings }));
|
|
|
|
self.indexers.show(new IndexerLayout({ settings: self.settings, indexersCollection: self.indexerSettings }));
|
|
|
|
self.downloadClient.show(new DownloadClientLayout({ model: self.settings }));
|
|
|
|
self.downloadClient.show(new DownloadClientLayout({ model: self.settings }));
|
|
|
|
self.notifications.show(new NotificationCollectionView({ collection: self.notificationSettings }));
|
|
|
|
self.notifications.show(new NotificationCollectionView({ collection: self.notificationSettings }));
|
|
|
|
|
|
|
|
self.metadata.show(new MetadataLayout());
|
|
|
|
self.general.show(new GeneralView({ model: self.generalSettings }));
|
|
|
|
self.general.show(new GeneralView({ model: self.generalSettings }));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -123,6 +129,9 @@ define(
|
|
|
|
case 'notifications':
|
|
|
|
case 'notifications':
|
|
|
|
this._showNotifications();
|
|
|
|
this._showNotifications();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'metadata':
|
|
|
|
|
|
|
|
this._showMetadata();
|
|
|
|
|
|
|
|
break;
|
|
|
|
case 'general':
|
|
|
|
case 'general':
|
|
|
|
this._showGeneral();
|
|
|
|
this._showGeneral();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -176,6 +185,15 @@ define(
|
|
|
|
this._navigate('settings/connect');
|
|
|
|
this._navigate('settings/connect');
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_showMetadata: function (e) {
|
|
|
|
|
|
|
|
if (e) {
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.ui.metadataTab.tab('show');
|
|
|
|
|
|
|
|
this._navigate('settings/metadata');
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
_showGeneral: function (e) {
|
|
|
|
_showGeneral: function (e) {
|
|
|
|
if (e) {
|
|
|
|
if (e) {
|
|
|
|
e.preventDefault();
|
|
|
|
e.preventDefault();
|
|
|
|