This commit is contained in:
Yuri Kuznetsov
2022-08-09 19:00:01 +03:00
parent 260f13bf3f
commit df45635fd5
2 changed files with 6 additions and 4 deletions
@@ -26,24 +26,26 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
Espo.define('crm:views/contact/fields/account', 'views/fields/link', function (Dep) {
define('crm:views/contact/fields/account', ['views/fields/link'], function (Dep) {
return Dep.extend({
getAttributeList: function () {
var list = Dep.prototype.getAttributeList.call(this);
list.push('accountIsInactive');
return list;
},
afterRender: function () {
Dep.prototype.afterRender.call(this);
if (this.mode === 'list' || this.mode === 'detail') {
if (this.model.get('accountIsInactive')) {
this.$el.find('a').css('textDecoration', 'line-through');
}
}
}
},
});
});
@@ -190,7 +190,7 @@ define('crm:views/contact/fields/accounts', ['views/fields/link-multiple-with-co
let isPrimary = id === this.primaryId;
let $a = $('<a>')
.attr('href', 'javascript:')
.attr('role', 'button')
.attr('data-action', 'setPrimary')
.attr('data-id', id)
.text(this.translate('Set Primary', 'labels', 'Account'));