fix list tree
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user