mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
28 lines
499 B
JavaScript
28 lines
499 B
JavaScript
![]() |
Template.notificationItem.helpers({
|
||
|
properties: function(){
|
||
|
return this.data;
|
||
|
},
|
||
|
notificationHTML: function(){
|
||
|
return this.message();
|
||
|
}
|
||
|
});
|
||
|
|
||
|
Template.notificationItem.events({
|
||
|
'click .action-link': function(event, instance){
|
||
|
var notificationId=instance.data._id;
|
||
|
Herald.collection.update(
|
||
|
{_id: notificationId},
|
||
|
{
|
||
|
$set:{
|
||
|
read: true
|
||
|
}
|
||
|
},
|
||
|
function(error, result){
|
||
|
if(error){
|
||
|
console.log(error);
|
||
|
}
|
||
|
}
|
||
|
);
|
||
|
}
|
||
|
});
|