Vulcan/client/main.js

40 lines
901 B
JavaScript
Raw Normal View History

// Session variables
2012-12-11 10:47:11 +09:00
Session.set('initialLoad', true);
2013-10-12 12:24:41 +09:00
Session.set('today', new Date());
2013-10-12 13:01:16 +09:00
Session.set('view', 'top');
2013-11-16 17:44:33 +09:00
Session.set('postsLimit', getSetting('postsPerPage', 10));
Session.set('sessionId', Meteor.default_connection._lastSessionId);
2012-12-11 10:47:11 +09:00
2014-02-18 14:46:53 +09:00
STATUS_PENDING=1;
STATUS_APPROVED=2;
STATUS_REJECTED=3;
adminNav = adminNav.concat([
{
route: 'posts_pending',
label: 'Pending'
},
{
route: 'all-users',
label: 'Users'
},
{
route: 'settings',
label: 'Settings'
},
{
route: 'toolbox',
label: 'Toolbox'
}
]);
2014-07-06 14:09:55 +09:00
// Sort postModules array position using modulePositions as index
postModules = _.sortBy(postModules, function(module){return _.indexOf(modulePositions, module.position)});
postHeading = _.sortBy(postHeading, 'order');
2014-07-15 07:45:37 +09:00
postMeta = _.sortBy(postMeta, 'order');
Meteor.startup(function () {
$('#rss-link').attr('title', i18n.t('New Posts'));
});