mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Add notification, allow watch boards / lists / cards
This commit is contained in:
parent
9ef8ebaf09
commit
9bbdacc79a
24 changed files with 579 additions and 16 deletions
|
|
@ -8,6 +8,11 @@ BlazeComponent.extendComponent({
|
|||
}
|
||||
},
|
||||
|
||||
isWatching() {
|
||||
const list = this.currentData();
|
||||
return list.findWatcher(Meteor.userId());
|
||||
},
|
||||
|
||||
events() {
|
||||
return [{
|
||||
'click .js-open-list-menu': Popup.open('listAction'),
|
||||
|
|
@ -16,6 +21,12 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
}).register('listHeader');
|
||||
|
||||
Template.listActionPopup.helpers({
|
||||
isWatching() {
|
||||
return this.findWatcher(Meteor.userId());
|
||||
},
|
||||
});
|
||||
|
||||
Template.listActionPopup.events({
|
||||
'click .js-add-card'() {
|
||||
const listDom = document.getElementById(`js-list-${this._id}`);
|
||||
|
|
@ -29,6 +40,13 @@ Template.listActionPopup.events({
|
|||
MultiSelection.add(cardIds);
|
||||
Popup.close();
|
||||
},
|
||||
'click .js-toggle-watch-list'() {
|
||||
const currentList = this;
|
||||
const level = currentList.findWatcher(Meteor.userId()) ? null : 'watching';
|
||||
Meteor.call('watch', 'list', currentList._id, level, (err, ret) => {
|
||||
if (!err && ret) Popup.close();
|
||||
});
|
||||
},
|
||||
'click .js-close-list'(evt) {
|
||||
evt.preventDefault();
|
||||
this.archive();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue