2015-07-08 16:45:13 -04:00
|
|
|
export default Ember.Component.extend({
|
|
|
|
classNameBindings: [':schema-table', 'open'],
|
2015-07-08 19:46:36 -04:00
|
|
|
tagName: 'li',
|
2015-07-08 16:45:13 -04:00
|
|
|
|
|
|
|
open: Em.computed.alias('table.open'),
|
|
|
|
|
|
|
|
_bindClicks: function() {
|
|
|
|
const self = this;
|
2015-07-09 18:46:19 -04:00
|
|
|
this.$().find('.schema-table-name').click(function(e) {
|
2015-07-08 16:45:13 -04:00
|
|
|
self.set('open', !self.get('open'));
|
2015-07-09 18:46:19 -04:00
|
|
|
e.preventDefault();
|
2015-07-08 16:45:13 -04:00
|
|
|
});
|
2015-07-09 18:46:19 -04:00
|
|
|
}.on('didInsertElement'),
|
|
|
|
|
|
|
|
_cleanup: function() {
|
|
|
|
this.$().find('.schema-table-name').off('click');
|
|
|
|
}.on('willDestroyElement')
|
2015-07-08 16:45:13 -04:00
|
|
|
});
|