Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f47915d077 | |||
| eb2305712a | |||
| f75414a5d2 | |||
| a88cb05897 | |||
| 2435ae67c9 | |||
| 4c49be5203 | |||
| 2d8a1dad80 | |||
| a15b009133 | |||
| 25d2033b7c | |||
| c509eeae49 | |||
| 2a4b0dbcb4 | |||
| e45a863e8d | |||
| c4819e29e0 | |||
| c0242a18e3 | |||
| 7a953c9a47 | |||
| 27cc0d812e | |||
| 7a433c1890 | |||
| de26d87400 | |||
| 07da707503 | |||
| b473b19b45 | |||
| 6c291999f4 | |||
| 2e92d0d3a5 | |||
| bc3dfc7ff9 | |||
| e81d5707f2 | |||
| 1d2e3aff89 | |||
| e36c8d6053 | |||
| 4ea1d50caf | |||
| 865a8e2abc | |||
| 5783f4e708 | |||
| 557a48ec6a | |||
| d5fa18975e | |||
| 23ee06e123 |
@@ -41,17 +41,17 @@ class Job extends \Espo\Core\Controllers\Record
|
||||
}
|
||||
}
|
||||
|
||||
public function actionCreate($params, $data)
|
||||
public function actionCreate($params, $data, $request)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionUpdate($params, $data)
|
||||
public function actionUpdate($params, $data, $request)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionPatch($params, $data)
|
||||
public function actionPatch($params, $data, $request)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
@@ -66,12 +66,12 @@ class Job extends \Espo\Core\Controllers\Record
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionCreateLink($params, $data)
|
||||
public function actionCreateLink($params, $data, $request)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionRemoveLink($params, $data)
|
||||
public function actionRemoveLink($params, $data, $request)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
@@ -37,9 +37,6 @@ class Notification extends \Espo\Core\Controllers\Record
|
||||
|
||||
public function actionList($params, $data, $request)
|
||||
{
|
||||
$scope = $params['scope'];
|
||||
$id = $params['id'];
|
||||
|
||||
$userId = $this->getUser()->id;
|
||||
|
||||
$offset = intval($request->get('offset'));
|
||||
|
||||
@@ -128,7 +128,7 @@ class Record extends Base
|
||||
$where = $request->get('where');
|
||||
$offset = $request->get('offset');
|
||||
$maxSize = $request->get('maxSize');
|
||||
$asc = $request->get('asc') === 'true';
|
||||
$asc = $request->get('asc', 'true') === 'true';
|
||||
$sortBy = $request->get('sortBy');
|
||||
$q = $request->get('q');
|
||||
$primaryFilter = $request->get('primaryFilter');
|
||||
@@ -174,7 +174,7 @@ class Record extends Base
|
||||
$where = $request->get('where');
|
||||
$offset = $request->get('offset');
|
||||
$maxSize = $request->get('maxSize');
|
||||
$asc = $request->get('asc') === 'true';
|
||||
$asc = $request->get('asc', 'true') === 'true';
|
||||
$sortBy = $request->get('sortBy');
|
||||
$q = $request->get('q');
|
||||
$textFilter = $request->get('textFilter');
|
||||
@@ -292,7 +292,6 @@ class Record extends Base
|
||||
$params['where'] = $where;
|
||||
}
|
||||
if (array_key_exists('ids', $data)) {
|
||||
$where = json_decode(json_encode($data['where']), true);
|
||||
$params['ids'] = $data['ids'];
|
||||
}
|
||||
|
||||
|
||||
@@ -29,11 +29,11 @@
|
||||
|
||||
namespace Espo\Core\Repositories;
|
||||
|
||||
use \Espo\Core\Entities\CategoryTreeItem as Entity;
|
||||
use \Espo\ORM\Entity;
|
||||
|
||||
class CategoryTree extends \Espo\Core\ORM\Repositories\RDB
|
||||
{
|
||||
public function afterSave(Entity $entity, $options)
|
||||
protected function afterSave(Entity $entity, array $options = array())
|
||||
{
|
||||
parent::afterSave($entity, $options);
|
||||
|
||||
@@ -86,7 +86,7 @@ class CategoryTree extends \Espo\Core\ORM\Repositories\RDB
|
||||
}
|
||||
}
|
||||
|
||||
public function afterRemove(Entity $entity, $options)
|
||||
protected function afterRemove(Entity $entity, array $options = array())
|
||||
{
|
||||
parent::afterRemove($entity, $options);
|
||||
|
||||
|
||||
@@ -45,11 +45,9 @@ class Invitations
|
||||
|
||||
protected $language;
|
||||
|
||||
protected $fileManager;
|
||||
|
||||
protected $ics;
|
||||
|
||||
public function __construct($entityManager, $smtpParams, $mailSender, $config, $dateTime, $language, $fileManager)
|
||||
public function __construct($entityManager, $smtpParams, $mailSender, $config, $dateTime, $language)
|
||||
{
|
||||
$this->entityManager = $entityManager;
|
||||
$this->smtpParams = $smtpParams;
|
||||
@@ -57,7 +55,6 @@ class Invitations
|
||||
$this->config = $config;
|
||||
$this->dateTime = $dateTime;
|
||||
$this->language = $language;
|
||||
$this->fileManager = $fileManager;
|
||||
}
|
||||
|
||||
protected function getEntityManager()
|
||||
@@ -75,17 +72,28 @@ class Invitations
|
||||
$key = '{'.$field.'}';
|
||||
switch ($d['type']) {
|
||||
case 'datetime':
|
||||
$contents = str_replace($key, $this->dateTime->convertSystemDateTime($entity->get($field)), $contents);
|
||||
$value = $entity->get($field);
|
||||
if ($value) {
|
||||
$value = $this->dateTime->convertSystemDateTime($value);
|
||||
}
|
||||
$contents = str_replace($key, $value, $contents);
|
||||
break;
|
||||
case 'date':
|
||||
$contents = str_replace($key, $this->dateTime->convertSystemDate($entity->get($field)), $contents);
|
||||
$value = $entity->get($field);
|
||||
if ($value) {
|
||||
$value = $this->dateTime->convertSystemDate($value);
|
||||
}
|
||||
$contents = str_replace($key, $value, $contents);
|
||||
break;
|
||||
case 'jsonArray':
|
||||
break;
|
||||
case 'jsonObject':
|
||||
break;
|
||||
default:
|
||||
$contents = str_replace($key, $entity->get($field), $contents);
|
||||
$value = $entity->get($field);
|
||||
if (is_string($value) || $value === null || is_scalar($value) || is_callable([$value, '__toString'])) {
|
||||
$contents = str_replace($key, $value, $contents);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class Opportunity extends \Espo\Core\Controllers\Record
|
||||
public function actionReportByLeadSource($params, $data, $request)
|
||||
{
|
||||
$level = $this->getAcl()->getLevel('Opportunity', 'read');
|
||||
if (!$level || $level == 'own') {
|
||||
if (!$level || $level == 'own' || $level == 'no') {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class Opportunity extends \Espo\Core\Controllers\Record
|
||||
public function actionReportByStage($params, $data, $request)
|
||||
{
|
||||
$level = $this->getAcl()->getLevel('Opportunity', 'read');
|
||||
if (!$level || $level == 'own') {
|
||||
if (!$level || $level == 'own' || $level == 'no') {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ class Opportunity extends \Espo\Core\Controllers\Record
|
||||
public function actionReportSalesByMonth($params, $data, $request)
|
||||
{
|
||||
$level = $this->getAcl()->getLevel('Opportunity', 'read');
|
||||
if (!$level || $level == 'own') {
|
||||
if (!$level || $level == 'own' || $level == 'no') {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ class Opportunity extends \Espo\Core\Controllers\Record
|
||||
public function actionReportSalesPipeline($params, $data, $request)
|
||||
{
|
||||
$level = $this->getAcl()->getLevel('Opportunity', 'read');
|
||||
if (!$level || $level == 'own') {
|
||||
if (!$level || $level == 'own' || $level == 'no') {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
|
||||
@@ -93,6 +93,25 @@ class Meeting extends \Espo\Core\ORM\Repositories\RDB
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$entity->isNew()) {
|
||||
if ($entity->isFieldChanged('dateStart') && $entity->isFieldChanged('dateStart') && !$entity->isFieldChanged('dateEnd')) {
|
||||
$dateEndPrevious = $entity->getFetched('dateEnd');
|
||||
$dateStartPrevious = $entity->getFetched('dateStart');
|
||||
if ($dateStartPrevious && $dateEndPrevious) {
|
||||
$dtStart = new \DateTime($dateStartPrevious);
|
||||
$dtEnd = new \DateTime($dateEndPrevious);
|
||||
$dt = new \DateTime($entity->get('dateStart'));
|
||||
|
||||
if ($dtStart && $dtEnd && $dt) {
|
||||
$duration = ($dtEnd->getTimestamp() - $dtStart->getTimestamp());
|
||||
$dt->modify('+' . $duration . ' seconds');
|
||||
$dateEnd = $dt->format('Y-m-d H:i:s');
|
||||
$entity->set('dateEnd', $dateEnd);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function getEntityReminders(Entity $entity)
|
||||
@@ -124,7 +143,7 @@ class Meeting extends \Espo\Core\ORM\Repositories\RDB
|
||||
return $reminders;
|
||||
}
|
||||
|
||||
protected function afterSave(Entity $entity, array $options)
|
||||
protected function afterSave(Entity $entity, array $options = array())
|
||||
{
|
||||
parent::afterSave($entity, $options);
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ class Task extends \Espo\Core\ORM\Repositories\RDB
|
||||
return null;
|
||||
}
|
||||
|
||||
protected function beforeSave(Entity $entity, array $options)
|
||||
protected function beforeSave(Entity $entity, array $options = array())
|
||||
{
|
||||
parent::beforeSave($entity, $options);
|
||||
|
||||
|
||||
@@ -135,9 +135,6 @@
|
||||
"dateStart": {
|
||||
"columns": ["dateStart", "deleted"]
|
||||
},
|
||||
"dateEnd": {
|
||||
"columns": ["dateStart", "deleted"]
|
||||
},
|
||||
"status": {
|
||||
"columns": ["status", "deleted"]
|
||||
},
|
||||
|
||||
@@ -103,7 +103,8 @@ class Activities extends \Espo\Core\Services\Base
|
||||
'leftJoins' => [['users', 'usersLeft']],
|
||||
'whereClause' => array(
|
||||
'usersLeftMiddle.userId' => $entity->id
|
||||
)
|
||||
),
|
||||
'customJoin' => ''
|
||||
);
|
||||
|
||||
if (!empty($statusList)) {
|
||||
@@ -142,7 +143,8 @@ class Activities extends \Espo\Core\Services\Base
|
||||
'leftJoins' => [['users', 'usersLeft']],
|
||||
'whereClause' => array(
|
||||
'usersLeftMiddle.userId' => $entity->id
|
||||
)
|
||||
),
|
||||
'customJoin' => ''
|
||||
);
|
||||
|
||||
if (!empty($statusList)) {
|
||||
@@ -181,7 +183,8 @@ class Activities extends \Espo\Core\Services\Base
|
||||
'leftJoins' => [['users', 'usersLeft']],
|
||||
'whereClause' => array(
|
||||
'usersLeftMiddle.userId' => $entity->id
|
||||
)
|
||||
),
|
||||
'customJoin' => ''
|
||||
);
|
||||
|
||||
if (!empty($statusList)) {
|
||||
@@ -225,7 +228,8 @@ class Activities extends \Espo\Core\Services\Base
|
||||
'status',
|
||||
'createdAt'
|
||||
],
|
||||
'whereClause' => array()
|
||||
'whereClause' => array(),
|
||||
'customJoin' => ''
|
||||
);
|
||||
|
||||
if (!empty($statusList)) {
|
||||
@@ -439,7 +443,8 @@ class Activities extends \Espo\Core\Services\Base
|
||||
'status',
|
||||
'createdAt'
|
||||
],
|
||||
'whereClause' => array()
|
||||
'whereClause' => array(),
|
||||
'customJoin' => ''
|
||||
);
|
||||
|
||||
if (!empty($statusList)) {
|
||||
@@ -686,7 +691,8 @@ class Activities extends \Espo\Core\Services\Base
|
||||
'dateStart>=' => $from,
|
||||
'dateStart<' => $to,
|
||||
'usersMiddle.status!=' => 'Declined'
|
||||
)
|
||||
),
|
||||
'customJoin' => ''
|
||||
);
|
||||
|
||||
return $this->getEntityManager()->getQuery()->createSelectQuery('Meeting', $selectParams);
|
||||
@@ -716,7 +722,8 @@ class Activities extends \Espo\Core\Services\Base
|
||||
'dateStart>=' => $from,
|
||||
'dateStart<' => $to,
|
||||
'usersMiddle.status!=' => 'Declined'
|
||||
)
|
||||
),
|
||||
'customJoin' => ''
|
||||
);
|
||||
|
||||
return $this->getEntityManager()->getQuery()->createSelectQuery('Call', $selectParams);
|
||||
@@ -943,8 +950,11 @@ class Activities extends \Espo\Core\Services\Base
|
||||
|
||||
$sth = $pdo->prepare($unionSql);
|
||||
|
||||
$sth->bindParam(':offset', intval($params['offset']), \PDO::PARAM_INT);
|
||||
$sth->bindParam(':maxSize', intval($params['maxSize']), \PDO::PARAM_INT);
|
||||
$offset = intval($params['offset']);
|
||||
$maxSize = intval($params['maxSize']);
|
||||
|
||||
$sth->bindParam(':offset', $offset, \PDO::PARAM_INT);
|
||||
$sth->bindParam(':maxSize', $maxSize, \PDO::PARAM_INT);
|
||||
$sth->execute();
|
||||
$rows = $sth->fetchAll(\PDO::FETCH_ASSOC);
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ class CaseObj extends \Espo\Services\Record
|
||||
'inboundEmailId'
|
||||
];
|
||||
|
||||
public function afterCreate($entity, array $data = array())
|
||||
public function afterCreate(Entity $entity, array $data = array())
|
||||
{
|
||||
parent::afterCreate($entity, $data);
|
||||
if (!empty($data['emailId'])) {
|
||||
|
||||
@@ -61,7 +61,7 @@ class Contact extends \Espo\Services\Record
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function afterCreate($entity, array $data = array())
|
||||
public function afterCreate(Entity $entity, array $data = array())
|
||||
{
|
||||
parent::afterCreate($entity, $data);
|
||||
if (!empty($data['emailId'])) {
|
||||
|
||||
@@ -63,7 +63,7 @@ class Lead extends \Espo\Services\Record
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function afterCreate($entity, array $data = array())
|
||||
public function afterCreate(Entity $entity, array $data = array())
|
||||
{
|
||||
parent::afterCreate($entity, $data);
|
||||
if (!empty($data['emailId'])) {
|
||||
|
||||
@@ -91,6 +91,8 @@ class Email extends \Espo\Core\Notificators\Base
|
||||
$this->getEntityManager()->getRepository('Email')->loadFromField($entity);
|
||||
}
|
||||
|
||||
$person = null;
|
||||
|
||||
$from = $entity->get('from');
|
||||
if ($from) {
|
||||
$person = $this->getEntityManager()->getRepository('EmailAddress')->getEntityByAddress($from, null, ['User', 'Contact', 'Lead']);
|
||||
|
||||
@@ -798,7 +798,7 @@ abstract class Mapper implements IMapper
|
||||
foreach ($entity->fields as $field => $fieldDefs) {
|
||||
if ($entity->has($field)) {
|
||||
if ($onlyStorable) {
|
||||
if (!empty($fieldDefs['notStorable']) || isset($fieldDefs['source']) && $fieldDefs['source'] != 'db')
|
||||
if (!empty($fieldDefs['notStorable']) || !empty($fieldDefs['autoincrement']) || isset($fieldDefs['source']) && $fieldDefs['source'] != 'db')
|
||||
continue;
|
||||
if ($fieldDefs['type'] == IEntity::FOREIGN)
|
||||
continue;
|
||||
|
||||
@@ -116,7 +116,7 @@ class Email extends \Espo\Core\ORM\Repositories\RDB
|
||||
$entity->set('idHash', $idHash);
|
||||
}
|
||||
|
||||
protected function beforeSave(Entity $entity, array $options)
|
||||
protected function beforeSave(Entity $entity, array $options = array())
|
||||
{
|
||||
$eaRepositoty = $this->getEntityManager()->getRepository('EmailAddress');
|
||||
|
||||
@@ -187,7 +187,7 @@ class Email extends \Espo\Core\ORM\Repositories\RDB
|
||||
}
|
||||
}
|
||||
|
||||
protected function afterSave(Entity $entity, array $options)
|
||||
protected function afterSave(Entity $entity, array $options = array())
|
||||
{
|
||||
parent::afterSave($entity, $options);
|
||||
if (!$entity->isNew()) {
|
||||
|
||||
@@ -43,7 +43,7 @@ class Job extends \Espo\Core\ORM\Repositories\RDB
|
||||
return $this->getInjection('config');
|
||||
}
|
||||
|
||||
public function beforeSave(Entity $entity)
|
||||
public function beforeSave(Entity $entity, array $options = array())
|
||||
{
|
||||
if (!$entity->has('executeTime')) {
|
||||
$entity->set('executeTime', date('Y-m-d H:i:s'));
|
||||
|
||||
@@ -72,7 +72,8 @@
|
||||
"userNameEmailAddressNotFound": "Username/Email Address not found",
|
||||
"forbidden": "Forbidden, please try later",
|
||||
"uniqueLinkHasBeenSent": "The unique URL has been sent to the specified email address.",
|
||||
"passwordChangedByRequest": "Password has been changed."
|
||||
"passwordChangedByRequest": "Password has been changed.",
|
||||
"setupSmtpBefore": "You need to setup <a href=\"{url}\">SMTP settings</a> to make the system be able to send password in email."
|
||||
},
|
||||
"boolFilters": {
|
||||
"onlyMyTeam": "Only My Team"
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
[
|
||||
"teams",
|
||||
"createdAt",
|
||||
"emailAddress",
|
||||
"title",
|
||||
"isAdmin",
|
||||
"isActive",
|
||||
"portals",
|
||||
"accounts"
|
||||
"accounts",
|
||||
"contact"
|
||||
]
|
||||
|
||||
@@ -14,5 +14,8 @@
|
||||
"active",
|
||||
"activePortal"
|
||||
],
|
||||
"boolFilterList": ["onlyMyTeam"]
|
||||
"boolFilterList": ["onlyMyTeam"],
|
||||
"selectDefaultFilters": {
|
||||
"filter": "active"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,8 +91,7 @@
|
||||
"trim": true
|
||||
},
|
||||
"smtpServer": {
|
||||
"type": "varchar",
|
||||
"required": true
|
||||
"type": "varchar"
|
||||
},
|
||||
"smtpPort": {
|
||||
"type": "int",
|
||||
|
||||
@@ -31,9 +31,9 @@ namespace Espo\SelectManagers;
|
||||
|
||||
class Email extends \Espo\Core\SelectManagers\Base
|
||||
{
|
||||
public function getSelectParams(array $params, $withAcl = false)
|
||||
public function getSelectParams(array $params, $withAcl = false, $checkWherePermission = false)
|
||||
{
|
||||
$result = parent::getSelectParams($params, $withAcl);
|
||||
$result = parent::getSelectParams($params, $withAcl, $checkWherePermission);
|
||||
|
||||
if (!$this->hasJoin('users', $result) && !$this->hasLeftJoin('users', $result)) {
|
||||
$this->addLeftJoin('users', $result);
|
||||
|
||||
@@ -192,7 +192,9 @@ class EmailTemplate extends Record
|
||||
$value = $this->getDateTime()->convertSystemDateTime($value);
|
||||
}
|
||||
}
|
||||
$text = str_replace('{' . $type . '.' . $field . '}', $value, $text);
|
||||
if (is_string($value) || $value === null || is_scalar($value) || is_callable([$value, '__toString'])) {
|
||||
$text = str_replace('{' . $type . '.' . $field . '}', $value, $text);
|
||||
}
|
||||
}
|
||||
return $text;
|
||||
}
|
||||
|
||||
@@ -1017,8 +1017,8 @@ class Stream extends \Espo\Core\Services\Base
|
||||
$ignoreScopeList = [];
|
||||
$scopes = $this->getMetadata()->get('scopes', array());
|
||||
foreach ($scopes as $scope => $d) {
|
||||
if (!$d['entity']) continue;
|
||||
if (!$d['object']) continue;
|
||||
if (empty($d['entity']) || !$d['entity']) continue;
|
||||
if (empty($d['object']) || !$d['object']) continue;
|
||||
if (!$this->getAcl()->checkScope($scope)) {
|
||||
$ignoreScopeList[] = $scope;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
namespace Espo\Services;
|
||||
|
||||
use \Espo\ORM\Entity;
|
||||
|
||||
class Team extends Record
|
||||
{
|
||||
protected function init()
|
||||
@@ -49,7 +51,7 @@ class Team extends Record
|
||||
return $this->getInjection('fileManager');
|
||||
}
|
||||
|
||||
public function afterUpdate(Entity $entity, array $data)
|
||||
public function afterUpdate(Entity $entity, array $data = array())
|
||||
{
|
||||
parent::afterUpdate($entity, $data);
|
||||
if (array_key_exists('rolesIds', $data)) {
|
||||
|
||||
@@ -224,7 +224,9 @@ class User extends Record
|
||||
|
||||
if (!is_null($newPassword) && !empty($data['sendAccessInfo'])) {
|
||||
if ($user->isActive()) {
|
||||
$this->sendPassword($user, $newPassword);
|
||||
try {
|
||||
$this->sendPassword($user, $newPassword);
|
||||
} catch (\Exception $e) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
@@ -45,6 +45,8 @@ Espo.define('crm:views/case/record/panels/activities', 'crm:views/record/panels/
|
||||
var emailAddress = contact.get('emailAddress');
|
||||
if (emailAddress) {
|
||||
attributes.to = emailAddress;
|
||||
attributes.nameHash = {};
|
||||
attributes.nameHash[emailAddress] = contact.get('name');
|
||||
}
|
||||
|
||||
callback.call(this, attributes);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<section>
|
||||
<h5>Version {{version}}</h5>
|
||||
<p>
|
||||
Copyright © 2014-2015 EspoCRM: Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko.
|
||||
Copyright © 2014-2016 EspoCRM: Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko.
|
||||
<br>
|
||||
Website: <a href="http://www.espocrm.com">http://www.espocrm.com</a>.
|
||||
</p>
|
||||
|
||||
@@ -1 +1 @@
|
||||
<a href="javascript:" data-email-address="{{value}}" data-action="mailTo">{{value}}</a>
|
||||
<a href="javascript:" data-email-address="{{value}}" data-action="mailTo" title="{{value}}">{{value}}</a>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{#if idValue}}
|
||||
<a href="#{{foreignScope}}/view/{{idValue}}">{{nameValue}}</a>
|
||||
<a href="#{{foreignScope}}/view/{{idValue}}" title="{{nameValue}}">{{nameValue}}</a>
|
||||
{{/if}}
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
<a href="tel:{{value}}" data-phone-number="{{value}}" data-action="dial">{{value}}</a>
|
||||
<a href="tel:{{value}}" data-phone-number="{{value}}" data-action="dial" title="{{value}}">{{value}}</a>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{{#if value}}
|
||||
<a href="{{url}}" target="_blank">{{value}}</a>
|
||||
<a href="{{url}}" target="_blank" title="{{value}}">{{value}}</a>
|
||||
{{/if}}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<li data-id="{{model.id}}" class="list-group-item">
|
||||
|
||||
<div class="cell">
|
||||
<a href="javascript:" class="action{{#unless showFold}} hidden{{/unless}} small" data-action="fold" data-id="{{model.id}}"><span class="glyphicon glyphicon-chevron-down"></span></a>
|
||||
<a href="javascript:" class="action{{#unless showUnfold}} hidden{{/unless}} small" data-action="unfold" data-id="{{model.id}}"><span class="glyphicon glyphicon-chevron-right"></span></a>
|
||||
@@ -6,5 +6,4 @@
|
||||
|
||||
<a href="#{{model.name}}/view/{{model.id}}" class="link{{#if isSelected}} text-bold{{/if}}" data-id="{{model.id}}">{{name}}</a>
|
||||
</div>
|
||||
<div class="children{{#unless isUnfolded}} hidden{{/unless}}">{{{children}}}</div>
|
||||
</li>
|
||||
<div class="children{{#unless isUnfolded}} hidden{{/unless}}">{{{children}}}</div>
|
||||
@@ -25,7 +25,9 @@
|
||||
|
||||
<ul class="list-group list-group-tree list-group-no-border">
|
||||
{{#each rowList}}
|
||||
<li data-id="{{./this}}" class="list-group-item">
|
||||
{{{var this ../this}}}
|
||||
</li>
|
||||
{{/each}}
|
||||
{{#unless createDisabled}}
|
||||
<li class="list-group-item">
|
||||
|
||||
@@ -260,8 +260,7 @@ Espo.define('controller', [], function () {
|
||||
if (master.currentViewKey) {
|
||||
this.set('storedScrollTop-' + master.currentViewKey, $(window).scrollTop());
|
||||
if (this.hasStoredMainView(master.currentViewKey)) {
|
||||
master.nestedViews['main'].undelegateEvents();
|
||||
delete master.nestedViews['main'];
|
||||
master.unchainView('main');
|
||||
}
|
||||
}
|
||||
master.currentViewKey = storedKey;
|
||||
|
||||
+3
-3
@@ -40,11 +40,11 @@ Espo.define('ui', [], function () {
|
||||
this.height = false;
|
||||
this.buttons = [];
|
||||
this.removeOnClose = true;
|
||||
this.graggable = false;
|
||||
this.draggable = false;
|
||||
this.container = 'body'
|
||||
this.onRemove = function () {};
|
||||
|
||||
var params = ['className', 'backdrop', 'keyboard', 'closeButton', 'header', 'body', 'width', 'height', 'fitHeight', 'buttons', 'removeOnClose', 'graggable', 'container', 'onRemove'];
|
||||
var params = ['className', 'backdrop', 'keyboard', 'closeButton', 'header', 'body', 'width', 'height', 'fitHeight', 'buttons', 'removeOnClose', 'draggable', 'container', 'onRemove'];
|
||||
params.forEach(function (param) {
|
||||
if (param in options) {
|
||||
this[param] = options[param];
|
||||
@@ -99,7 +99,7 @@ Espo.define('ui', [], function () {
|
||||
}
|
||||
}.bind(this));
|
||||
|
||||
if (this.graggable) {
|
||||
if (this.draggable) {
|
||||
this.$el.find('header').css('cursor', 'pointer');
|
||||
this.$el.draggable({
|
||||
handle: 'header',
|
||||
|
||||
@@ -185,7 +185,10 @@ Espo.define('views/list', ['views/main', 'search-manager'], function (Dep, Searc
|
||||
o[option] = this.options[option];
|
||||
}, this);
|
||||
var listViewName = this.getRecordViewName();
|
||||
|
||||
this.createView('list', listViewName, o, function (view) {
|
||||
if (!this.hasParentView()) return;
|
||||
|
||||
view.render();
|
||||
view.notify(false);
|
||||
if (this.searchPanel) {
|
||||
|
||||
@@ -53,6 +53,8 @@ Espo.define('views/modal', 'view', function (Dep) {
|
||||
|
||||
escapeDisabled: false,
|
||||
|
||||
isDraggable: false,
|
||||
|
||||
events: {
|
||||
'click .action': function (e) {
|
||||
var $target = $(e.currentTarget);
|
||||
@@ -135,6 +137,7 @@ Espo.define('views/modal', 'view', function (Dep) {
|
||||
width: this.width,
|
||||
keyboard: !this.escapeDisabled,
|
||||
fitHeight: this.fitHeight,
|
||||
draggable: this.isDraggable,
|
||||
onRemove: function () {
|
||||
this.onDialogClose();
|
||||
}.bind(this)
|
||||
|
||||
@@ -416,13 +416,19 @@ Espo.define('views/record/detail', ['views/record/base', 'view-record-helper'],
|
||||
var fields = {};
|
||||
|
||||
if (this.hasView('middle')) {
|
||||
_.extend(fields, Espo.Utils.clone(this.getView('middle').getFieldViews(withHidden)));
|
||||
if ('getFieldViews' in this.getView('middle')) {
|
||||
_.extend(fields, Espo.Utils.clone(this.getView('middle').getFieldViews(withHidden)));
|
||||
}
|
||||
}
|
||||
if (this.hasView('side')) {
|
||||
_.extend(fields, this.getView('side').getFieldViews(withHidden));
|
||||
if ('getFieldViews' in this.getView('side')) {
|
||||
_.extend(fields, this.getView('side').getFieldViews(withHidden));
|
||||
}
|
||||
}
|
||||
if (this.hasView('bottom')) {
|
||||
_.extend(fields, this.getView('bottom').getFieldViews(withHidden));
|
||||
if ('getFieldViews' in this.getView('bottom')) {
|
||||
_.extend(fields, this.getView('bottom').getFieldViews(withHidden));
|
||||
}
|
||||
}
|
||||
return fields;
|
||||
},
|
||||
|
||||
@@ -161,8 +161,9 @@ Espo.define('views/record/list-tree', 'views/record/list', function (Dep) {
|
||||
var count = modelList.length;
|
||||
var built = 0;
|
||||
modelList.forEach(function (model, i) {
|
||||
this.rowList.push('row-' + i);
|
||||
this.createView('row-' + i, this.itemViewName, {
|
||||
var key = model.id;
|
||||
this.rowList.push(key);
|
||||
this.createView(key, this.itemViewName, {
|
||||
model: model,
|
||||
collection: this.collection,
|
||||
el: this.options.el + ' ' + this.getRowSelector(model.id),
|
||||
|
||||
@@ -782,6 +782,7 @@ Espo.define('views/record/list', 'view', function (Dep) {
|
||||
acl: {
|
||||
edit: this.getAcl().checkModel(model, 'edit')
|
||||
},
|
||||
el: this.options.el + ' .list-row[data-id="'+key+'"]',
|
||||
optionsToPass: ['acl'],
|
||||
noCache: true,
|
||||
_layout: {
|
||||
@@ -1057,7 +1058,7 @@ Espo.define('views/record/list', 'view', function (Dep) {
|
||||
}
|
||||
|
||||
this.removeRowHtml(id);
|
||||
var key = 'row-' + id;
|
||||
var key = id;
|
||||
this.clearView(key);
|
||||
var index = this.rowList.indexOf(key);
|
||||
if (~index) {
|
||||
|
||||
@@ -40,27 +40,28 @@ Espo.define('views/user/detail', 'views/detail', function (Dep) {
|
||||
action: "preferences"
|
||||
});
|
||||
|
||||
if (!this.model.get('isPortalUser')) {
|
||||
if ((this.getAcl().check('EmailAccountScope') && this.model.id == this.getUser().id) || this.getUser().isAdmin()) {
|
||||
this.menu.buttons.push({
|
||||
name: 'emailAccounts',
|
||||
label: "Email Accounts",
|
||||
style: 'default',
|
||||
action: "emailAccounts"
|
||||
});
|
||||
}
|
||||
|
||||
if ((this.getAcl().check('EmailAccountScope') && this.model.id == this.getUser().id) || this.getUser().isAdmin()) {
|
||||
this.menu.buttons.push({
|
||||
name: 'emailAccounts',
|
||||
label: "Email Accounts",
|
||||
style: 'default',
|
||||
action: "emailAccounts"
|
||||
});
|
||||
}
|
||||
|
||||
if (this.model.id == this.getUser().id && this.getAcl().checkScope('ExternalAccount')) {
|
||||
this.menu.buttons.push({
|
||||
name: 'externalAccounts',
|
||||
label: 'External Accounts',
|
||||
style: 'default',
|
||||
action: "externalAccounts"
|
||||
});
|
||||
if (this.model.id == this.getUser().id && this.getAcl().checkScope('ExternalAccount')) {
|
||||
this.menu.buttons.push({
|
||||
name: 'externalAccounts',
|
||||
label: 'External Accounts',
|
||||
style: 'default',
|
||||
action: "externalAccounts"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.getAcl().checkScope('Calendar')) {
|
||||
if (this.getAcl().checkScope('Calendar') && !this.model.get('isPortalUser')) {
|
||||
var showActivities = this.getAcl().checkUserPermission(this.model);
|
||||
if (!showActivities) {
|
||||
if (this.getAcl().get('userPermission') === 'team') {
|
||||
|
||||
@@ -57,6 +57,11 @@ Espo.define('views/user/record/detail', 'views/record/detail', function (Dep) {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.model.get('isPortalUser')) {
|
||||
this.hidePanel('activities');
|
||||
this.hidePanel('history');
|
||||
}
|
||||
|
||||
if (this.model.id == this.getUser().id) {
|
||||
this.listenTo(this.model, 'after:save', function () {
|
||||
this.getUser().set(this.model.toJSON());
|
||||
|
||||
@@ -111,7 +111,7 @@ Espo.define('views/user/record/edit', ['views/record/edit', 'views/user/record/d
|
||||
{
|
||||
name: 'passwordInfo',
|
||||
customLabel: '',
|
||||
customCode: '{{translate "passwordWillBeSent" scope="User" category="messages"}}'
|
||||
customCode: this.getPasswordSendingMessage()
|
||||
}
|
||||
],
|
||||
[
|
||||
@@ -133,6 +133,13 @@ Espo.define('views/user/record/edit', ['views/record/edit', 'views/user/record/d
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
getPasswordSendingMessage: function () {
|
||||
if (this.getConfig().get('smtpServer') && this.getConfig().get('smtpServer') !== '') {
|
||||
return '';
|
||||
}
|
||||
return this.translate('setupSmtpBefore', 'messages', 'User').replace('{url}', '#Admin/outboundEmails');
|
||||
},
|
||||
|
||||
fetch: function () {
|
||||
var data = Dep.prototype.fetch.call(this);
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<body>
|
||||
<div class="container content"></div>
|
||||
<footer>
|
||||
<p class="credit small">© 2015 <a href="http://www.espocrm.com" title="Powered by EspoCRM" alt="Visit official EspoCRM website">EspoCRM</a></p>
|
||||
<p class="credit small">© 2016 <a href="http://www.espocrm.com" title="Powered by EspoCRM" alt="Visit official EspoCRM website">EspoCRM</a></p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<body>
|
||||
<div class="container content"></div>
|
||||
<footer>
|
||||
<p class="credit small">© 2015 <a href="http://www.espocrm.com" title="Powered by EspoCRM" alt="Visit official EspoCRM website">EspoCRM</a></p>
|
||||
<p class="credit small">© 2016 <a href="http://www.espocrm.com" title="Powered by EspoCRM" alt="Visit official EspoCRM website">EspoCRM</a></p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -275,6 +275,11 @@ ul.dropdown-menu > li.checkbox:last-child {
|
||||
margin: 0 20px;
|
||||
}
|
||||
|
||||
.cell > .field {
|
||||
overflow-wrap: break-word;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.field .row {
|
||||
margin-left: -5px !important;
|
||||
margin-right: -5px !important;
|
||||
|
||||
+19
-14
@@ -31,22 +31,27 @@ class Utils
|
||||
{
|
||||
static public $actionPath = 'install/core/actions';
|
||||
|
||||
static public function isActionExists($actionName)
|
||||
static public function checkActionExists($actionName)
|
||||
{
|
||||
$actionPath = static::$actionPath;
|
||||
$actionFileName = $actionName . '.php';
|
||||
$actionRealPath = realpath($actionPath . '/' . $actionFileName);
|
||||
return in_array($actionName, [
|
||||
'applySett',
|
||||
'buildDatabase',
|
||||
'checkPermission',
|
||||
'createUser',
|
||||
'errors',
|
||||
'finish',
|
||||
'main',
|
||||
'setEmailSett',
|
||||
'setPreferences',
|
||||
'settingsTest',
|
||||
'setupConfirmation',
|
||||
'step1',
|
||||
'step2',
|
||||
'step3',
|
||||
'step4',
|
||||
'step5'
|
||||
]);
|
||||
|
||||
$fileManager = new \Espo\Core\Utils\File\Manager();
|
||||
$actionList = $fileManager->getFileList($actionPath);
|
||||
|
||||
foreach ($actionList as $fileName) {
|
||||
$fileRealPath = realpath($actionPath . '/' . $fileName);
|
||||
|
||||
if ($fileRealPath === $actionRealPath) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
@@ -37,12 +37,14 @@ return array(
|
||||
'phpRequires' => array(
|
||||
'JSON',
|
||||
'mcrypt',
|
||||
'pdo_mysql',
|
||||
'pdo_mysql'
|
||||
),
|
||||
|
||||
'phpRecommendations' => array(
|
||||
'GD',
|
||||
'IMAP',
|
||||
'zip',
|
||||
'gd',
|
||||
'mbstring',
|
||||
'imap',
|
||||
'max_execution_time' => 180,
|
||||
'max_input_time' => 180,
|
||||
'memory_limit' => '256M',
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
"Enable mod_rewrite in Apache server": "Aktivieren Sie mod_rewrite am Apache Server",
|
||||
"checkWritable error": "checkWritable Fehler",
|
||||
"applySett error": "applySett Fehler",
|
||||
"buildDatabse error": "buildDatabse Fehler",
|
||||
"buildDatabase error": "buildDatabase Fehler",
|
||||
"createUser error": "createUser Fehler",
|
||||
"checkAjaxPermission error": "checkAjaxPermission Fehler",
|
||||
"Ajax failed": "Ajax fehlgeschlagen",
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
"Enable mod_rewrite in Apache server": "Enable mod_rewrite in Apache server",
|
||||
"checkWritable error": "checkWritable error",
|
||||
"applySett error": "applySett error",
|
||||
"buildDatabse error": "buildDatabse error",
|
||||
"buildDatabase error": "buildDatabase error",
|
||||
"createUser error": "createUser error",
|
||||
"checkAjaxPermission error": "checkAjaxPermission error",
|
||||
"Ajax failed": "Ajax failed",
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
"Enable mod_rewrite in Apache server": "Activar mod_rewrite en servidor Apache",
|
||||
"checkWritable error": "checkWritable error",
|
||||
"applySett error": "applySett error",
|
||||
"buildDatabse error": "buildDatabse error",
|
||||
"buildDatabase error": "buildDatabase error",
|
||||
"createUser error": "createUser error",
|
||||
"checkAjaxPermission error": "checkAjaxPermission error",
|
||||
"Ajax failed": "Ajax failed",
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
"Enable mod_rewrite in Apache server": "Activer mod_rewrite sur le serveur Apache",
|
||||
"checkWritable error": "erreur de vérification d'écriture",
|
||||
"applySett error": "Erreur applySett",
|
||||
"buildDatabse error": "Erreur dans la construction de la base de donnée",
|
||||
"buildDatabase error": "Erreur dans la construction de la base de donnée",
|
||||
"createUser error": "Erreur dans la création de l'utilisateur",
|
||||
"checkAjaxPermission error": "Erreur checkAjaxPermission",
|
||||
"Ajax failed": "Ajax a échoué",
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
"Enable mod_rewrite in Apache server": "Activeer mod_rewrite in Apache server",
|
||||
"checkWritable error": "Controleer schrijf fout",
|
||||
"applySett error": "Instellings fout",
|
||||
"buildDatabse error": "Database maken fout",
|
||||
"buildDatabase error": "Database maken fout",
|
||||
"createUser error": "Fout in aanmaken gebruiker",
|
||||
"checkAjaxPermission error": "Ajax Permissie fout",
|
||||
"Ajax failed": "Ajax weigerd",
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
"Enable mod_rewrite in Apache server": "Włącz mod_rewrite na serwerze Apache",
|
||||
"checkWritable error": "Sprawdź zapisane błędy",
|
||||
"applySett error": "Akceptuj ustawienia błędów",
|
||||
"buildDatabse error": "buildDatabse error",
|
||||
"buildDatabase error": "buildDatabase error",
|
||||
"createUser error": "createUser error",
|
||||
"checkAjaxPermission error": "checkAjaxPermission error",
|
||||
"Ajax failed": "Błąd AJAX",
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
"Enable mod_rewrite in Apache server": "Enable mod_rewrite in Apache server",
|
||||
"checkWritable error": "checkWritable error",
|
||||
"applySett error": "applySett error",
|
||||
"buildDatabse error": "buildDatabse error",
|
||||
"buildDatabase error": "buildDatabase error",
|
||||
"createUser error": "createUser error",
|
||||
"checkAjaxPermission error": "checkAjaxPermission error",
|
||||
"Ajax failed": "Ajax failed",
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
"Enable mod_rewrite in Apache server": "Activeaza mod_rewrite in server-ul Apache",
|
||||
"checkWritable error": "Eroare la verificarea drepturilor de scriere",
|
||||
"applySett error": "Eroare la aplicarea setarilor",
|
||||
"buildDatabse error": "Eroare la crearea Bazei de Date",
|
||||
"buildDatabase error": "Eroare la crearea Bazei de Date",
|
||||
"createUser error": "Eroare la crearea utilizatorului",
|
||||
"checkAjaxPermission error": "Eroare la verificarea permisiunilor Ajax",
|
||||
"Ajax failed": "Ajax nu a reusit",
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
"Enable mod_rewrite in Apache server": "Подключите модуль mod_rewrite к серверу Apache",
|
||||
"checkWritable error": "ошибка checkWritable",
|
||||
"applySett error": "ошибка applySett",
|
||||
"buildDatabse error": "ошибка buildDatabse",
|
||||
"buildDatabase error": "ошибка buildDatabase",
|
||||
"createUser error": "ошибка createUser",
|
||||
"checkAjaxPermission error": "ошибка checkAjaxPermission",
|
||||
"Ajax failed": "Сбой Ajax",
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
"Enable mod_rewrite in Apache server": "Mod_rewrite ı Apache sunucusunda etkinleştirin",
|
||||
"checkWritable error": "checkWritable hatası",
|
||||
"applySett error": "applySett hatası",
|
||||
"buildDatabse error": "buildDatabse hatası",
|
||||
"buildDatabase error": "buildDatabase hatası",
|
||||
"createUser error": "createUser hatası",
|
||||
"checkAjaxPermission error": "checkAjaxPermission hatası",
|
||||
"Ajax failed": "Ajax çalışmıyor",
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
"Enable mod_rewrite in Apache server": "Увімкнути mod_rewrite в Apache сервер",
|
||||
"checkWritable error": "checkWritable помилка",
|
||||
"applySett error": "applySett помилка",
|
||||
"buildDatabse error": "buildDatabse помилка",
|
||||
"buildDatabase error": "buildDatabase помилка",
|
||||
"createUser error": "createUser помилка",
|
||||
"checkAjaxPermission error": "checkAjaxPermission помилка",
|
||||
"Ajax failed": "Ajax провалився",
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
"Enable mod_rewrite in Apache server": "Bật mod_rewrite trong Apache",
|
||||
"checkWritable error": "Lỗi checkWritable",
|
||||
"applySett error": "Lỗi applySett",
|
||||
"buildDatabse error": "Lỗi buildDatabse",
|
||||
"buildDatabase error": "Lỗi buildDatabase",
|
||||
"createUser error": "Lỗi createUser",
|
||||
"checkAjaxPermission error": "Lỗi checkAjaxPermission",
|
||||
"Ajax failed": "Lỗi Ajax",
|
||||
|
||||
+2
-2
@@ -33,7 +33,7 @@ require_once('../bootstrap.php');
|
||||
//action
|
||||
$action = (!empty($_POST['action']))? $_POST['action'] : 'main';
|
||||
require_once('core/Utils.php');
|
||||
if (!Utils::isActionExists($action)) {
|
||||
if (!Utils::checkActionExists($action)) {
|
||||
die('This page does not exist.');
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ $smarty->assign('action', ucfirst($action));
|
||||
/** config */
|
||||
$smarty->assign('config', $config);
|
||||
|
||||
if (Utils::isActionExists($action)) {
|
||||
if (Utils::checkActionExists($action)) {
|
||||
include $actionFile;
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ var InstallScript = function(opt) {
|
||||
'break': true
|
||||
},
|
||||
{
|
||||
'action': 'buildDatabse',
|
||||
'action': 'buildDatabase',
|
||||
'break': true
|
||||
}/*,
|
||||
{
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "espocrm",
|
||||
"version": "4.0.3",
|
||||
"version": "4.0.4",
|
||||
"description": "",
|
||||
"main": "index.php",
|
||||
"repository": {
|
||||
|
||||
Reference in New Issue
Block a user