mirror of
https://github.com/flarum/core.git
synced 2025-07-25 18:51:40 +02:00
Make welcome-hero close into an action
This commit is contained in:
@@ -5,11 +5,10 @@ export default Ember.Component.extend({
|
|||||||
tagName: 'header',
|
tagName: 'header',
|
||||||
classNames: ['hero', 'welcome-hero'],
|
classNames: ['hero', 'welcome-hero'],
|
||||||
|
|
||||||
didInsertElement: function() {
|
actions: {
|
||||||
var hero = this.$();
|
close: function() {
|
||||||
hero.find('.close').click(function() {
|
this.$().slideUp();
|
||||||
hero.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">
|
<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">
|
<div class="container-narrow">
|
||||||
<h2>Welcome to Flarum Prototype Forum</h2>
|
<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>
|
<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>
|
||||||
|
Reference in New Issue
Block a user