adding new helper functions

This commit is contained in:
Sacha Greif 2015-04-06 18:34:48 +09:00
parent 3a3fc48847
commit c937b1a8b5
2 changed files with 23 additions and 0 deletions

View file

@ -6,6 +6,22 @@ addToCommentsSchema = [];
addToSettingsSchema = [];
addToUserSchema = [];
registerPostProperty = function (property) {
addToPostSchema.push(property);
}
registerCommentProperty = function (property) {
addToCommentsSchema.push(property);
}
registerSetting = function (property) {
addToSettingsSchema.push(property);
}
registerUserProperty = function (property) {
addToUserSchema.push(property);
}
SimpleSchema.extendOptions({
editable: Match.Optional(Boolean), // editable: true means the field can be edited by the document's owner
hidden: Match.Optional(Boolean) // hidden: true means the field is never shown in a form no matter what

View file

@ -18,10 +18,17 @@ Package.onUse(function (api) {
'adminMenu',
'viewsMenu',
'userMenu',
'addToPostSchema',
'addToCommentsSchema',
'addToSettingsSchema',
'addToUserSchema',
'registerPostProperty',
'registerCommentProperty',
'registerSetting',
'registerUserProperty',
'preloadSubscriptions',
'primaryNav',
'secondaryNav',