1
0
mirror of https://github.com/flarum/core.git synced 2025-08-01 14:10:37 +02:00

Working on interface components.

This commit is contained in:
Toby Zerner
2015-01-03 12:26:14 +10:30
parent 23424a51c6
commit 9375f605a8
20 changed files with 161 additions and 55 deletions

View File

@@ -1,5 +1,7 @@
import Ember from 'ember';
import MenuItemContainer from '../components/menu-item-container';
export default Ember.Component.extend({
items: null, // NamedContainerView/Menu
layoutName: 'components/dropdown-split',
@@ -20,5 +22,19 @@ export default Ember.Component.extend({
itemCountClass: function() {
return 'item-count-'+this.get('items.length');
}.property('items')
}.property('items'),
containedItems: function() {
var contained = [];
this.get('items').forEach(function(item) {
if (item.tagName != 'li') {
contained.push(MenuItemContainer.extend({
item: item
}));
} else {
contained.push(item);
}
});
return contained;
}.property('items.[]')
});