mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
adding new helper functions
This commit is contained in:
parent
3a3fc48847
commit
c937b1a8b5
2 changed files with 23 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -18,10 +18,17 @@ Package.onUse(function (api) {
|
|||
'adminMenu',
|
||||
'viewsMenu',
|
||||
'userMenu',
|
||||
|
||||
'addToPostSchema',
|
||||
'addToCommentsSchema',
|
||||
'addToSettingsSchema',
|
||||
'addToUserSchema',
|
||||
|
||||
'registerPostProperty',
|
||||
'registerCommentProperty',
|
||||
'registerSetting',
|
||||
'registerUserProperty',
|
||||
|
||||
'preloadSubscriptions',
|
||||
'primaryNav',
|
||||
'secondaryNav',
|
||||
|
|
Loading…
Add table
Reference in a new issue