diff --git a/lib/_config/_config.js b/lib/_config/_config.js deleted file mode 100644 index 70374a8c41..0000000000 --- a/lib/_config/_config.js +++ /dev/null @@ -1,31 +0,0 @@ -Config = { - name: 'Apinf', - domain: "apinf.io", // How to get this from settings? - subtitle: function() { - return TAPi18n.__('configSubtitle'); - }, - dateFormat: 'D/M/YYYY', - legal: { - address: 'Jessnerstrasse 18, 12047 Berlin', - name: 'Meteor Factory', - url: 'http://benjaminpeterjones.com' - }, - socialMedia: { - facebook: { - url: 'http://facebook.com/benjaminpeterjones', - icon: 'facebook' - }, - twitter: { - url: 'http://twitter.com/BenPeterJones', - icon: 'twitter' - }, - github: { - url: 'https://github.com/yogiben', - icon: 'github' - }, - info: { - url: 'http://meteorfactory.io', - icon: 'link' - } - } -}; diff --git a/lib/_config/emails.js b/lib/_config/emails.js deleted file mode 100644 index 4203745364..0000000000 --- a/lib/_config/emails.js +++ /dev/null @@ -1,22 +0,0 @@ -var options; - -if (Meteor.isServer) { - options = { - siteName: Config.name - }; - // Configurations for activation email template - Accounts.emailTemplates.siteName = Config.name; - Accounts.emailTemplates.from = Config.name+" "; - - if (Config.socialMedia) { - _.each(Config.socialMedia, function(v, k) { - return options[k] = v.url; - }); - } - if (Config.legal) { - options.companyAddress = Config.legal.address; - options.companyName = Config.legal.name; - options.companyUrl = Config.legal.url; - } - PrettyEmail.options = options; -} diff --git a/lib/utils.js b/lib/utils.js deleted file mode 100644 index ceef8f992f..0000000000 --- a/lib/utils.js +++ /dev/null @@ -1,44 +0,0 @@ -Utils = { - prettyDate: function(date) { - if (date) { - if (Config.dateFormat) { - return moment(date).format(Config.dateFormat); - } else { - return moment(date).format('D/M/YYYY'); - } - } - }, - timeSince: function(date) { - var interval, seconds; - if (date) { - seconds = Math.floor((new Date() - date) / 1000); - interval = Math.floor(seconds / 31536000); - if (interval > 1) { - return interval + "years ago"; - } - interval = Math.floor(seconds / 2592000); - if (interval > 1) { - return interval + " months ago"; - } - interval = Math.floor(seconds / 86400); - if (interval > 1) { - return interval + " days ago"; - } - interval = Math.floor(seconds / 3600); - if (interval > 1) { - return interval + " hours ago"; - } - interval = Math.floor(seconds / 60); - if (interval > 1) { - return interval + " minutes"; - } - return "just now"; - } - }, - isMobile: function() { - return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); - }, - loginRequired: function() { - return Router.go('/sign-in'); - } -}; diff --git a/server/methods/contactForm.js b/server/methods/contactForm.js index 3f27972a8d..a3175eb151 100644 --- a/server/methods/contactForm.js +++ b/server/methods/contactForm.js @@ -12,7 +12,7 @@ Meteor.methods({ // Send the e-mail Email.send({ - to: Settings.findOne().contactForm_toEmail, + to: Settings.findOne().contactForm.toEmail, from: doc.email, subject: "Apinf Contact Form - Message From " + doc.name, text: text