mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
clean up
This commit is contained in:
parent
90b2c8c6e4
commit
11a9637dff
4 changed files with 3 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
|||
// ** Handlebars helpers **
|
||||
|
||||
Handlebars.registerHelper('eachWithRank', function(items, options) {
|
||||
console.log('======= eachWithRank ========')
|
||||
// not used, forces multiple renders
|
||||
// note: cannot use this because it would delete and recreate all nodes
|
||||
items.rewind()
|
||||
var out = '';
|
||||
|
|
|
@ -248,7 +248,6 @@ PostsListController = RouteController.extend({
|
|||
]
|
||||
},
|
||||
data: function () {
|
||||
console.log('// postsList data function')
|
||||
var view = this.path == '/' ? 'top' : this.path.split('/')[1];
|
||||
var limit = this.params.limit || getSetting('postsPerPage', 10);
|
||||
var parameters = getParameters(view, limit, this.params.slug);
|
||||
|
@ -256,7 +255,7 @@ PostsListController = RouteController.extend({
|
|||
Session.set('postsLimit', limit);
|
||||
|
||||
// get posts and decorate them with rank property
|
||||
// note: using handlebars helper instead
|
||||
// note: not actually used; find better way
|
||||
// posts = posts.map(function (post, index) {
|
||||
// post.rank = index;
|
||||
// return post;
|
||||
|
|
|
@ -74,9 +74,6 @@ Template.post_item.helpers({
|
|||
},
|
||||
pointsUnitDisplayText: function(){
|
||||
return this.votes == 1 ? 'point' : 'points';
|
||||
},
|
||||
lastRender: function(){
|
||||
return Session.get('postItemLastRender');
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
Template.posts_list.helpers({
|
||||
posts : function () {
|
||||
// not used, forces multiple re-renders
|
||||
// this.postsList.rewind();
|
||||
// var posts = this.postsList.map(function (post, index, cursor) {
|
||||
// post.rank = index;
|
||||
|
|
Loading…
Add table
Reference in a new issue