Vulcan/packages/telescope-core/lib/client/main.js

32 lines
746 B
JavaScript
Raw Normal View History

// Session variables
2015-09-17 14:51:14 +09:00
Session.set('appIsReady', false);
2014-07-15 07:45:37 +09:00
Meteor.startup(function () {
$('#rss-link').attr('title', i18n.t('new_posts'));
2014-11-29 11:14:44 +09:00
});
// AutoForm.debug();
2015-09-17 14:51:14 +09:00
// Global Subscriptions
2015-09-17 14:51:14 +09:00
Telescope.subscriptions.preload('settings');
Telescope.subscriptions.preload('currentUser');
2015-09-17 14:51:14 +09:00
FlowRouter.subscriptions = function() {
var flow = this;
Telescope.subscriptions.forEach(function (sub) {
if (typeof sub === 'object'){
flow.register(sub.subName, Meteor.subscribe(sub.subName, sub.subArguments));
}else{
flow.register(sub, Meteor.subscribe(sub));
}
});
};
2015-04-11 17:03:07 +09:00
// Template extension stuff for backwards compatibility
_.each(templates, function (replacement, original) {
Template[replacement].replaces(original);
});