mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 04:16:37 -04:00
preload pages subscription; get rid of global subscriptions fastRender code since that's done automatically
This commit is contained in:
parent
dda6faecb8
commit
3142da417b
3 changed files with 2 additions and 15 deletions
|
@ -19,18 +19,6 @@ Router.configure({
|
|||
}
|
||||
});
|
||||
|
||||
// adding common subscriptions that's need to be loaded on all the routes
|
||||
// notification does not included here since it is not much critical and
|
||||
// it might have considerable amount of docs
|
||||
if(Meteor.isServer) {
|
||||
FastRender.onAllRoutes(function() {
|
||||
var router = this;
|
||||
_.each(Telescope.subscriptions, function(sub){
|
||||
router.subscribe(sub);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Telescope.controllers = {};
|
||||
|
||||
Telescope.subsManager = new SubsManager({
|
||||
|
|
|
@ -4,8 +4,6 @@ Telescope.menuItems.add("adminMenu", {
|
|||
description: 'manage_static_pages'
|
||||
});
|
||||
|
||||
Telescope.subscriptions.preload('pages');
|
||||
|
||||
var PageController = RouteController.extend({
|
||||
currentPage: function () {
|
||||
return Pages.findOne({slug: this.params.slug});
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
Pages = new Mongo.Collection('pages');
|
||||
|
||||
Telescope.subscriptions.preload('pages');
|
||||
|
||||
Pages.schema = new SimpleSchema({
|
||||
title: {
|
||||
type: String
|
||||
|
@ -20,7 +22,6 @@ Pages.schema = new SimpleSchema({
|
|||
}
|
||||
});
|
||||
|
||||
|
||||
Pages.schema.internationalize();
|
||||
|
||||
Pages.attachSchema(Pages.schema);
|
||||
|
|
Loading…
Add table
Reference in a new issue