mirror of
https://github.com/vale981/Vulcan
synced 2025-03-08 19:11:38 -05:00
Settings.collection -> Settings
This commit is contained in:
parent
6a5eee0dcb
commit
b6e213abc4
6 changed files with 9 additions and 9 deletions
|
@ -497,7 +497,7 @@ var migrationsList = {
|
|||
},
|
||||
changeColorNames: function () {
|
||||
var i = 0;
|
||||
var settings = Settings.collection.findOne();
|
||||
var settings = Settings.findOne();
|
||||
var set = {};
|
||||
|
||||
if (!!settings) {
|
||||
|
@ -515,7 +515,7 @@ var migrationsList = {
|
|||
set.secondaryContrastColor = settings.headerTextColor;
|
||||
|
||||
if (!_.isEmpty(set)) {
|
||||
Settings.collection.update(settings._id, {$set: set}, {validate: false});
|
||||
Settings.update(settings._id, {$set: set}, {validate: false});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
var query = Settings.collection.find();
|
||||
var query = Settings.find();
|
||||
|
||||
query.observeChanges({
|
||||
added: function (id, fields) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template name="settings">
|
||||
{{#if this.hasSettings}}
|
||||
{{> quickForm collection="Settings.collection" id="updateSettingsForm" type="update" doc=this.settings label-class="control-label" input-col-class="controls" template="bootstrap3-horizontal"}}
|
||||
{{> quickForm collection="Settings" id="updateSettingsForm" type="update" doc=this.settings label-class="control-label" input-col-class="controls" template="bootstrap3-horizontal"}}
|
||||
{{else}}
|
||||
{{> quickForm collection="Settings.collection" id="insertSettingsForm" type="insert" template="bootstrap3-horizontal" label-class="control-label" input-col-class="controls"}}
|
||||
{{> quickForm collection="Settings" id="insertSettingsForm" type="insert" template="bootstrap3-horizontal" label-class="control-label" input-col-class="controls"}}
|
||||
{{/if}}
|
||||
</template>
|
||||
|
|
|
@ -8,7 +8,7 @@ Meteor.startup(function () {
|
|||
data: function () {
|
||||
// we only have one set of settings for now
|
||||
|
||||
var settings = Settings.collection.findOne();
|
||||
var settings = Settings.findOne();
|
||||
return {
|
||||
hasSettings: !!settings,
|
||||
settings: settings
|
||||
|
|
|
@ -14,5 +14,5 @@ Meteor.publish('settings', function() {
|
|||
});
|
||||
}
|
||||
|
||||
return Settings.collection.find({}, options);
|
||||
return Settings.find({}, options);
|
||||
});
|
||||
|
|
|
@ -409,7 +409,7 @@ i18n.internationalizeSchema(settingsSchema);
|
|||
Settings.attachSchema(settingsSchema);
|
||||
|
||||
Settings.get = function(setting, defaultValue) {
|
||||
var settings = Settings.collection.find().fetch()[0];
|
||||
var settings = Settings.find().fetch()[0];
|
||||
|
||||
if (Meteor.isServer && Meteor.settings && !!Meteor.settings[setting]) { // if on the server, look in Meteor.settings
|
||||
return Meteor.settings[setting];
|
||||
|
@ -434,7 +434,7 @@ Settings.get = function(setting, defaultValue) {
|
|||
// }
|
||||
|
||||
Meteor.startup(function () {
|
||||
Settings.collection.allow({
|
||||
Settings.allow({
|
||||
insert: Users.isAdminById,
|
||||
update: Users.isAdminById,
|
||||
remove: Users.isAdminById
|
||||
|
|
Loading…
Add table
Reference in a new issue