mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 12:16:37 -04:00
Merge branch 'subs-manager' of github.com:arunoda/Telescope into arunoda-subs-manager
Conflicts: lib/router.js
This commit is contained in:
commit
87378ec656
2 changed files with 12 additions and 12 deletions
|
@ -358,11 +358,9 @@ PostsDigestController = FastRender.RouteController.extend({
|
||||||
|
|
||||||
PostPageController = FastRender.RouteController.extend({
|
PostPageController = FastRender.RouteController.extend({
|
||||||
waitOn: function() {
|
waitOn: function() {
|
||||||
return [
|
this.postSubscription = coreSubscriptions.subscribe('singlePost', this.params._id);
|
||||||
coreSubscriptions.subscribe('singlePost', this.params._id),
|
this.commentSubscription = coreSubscriptions.subscribe('postComments', this.params._id);
|
||||||
coreSubscriptions.subscribe('postComments', this.params._id),
|
this.postUsersSubscription = coreSubscriptions.subscribe('postUsers', this.params._id);
|
||||||
coreSubscriptions.subscribe('postUsers', this.params._id)
|
|
||||||
];
|
|
||||||
},
|
},
|
||||||
|
|
||||||
post: function() {
|
post: function() {
|
||||||
|
@ -370,11 +368,14 @@ PostPageController = FastRender.RouteController.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
onBeforeAction: function(pause) {
|
onBeforeAction: function(pause) {
|
||||||
if (this.ready()) {
|
|
||||||
if (! this.post()) {
|
if (! this.post()) {
|
||||||
|
if (this.postSubscription.ready()) {
|
||||||
this.render('not_found');
|
this.render('not_found');
|
||||||
return pause();
|
return pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.render('loading');
|
||||||
|
pause();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -181,4 +181,3 @@ Meteor.publish('notifications', function() {
|
||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue