fix list tree

This commit is contained in:
yuri
2016-01-13 17:30:09 +02:00
parent ff81306e90
commit c0b5661ef4
@@ -171,20 +171,26 @@ Espo.define('views/record/list-tree-item', 'view', function (Dep) {
}
},
fold: function () {
this.clearView('children');
this.isUnfolded = false;
this.afterFold();
},
afterRender: function () {
if (this.model.id == '55671017adf783be0') {
console.log(this.isUnfolded);
}
if (this.isUnfolded) {
this.afterUnfold();
} else {
this.afterFold();
}
if (this.isEnd) {
this.afterIsEnd();
}
},
fold: function () {
this.clearView('children');
this.afterFold();
},
afterFold: function () {
this.$el.find('a[data-action="fold"][data-id="'+this.model.id+'"]').addClass('hidden');
this.$el.find('a[data-action="unfold"][data-id="'+this.model.id+'"]').removeClass('hidden');