mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
15 lines
428 B
JavaScript
15 lines
428 B
JavaScript
![]() |
Messages = {
|
||
|
// Local (client-only) collection
|
||
|
collection: new Meteor.Collection(null),
|
||
|
|
||
|
flash: function(message, type) {
|
||
|
type = (typeof type === 'undefined') ? 'error': type;
|
||
|
// Store errors in the local collection
|
||
|
this.collection.insert({message:message, type:type, seen: false, show:true});
|
||
|
},
|
||
|
|
||
|
clearSeen: function() {
|
||
|
this.collection.update({seen:true}, {$set: {show:false}}, {multi:true});
|
||
|
}
|
||
|
};
|