Allow child tags in tile to wrap. fixes flarum/core#613

This commit is contained in:
Toby Zerner 2016-03-01 16:45:26 +10:30
parent d240d4c0ff
commit 287bdf10dd
3 changed files with 7 additions and 6 deletions

View File

@ -1017,7 +1017,7 @@ System.register('flarum/tags/components/TagsPage', ['flarum/Component', 'flarum/
'div',
{ className: 'TagTile-children' },
children.map(function (child) {
return m(
return [m(
'a',
{ href: app.route.tag(child), config: function (element, isInitialized) {
if (isInitialized) return;
@ -1027,7 +1027,7 @@ System.register('flarum/tags/components/TagsPage', ['flarum/Component', 'flarum/
m.route.apply(this, arguments);
} },
child.name()
);
), ' '];
})
) : ''
),

View File

@ -44,15 +44,16 @@ export default class TagsPage extends Component {
{children
? (
<div className="TagTile-children">
{children.map(child =>
{children.map(child => [
<a href={app.route.tag(child)} config={function(element, isInitialized) {
if (isInitialized) return;
$(element).on('click', e => e.stopPropagation());
m.route.apply(this, arguments);
}}>
{child.name()}
</a>
)}
</a>,
' '
])}
</div>
) : ''}
</a>

View File

@ -105,7 +105,7 @@
font-size: 12px;
a {
margin-right: 15px;
margin-right: 10px;
}
}
.TagTile-lastDiscussion {