Last active
June 27, 2016 21:30
-
-
Save atonse/fbbb1d8febbaba2e055ac9b46684c124 to your computer and use it in GitHub Desktop.
Liquid Tether
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
wrapperClassNames: ['col-lg-12', 'col-md-12', 'col-sm-11', 'col-xs-12'], | |
shouldDisplay: false, | |
actions: { | |
show() { | |
this.set('shouldDisplay', true); | |
}, | |
onClose() { | |
this.toggleProperty('shouldDisplay'); | |
} | |
}, | |
setup: function() { | |
Ember.$('body').on('keyup.modal-dialog', (e) => { | |
if (e.keyCode === 27) { | |
this.sendAction('close'); | |
} | |
}); | |
}.on('didInsertElement'), | |
teardown: function() { | |
Ember.$('body').off('keyup.modal-dialog'); | |
}.on('willDestroyElement') | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
margin: 12px 16px; | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
font-size: 12pt; | |
} | |
.slide-in-popover { | |
background: white; | |
margin-top: 70px; | |
box-shadow: 0 5px 10px rgba(0, 0, 0, .4); | |
border-radius: 3px; | |
// height: calc(100vh - 90px); | |
overflow-y: scroll; | |
.popover-title { | |
padding: 8px 14px; | |
margin: 0; | |
font-size: 18px; | |
background-color: #f7f7f7; | |
border-bottom: 1px solid #ebebeb; | |
background-color: transparent; | |
color: #7e57c2; | |
font-weight: 600; | |
} | |
.popover-body { | |
padding: 20px; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { onOpenTether, target } from 'liquid-tether'; | |
export default function() { | |
this.transition( | |
target('flyout'), | |
onOpenTether(), | |
this.use('tether', 'to-left'), | |
this.reverse('tether', 'to-right') | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.10.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.6.0", | |
"ember-data": "2.6.1", | |
"ember-template-compiler": "2.6.0" | |
}, | |
"addons": { | |
"liquid-tether": "1.1.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment