mirror of
https://github.com/flarum/framework.git
synced 2024-11-23 06:01:56 +08:00
Make welcome-hero close into an action
This commit is contained in:
parent
9de06497a9
commit
04937646fb
|
@ -5,11 +5,10 @@ export default Ember.Component.extend({
|
|||
tagName: 'header',
|
||||
classNames: ['hero', 'welcome-hero'],
|
||||
|
||||
didInsertElement: function() {
|
||||
var hero = this.$();
|
||||
hero.find('.close').click(function() {
|
||||
hero.slideUp();
|
||||
});
|
||||
actions: {
|
||||
close: function() {
|
||||
this.$().slideUp();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
|
@ -1,19 +0,0 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
|
||||
needs: ['index'],
|
||||
|
||||
user: Ember.Object.create({avatarNumber: 1}),
|
||||
|
||||
showing: false,
|
||||
|
||||
title: 'Replying to <em>Some Discussion Title</em>',
|
||||
|
||||
actions: {
|
||||
close: function() {
|
||||
this.set('showing', false);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
|
@ -1,5 +1,5 @@
|
|||
<div class="container">
|
||||
<button class="close btn btn-icon btn-link">{{fa-icon "times"}}</button>
|
||||
<button class="close btn btn-icon btn-link" {{action "close"}}>{{fa-icon "times"}}</button>
|
||||
<div class="container-narrow">
|
||||
<h2>Welcome to Flarum Prototype Forum</h2>
|
||||
<p>Thanks for stopping by! Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Maecenas sed diam eget risus varius blandit sit amet non magna.</p>
|
||||
|
|
Loading…
Reference in New Issue
Block a user