1
0
mirror of https://github.com/flarum/core.git synced 2025-07-30 21:20:24 +02:00

Make post types/components more flexible

This commit is contained in:
Toby Zerner
2015-02-08 15:56:44 +10:30
parent 59964e3b22
commit 7863f0114c
12 changed files with 203 additions and 108 deletions

View File

@@ -168,11 +168,17 @@ export default Ember.ArrayProxy.extend(Ember.Evented, {
},
makeItem: function(indexStart, indexEnd, post) {
return Ember.Object.create({
var item = Ember.Object.create({
indexStart: indexStart,
indexEnd: indexEnd,
content: post
indexEnd: indexEnd
});
if (post) {
item.setProperties({
content: post,
component: 'discussions/post-'+post.get('type')
});
}
return item;
},
findNearestTo: function(index, property) {