hide followers if empty
This commit is contained in:
@@ -94,6 +94,16 @@ Espo.define('views/record/panels/default-side', 'views/record/panels/side', func
|
||||
|
||||
if (this.getMetadata().get(['scopes', this.model.name ,'stream']) && !this.getUser().isPortal()) {
|
||||
this.createField('followers', 'views/fields/followers', null, null, true);
|
||||
this.controlFollowersField();
|
||||
this.listenTo(this.model, 'change:followersIds', this.controlFollowersField, this);
|
||||
}
|
||||
},
|
||||
|
||||
controlFollowersField: function () {
|
||||
if (this.model.get('followersIds') && this.model.get('followersIds').length) {
|
||||
this.recordViewObject.showField('followers');
|
||||
} else {
|
||||
this.recordViewObject.hideField('followers');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user