Vulcan/client/views/posts/post_item.js

31 lines
792 B
JavaScript
Raw Normal View History

2014-07-04 14:07:50 +09:00
var post = {};
2014-07-05 11:24:28 +09:00
Template[getTemplate('post_item')].created = function () {
2014-07-04 14:07:50 +09:00
post = this.data;
2013-10-28 13:35:20 +09:00
};
2014-07-05 11:24:28 +09:00
Template[getTemplate('post_item')].helpers({
2014-12-13 17:43:52 +09:00
postModules: function () {
return postModules;
},
getTemplate: function () {
return getTemplate(this.template);
},
2014-07-08 09:06:49 +09:00
moduleContext: function () { // not used for now
var module = this;
module.templateClass = camelToDash(this.template) + ' ' + this.position + ' cell';
module.post = post;
return module;
2014-07-07 11:51:59 +09:00
},
2014-07-07 12:22:42 +09:00
moduleClass: function () {
2014-12-13 17:43:52 +09:00
return camelToDash(this.template) + ' post-module';
},
postClass: function () {
var post = this;
var postClass = postClassCallbacks.reduce(function(result, currentFunction) {
return currentFunction(post, result);
}, "");
return postClass;
}
2012-10-01 14:52:32 +09:00
});