2015-07-08 13:45:13 -07:00
|
|
|
export default Ember.Component.extend({
|
2018-10-10 17:26:23 +05:30
|
|
|
classNameBindings: [":schema-table", "open"],
|
|
|
|
|
tagName: "li",
|
2015-07-08 13:45:13 -07:00
|
|
|
|
2019-01-22 17:19:01 +05:30
|
|
|
open: Ember.computed.alias("table.open"),
|
2015-07-08 13:45:13 -07:00
|
|
|
|
|
|
|
|
_bindClicks: function() {
|
|
|
|
|
const self = this;
|
2018-10-10 17:26:23 +05:30
|
|
|
this.$()
|
|
|
|
|
.find(".schema-table-name")
|
|
|
|
|
.click(function(e) {
|
|
|
|
|
self.set("open", !self.get("open"));
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
});
|
|
|
|
|
}.on("didInsertElement"),
|
2015-07-09 15:46:19 -07:00
|
|
|
|
|
|
|
|
_cleanup: function() {
|
2018-10-10 17:26:23 +05:30
|
|
|
this.$()
|
|
|
|
|
.find(".schema-table-name")
|
|
|
|
|
.off("click");
|
|
|
|
|
}.on("willDestroyElement")
|
2015-07-08 13:45:13 -07:00
|
|
|
});
|