2013-10-23 08:14:06 +08:00
|
|
|
// TODO: figure out why things don't work when you set a field to default to "true"
|
2012-11-20 16:00:27 +01:00
|
|
|
|
2013-04-05 12:00:56 +09:00
|
|
|
Setting = FormModel.extend({
|
2012-12-16 14:56:31 +01:00
|
|
|
|
|
|
|
blankSchema: {
|
|
|
|
requireViewInvite: false,
|
|
|
|
requirePostInvite: false,
|
|
|
|
requirePostsApproval: false,
|
2013-10-23 10:21:08 +08:00
|
|
|
emailNotifications: false,
|
|
|
|
nestedComments: false,
|
2013-11-08 10:12:00 +09:00
|
|
|
redistributeKarma: false,
|
2013-10-23 10:21:08 +08:00
|
|
|
defaultEmail: '',
|
2012-12-16 14:56:31 +01:00
|
|
|
scoreUpdateInterval: '',
|
2012-12-20 21:17:07 +01:00
|
|
|
postInterval: '',
|
|
|
|
commentInterval: '',
|
2012-12-22 11:06:28 +01:00
|
|
|
maxPostsPerDay: '',
|
2013-10-23 19:43:42 +09:00
|
|
|
startInvitesCount: 3,
|
2013-10-24 20:30:05 +09:00
|
|
|
postsPerPage: 10,
|
2012-12-16 14:56:31 +01:00
|
|
|
title: '',
|
2013-02-22 19:21:35 +09:00
|
|
|
tagline: '',
|
2012-12-16 14:56:31 +01:00
|
|
|
logoUrl: '',
|
|
|
|
logoHeight: '',
|
|
|
|
logoWidth: '',
|
2013-11-03 13:54:42 +01:00
|
|
|
language: 'en',
|
2013-02-14 10:17:26 +09:00
|
|
|
backgroundColor: '',
|
|
|
|
secondaryColor: '',
|
|
|
|
buttonColor: '',
|
|
|
|
headerColor: '',
|
2013-02-28 09:19:08 +09:00
|
|
|
googleAnalyticsId: '',
|
2012-12-16 14:56:31 +01:00
|
|
|
mixpanelId: '',
|
|
|
|
clickyId:'',
|
|
|
|
goSquaredId: '',
|
2013-03-06 10:56:46 +09:00
|
|
|
embedlyId: '',
|
2013-10-09 21:51:50 +09:00
|
|
|
// bitlyToken: '',
|
2013-10-05 11:43:07 +09:00
|
|
|
mailChimpAPIKey: '',
|
|
|
|
mailChimpListId: '',
|
2012-12-16 19:06:21 +01:00
|
|
|
footerCode: '',
|
|
|
|
extraCode: '',
|
|
|
|
notes: ''
|
2012-12-16 14:56:31 +01:00
|
|
|
},
|
2012-11-20 16:00:27 +01:00
|
|
|
|
2012-12-16 14:56:31 +01:00
|
|
|
init: function(options) {
|
2012-12-22 11:06:28 +01:00
|
|
|
this._super(Settings, options);
|
|
|
|
this.overwriteTitle('scoreUpdateInterval', 'Scoring Frequency');
|
2013-10-23 10:21:08 +08:00
|
|
|
this.overwriteTitle('requireViewInvite', 'Require invite to view?');
|
|
|
|
this.overwriteTitle('requirePostInvite', 'Require invite to post?');
|
|
|
|
this.overwriteTitle('emailNotifications', 'Enable email notifications?');
|
2012-12-16 14:56:31 +01:00
|
|
|
this.overwriteTitle('requirePostsApproval', 'Posts must be approved by admin?');
|
|
|
|
this.overwriteTitle('title', 'Site Title');
|
|
|
|
this.overwriteTitle('mixpanelId', '<a href="http://mixpanel.com/">Mixpanel</a> ID');
|
|
|
|
this.overwriteTitle('clickyId', '<a href="http://getclicky.com/">Clicky</a> ID');
|
|
|
|
this.overwriteTitle('goSquaredId', '<a href="http://gosquared.com/">GoSquared</a> ID');
|
2013-10-09 21:51:50 +09:00
|
|
|
// this.overwriteTitle('bitlyToken', '<a href="https://bitly.com/a/oauth_apps">Bitly</a> Token');
|
2013-10-05 11:43:07 +09:00
|
|
|
this.overwriteTitle('mailChimpAPIKey', '<a href="http://mailchimp.com">MailChimp</a> API Key');
|
|
|
|
this.overwriteTitle('mailChimpListId', '<a href="http://mailchimp.com">MailChimp</a> List ID');
|
2012-12-16 14:56:31 +01:00
|
|
|
this.overwriteTitle('logoUrl', 'Logo URL');
|
|
|
|
this.overwriteType('footerCode', 'textarea');
|
2012-12-16 19:06:21 +01:00
|
|
|
this.overwriteType('extraCode', 'textarea');
|
2012-12-16 14:56:31 +01:00
|
|
|
this.overwriteType('notes', 'textarea');
|
|
|
|
}
|
2012-11-20 16:00:27 +01:00
|
|
|
});
|