Skip to content

Instantly share code, notes, and snippets.

@samuraisam
Created March 1, 2015 03:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samuraisam/010c78d563e33eb67de0 to your computer and use it in GitHub Desktop.
Save samuraisam/010c78d563e33eb67de0 to your computer and use it in GitHub Desktop.
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['modal'],
didInsertElement: function() {
var self = this.$();
Ember.run.later(function() {
self.toggleClass('open');
});
},
actions: {
close: function() {
debugger;
var self = this.$();
self.toggleClass('open');
Ember.run.later(this, function() {
this.send('dismissModal');
}, 300);
}
}
});
{{#modal-window}}
<div class="header">Welcome</div>
<div class="body modal-welcome">
<p>Hammer time is a timer for for your github projects.</p>
<p>
Please log in with GitHub to continue. A popup will open.
You may need to allow the popup and click the button again.
</p>
<button class="gh-login-btn" {{action 'close'}}>Login With Github</button>
</div>
{{/modal-window}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment