This commit is contained in:
yuri
2018-06-18 15:23:04 +03:00
parent 2d1770f439
commit 7dd0fe07ac
7 changed files with 26 additions and 1 deletions
@@ -39,6 +39,8 @@ class ActionHistoryRecord extends Record
protected $listCountQueryDisabled = true;
protected $forceSelectAllAttributes = true;
public function loadParentNameFields(\Espo\ORM\Entity $entity)
{
if ($entity->get('targetId') && $entity->get('targetType')) {
@@ -39,6 +39,8 @@ class AuthLogRecord extends Record
protected $actionHistoryDisabled = true;
protected $forceSelectAllAttributes = true;
protected $readOnlyAttributeList = [
"username",
"portalId",
+2
View File
@@ -39,6 +39,8 @@ class PortalRole extends Record
$this->addDependency('fileManager');
}
protected $forceSelectAllAttributes = true;
public function afterCreate(Entity $entity, array $data = array())
{
parent::afterCreate($entity, $data);
+2
View File
@@ -39,6 +39,8 @@ class Role extends Record
$this->addDependency('fileManager');
}
protected $forceSelectAllAttributes = true;
public function afterCreate(Entity $entity, array $data = array())
{
parent::afterCreate($entity, $data);
+7
View File
@@ -63,6 +63,13 @@ class User extends Record
'accountsIds'
];
protected $mandatorySelectAttributeList = [
'isPortalUser',
'isActive',
'userName',
'isAdmin'
];
protected $linkSelectParams = array(
'targetLists' => array(
'additionalColumns' => array(
@@ -1,2 +1,4 @@
{{#if isNotEmpty}}
{{{value}}}
{{else}}
{{#if valueIsSet}}{{translate 'None'}}{{else}}...{{/if}}{{/if}}
+8
View File
@@ -36,7 +36,15 @@ Espo.define('views/fields/json-object', 'views/fields/base', function (Dep) {
detailTemplate: 'fields/json-object/detail',
data: function () {
var data = Dep.prototype.data.call(this);
data.valueIsSet = this.model.has(this.name);
data.isNotEmpty = !!this.model.get(this.name);
return data;
},
getValueForDisplay: function () {
if (!this.model.get(this.name)) return null;
var text = JSON.stringify(this.model.get(this.name), false, 2).replace(/(\r\n|\n|\r)/gm, '<br>').replace(/\s/g, '&nbsp;');
return text;