New option to set up minimum limit to show cards count for each list in board

This commit is contained in:
Mario Orlicky 2016-11-25 21:45:11 +01:00
parent 1ad4107201
commit 606dbbbbf2
7 changed files with 53 additions and 0 deletions

View file

@ -72,3 +72,8 @@ template(name="changeSettingsPopup")
| {{_ 'hide-system-messages'}}
if hiddenSystemMessages
i.fa.fa-check
li
label.bold
| {{_ 'show-cards-minimum-count'}}
input#show-cards-count-at.inline-input.left(type="number" value="#{showCardsCountAt}" min="1" max="99" onkeydown="return false")
input.js-apply-show-cards-at.left(type="submit" value="{{_ 'apply'}}")

View file

@ -95,10 +95,21 @@ Template.changeSettingsPopup.helpers({
hiddenSystemMessages() {
return Meteor.user().hasHiddenSystemMessages();
},
showCardsCountAt() {
return Meteor.user().getLimitToShowCardsCount();
},
});
Template.changeSettingsPopup.events({
'click .js-toggle-system-messages'() {
Meteor.call('toggleSystemMessages');
},
'click .js-apply-show-cards-at'(evt, tpl) {
evt.preventDefault();
const minLimit = parseInt(tpl.$('#show-cards-count-at').val());
if (!isNaN(minLimit)) {
Meteor.call('changeLimitToShowCardsCount', minLimit);
Popup.back();
}
},
});