mirror of
https://github.com/wekan/wekan.git
synced 2026-03-05 05:10:15 +01:00
Spinner now configureable in the Settings
This commit is contained in:
parent
849deae11e
commit
7519abf3fe
6 changed files with 55 additions and 7 deletions
|
|
@ -173,6 +173,9 @@ template(name='layoutSettings')
|
|||
li.layout-form
|
||||
.title {{_ 'default-authentication-method'}}
|
||||
+selectAuthenticationMethod(authenticationMethod=currentSetting.defaultAuthenticationMethod)
|
||||
li.layout-form
|
||||
.title {{_ 'spinner-names'}}
|
||||
+selectSpinnerName(spinnerName=currentSetting.spinnerName)
|
||||
li.layout-form
|
||||
.title {{_ 'custom-product-name'}}
|
||||
.form-group
|
||||
|
|
@ -222,3 +225,11 @@ template(name='selectAuthenticationMethod')
|
|||
option(value="{{value}}" selected) {{_ value}}
|
||||
else
|
||||
option(value="{{value}}") {{_ value}}
|
||||
|
||||
template(name='selectSpinnerName')
|
||||
select#spinnerName
|
||||
each spinner in spinners
|
||||
if isSelected spinner
|
||||
option(value="{{spinner}}" selected) {{spinner}}
|
||||
else
|
||||
option(value="{{spinner}}") {{spinner}}
|
||||
|
|
|
|||
|
|
@ -199,6 +199,8 @@ BlazeComponent.extendComponent({
|
|||
$('input[name=displayAuthenticationMethod]:checked').val() === 'true';
|
||||
const defaultAuthenticationMethod = $('#defaultAuthenticationMethod').val();
|
||||
|
||||
const spinnerName = $('#spinnerName').val();
|
||||
|
||||
try {
|
||||
Settings.update(Settings.findOne()._id, {
|
||||
$set: {
|
||||
|
|
@ -213,6 +215,7 @@ BlazeComponent.extendComponent({
|
|||
displayAuthenticationMethod,
|
||||
defaultAuthenticationMethod,
|
||||
automaticLinkedUrlSchemes,
|
||||
spinnerName,
|
||||
},
|
||||
});
|
||||
} catch (e) {
|
||||
|
|
@ -384,3 +387,12 @@ Template.selectAuthenticationMethod.helpers({
|
|||
return Template.instance().data.authenticationMethod === match;
|
||||
},
|
||||
});
|
||||
|
||||
Template.selectSpinnerName.helpers({
|
||||
spinners() {
|
||||
return ['Bounce', 'Wave']
|
||||
},
|
||||
isSelected(match) {
|
||||
return Template.instance().data.spinnerName === match;
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue