mirror of
https://github.com/wekan/wekan.git
synced 2025-12-26 20:28:48 +01:00
Use only one 'Apply' button for applying the user settings
This commit is contained in:
parent
4550e10fbe
commit
52f884f2b1
2 changed files with 10 additions and 17 deletions
|
|
@ -268,36 +268,31 @@ Template.changeSettingsPopup.events({
|
|||
cookies.set('hasHiddenSystemMessages', 'true');
|
||||
}
|
||||
},
|
||||
'click .js-apply-show-cards-at'(event, templateInstance) {
|
||||
'click .js-apply-user-settings'(event, templateInstance) {
|
||||
event.preventDefault();
|
||||
const minLimit = parseInt(
|
||||
templateInstance.$('#show-cards-count-at').val(),
|
||||
10,
|
||||
);
|
||||
const startDay = parseInt(
|
||||
templateInstance.$('#start-day-of-week').val(),
|
||||
10,
|
||||
);
|
||||
const currentUser = Meteor.user();
|
||||
if (!isNaN(minLimit)) {
|
||||
currentUser = Meteor.user();
|
||||
if (currentUser) {
|
||||
Meteor.call('changeLimitToShowCardsCount', minLimit);
|
||||
} else {
|
||||
cookies.set('limitToShowCardsCount', minLimit);
|
||||
}
|
||||
Popup.back();
|
||||
}
|
||||
},
|
||||
'click .js-apply-start-day-of-week'(event, templateInstance) {
|
||||
event.preventDefault();
|
||||
const startDay = parseInt(
|
||||
templateInstance.$('#start-day-of-week').val(),
|
||||
10,
|
||||
);
|
||||
if (!isNaN(startDay)) {
|
||||
currentUser = Meteor.user();
|
||||
if (currentUser) {
|
||||
Meteor.call('changeStartDayOfWeek', startDay);
|
||||
} else {
|
||||
cookies.set('startDayOfWeek', startDay);
|
||||
}
|
||||
Popup.back();
|
||||
}
|
||||
Popup.back();
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue