mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Advanced settings!
SSL and branch
This commit is contained in:
parent
283cd36db8
commit
dc2af41e16
7 changed files with 237 additions and 101 deletions
|
@ -5,38 +5,56 @@ define(
|
|||
'Mixins/AsModelBoundView'
|
||||
], function (Marionette, AsModelBoundView) {
|
||||
var view = Marionette.ItemView.extend({
|
||||
template: 'Settings/General/GeneralTemplate',
|
||||
template: 'Settings/General/GeneralTemplate',
|
||||
|
||||
events: {
|
||||
'change .x-auth': '_setAuthOptionsVisibility'
|
||||
},
|
||||
events: {
|
||||
'change .x-auth': '_setAuthOptionsVisibility',
|
||||
'change .x-ssl': '_setSslOptionsVisibility'
|
||||
},
|
||||
|
||||
ui: {
|
||||
authToggle : '.x-auth',
|
||||
authOptions: '.x-auth-options'
|
||||
},
|
||||
ui: {
|
||||
authToggle : '.x-auth',
|
||||
authOptions: '.x-auth-options',
|
||||
sslToggle : '.x-ssl',
|
||||
sslOptions: '.x-ssl-options'
|
||||
},
|
||||
|
||||
|
||||
onRender: function(){
|
||||
if(!this.ui.authToggle.prop('checked')){
|
||||
this.ui.authOptions.hide();
|
||||
}
|
||||
},
|
||||
|
||||
_setAuthOptionsVisibility: function () {
|
||||
|
||||
var showAuthOptions = this.ui.authToggle.prop('checked');
|
||||
|
||||
if (showAuthOptions) {
|
||||
this.ui.authOptions.slideDown();
|
||||
}
|
||||
|
||||
else {
|
||||
this.ui.authOptions.slideUp();
|
||||
}
|
||||
onRender: function(){
|
||||
if(!this.ui.authToggle.prop('checked')){
|
||||
this.ui.authOptions.hide();
|
||||
}
|
||||
|
||||
});
|
||||
if(!this.ui.sslToggle.prop('checked')){
|
||||
this.ui.sslOptions.hide();
|
||||
}
|
||||
},
|
||||
|
||||
_setAuthOptionsVisibility: function () {
|
||||
|
||||
var showAuthOptions = this.ui.authToggle.prop('checked');
|
||||
|
||||
if (showAuthOptions) {
|
||||
this.ui.authOptions.slideDown();
|
||||
}
|
||||
|
||||
else {
|
||||
this.ui.authOptions.slideUp();
|
||||
}
|
||||
},
|
||||
|
||||
_setSslOptionsVisibility: function () {
|
||||
|
||||
var showSslOptions = this.ui.sslToggle.prop('checked');
|
||||
|
||||
if (showSslOptions) {
|
||||
this.ui.sslOptions.slideDown();
|
||||
}
|
||||
|
||||
else {
|
||||
this.ui.sslOptions.slideUp();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return AsModelBoundView.call(view);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue