mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 12:16:37 -04:00
14 lines
428 B
JavaScript
14 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});
|
|
}
|
|
};
|