Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e2deaf57dd | |||
| 0530d9deb8 | |||
| b57ccf0c6a | |||
| 9ea9cf693d | |||
| 3460931fba | |||
| b743d113cc | |||
| f810371e70 | |||
| bc525f3047 | |||
| 6809181adf | |||
| 2c71a28421 | |||
| 82162e4fe6 | |||
| 03454bc309 | |||
| d975501f29 | |||
| 761356adda | |||
| 824835a28c | |||
| 252ce15973 | |||
| 7f25dba917 | |||
| b5d4b8aa5a | |||
| 39a136295a | |||
| 6d674c007e |
@@ -5,8 +5,8 @@
|
||||
<rewrite>
|
||||
<rules>
|
||||
<rule name="rule 1G" stopProcessing="true">
|
||||
<match url="^" />
|
||||
<action type="Rewrite" url="index.php" appendQueryString="true" />
|
||||
<match url="^" />
|
||||
<action type="Rewrite" url="index.php" appendQueryString="true" />
|
||||
</rule>
|
||||
</rules>
|
||||
</rewrite>
|
||||
@@ -175,7 +175,7 @@ class Table
|
||||
public function getLevel($scope, $action)
|
||||
{
|
||||
if (isset($this->data->table->$scope)) {
|
||||
if (isset($this->table->$scope->$action)) {
|
||||
if (isset($this->data->table->$scope->$action)) {
|
||||
return $this->data->table->$scope->$action;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ class Application extends \Espo\Core\Application
|
||||
throw new Error("Portal id was not passed to ApplicationPortal.");
|
||||
}
|
||||
|
||||
$GLOBALS['log'] = $this->getContainer()->get('log');
|
||||
|
||||
$portal = $this->getContainer()->get('entityManager')->getEntity('Portal', $portalId);
|
||||
|
||||
if (!$portal) {
|
||||
@@ -58,8 +60,6 @@ class Application extends \Espo\Core\Application
|
||||
|
||||
$this->getContainer()->setPortal($portal);
|
||||
|
||||
$GLOBALS['log'] = $this->getContainer()->get('log');
|
||||
|
||||
$this->initAutoloads();
|
||||
}
|
||||
|
||||
|
||||
@@ -277,7 +277,7 @@ class Base
|
||||
|
||||
$foreignEntity = $defs['entity'];
|
||||
if (empty($foreignEntity)) {
|
||||
continue;
|
||||
return;
|
||||
}
|
||||
|
||||
$pathName = lcfirst($query->sanitize($foreignEntity . 'Path'));
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ namespace Espo\Core\Utils\Database\DBAL\FieldTypes;
|
||||
|
||||
use Doctrine\DBAL\Types\BooleanType;
|
||||
|
||||
class Bool extends BooleanType
|
||||
class BoolType extends BooleanType
|
||||
{
|
||||
const BOOL = 'bool';
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ namespace Espo\Core\Utils\Database\DBAL\FieldTypes;
|
||||
|
||||
use Doctrine\DBAL\Types\IntegerType;
|
||||
|
||||
class Int extends IntegerType
|
||||
class IntType extends IntegerType
|
||||
{
|
||||
const INTtype = 'int';
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
|
||||
namespace Espo\Core\Utils\Database\DBAL\FieldTypes;
|
||||
|
||||
class JsonArray extends \Doctrine\DBAL\Types\JsonArrayType
|
||||
class JsonArrayType extends \Doctrine\DBAL\Types\JsonArrayType
|
||||
{
|
||||
const JSON_ARRAY = 'jsonArray';
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
|
||||
namespace Espo\Core\Utils\Database\DBAL\FieldTypes;
|
||||
|
||||
class JsonObject extends \Doctrine\DBAL\Types\ObjectType
|
||||
class JsonObjectType extends \Doctrine\DBAL\Types\ObjectType
|
||||
{
|
||||
const JSON_OBJECT = 'jsonObject';
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ namespace Espo\Core\Utils\Database\DBAL\FieldTypes;
|
||||
|
||||
use Doctrine\DBAL\Types\StringType;
|
||||
|
||||
class Password extends StringType
|
||||
class PasswordType extends StringType
|
||||
{
|
||||
const PASSWORD = 'password';
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ namespace Espo\Core\Utils\Database\DBAL\FieldTypes;
|
||||
|
||||
use Doctrine\DBAL\Types\StringType;
|
||||
|
||||
class Varchar extends StringType
|
||||
class VarcharType extends StringType
|
||||
{
|
||||
const VARCHAR = 'varchar';
|
||||
|
||||
@@ -161,11 +161,11 @@ class Schema
|
||||
|
||||
$typeList = $this->getFileManager()->getFileList($path, false, '\.php$');
|
||||
if ($typeList !== false) {
|
||||
foreach($typeList as $name) {
|
||||
$typeName = preg_replace('/\.php$/i', '', $name);
|
||||
foreach ($typeList as $name) {
|
||||
$typeName = preg_replace('/Type\.php$/i', '', $name);
|
||||
$dbalTypeName = strtolower($typeName);
|
||||
|
||||
$filePath = Util::concatPath($path, $typeName);
|
||||
$filePath = Util::concatPath($path, $typeName . 'Type');
|
||||
$class = Util::getClassName($filePath);
|
||||
|
||||
if( ! Type::hasType($dbalTypeName) ) {
|
||||
|
||||
@@ -308,7 +308,7 @@ class Metadata
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function delete($key1, $key2, $unsets)
|
||||
public function delete($key1, $key2, $unsets = null)
|
||||
{
|
||||
if (!is_array($unsets)) {
|
||||
$unsets = (array) $unsets;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Modules\Crm\Controllers;
|
||||
|
||||
@@ -43,10 +43,10 @@ class Opportunity extends \Espo\Core\Controllers\Record
|
||||
|
||||
$dateFrom = $request->get('dateFrom');
|
||||
$dateTo = $request->get('dateTo');
|
||||
|
||||
|
||||
return $this->getService('Opportunity')->reportByLeadSource($dateFrom, $dateTo);
|
||||
}
|
||||
|
||||
|
||||
public function actionReportByStage($params, $data, $request)
|
||||
{
|
||||
$level = $this->getAcl()->getLevel('Opportunity', 'read');
|
||||
@@ -56,10 +56,10 @@ class Opportunity extends \Espo\Core\Controllers\Record
|
||||
|
||||
$dateFrom = $request->get('dateFrom');
|
||||
$dateTo = $request->get('dateTo');
|
||||
|
||||
|
||||
return $this->getService('Opportunity')->reportByStage($dateFrom, $dateTo);
|
||||
}
|
||||
|
||||
|
||||
public function actionReportSalesByMonth($params, $data, $request)
|
||||
{
|
||||
$level = $this->getAcl()->getLevel('Opportunity', 'read');
|
||||
@@ -69,10 +69,10 @@ class Opportunity extends \Espo\Core\Controllers\Record
|
||||
|
||||
$dateFrom = $request->get('dateFrom');
|
||||
$dateTo = $request->get('dateTo');
|
||||
|
||||
return $this->getService('Opportunity')->reportSalesByMonth($dateFrom, $dateTo);
|
||||
|
||||
return $this->getService('Opportunity')->reportSalesByMonth($dateFrom, $dateTo);
|
||||
}
|
||||
|
||||
|
||||
public function actionReportSalesPipeline($params, $data, $request)
|
||||
{
|
||||
$level = $this->getAcl()->getLevel('Opportunity', 'read');
|
||||
@@ -82,7 +82,7 @@ class Opportunity extends \Espo\Core\Controllers\Record
|
||||
|
||||
$dateFrom = $request->get('dateFrom');
|
||||
$dateTo = $request->get('dateTo');
|
||||
|
||||
|
||||
return $this->getService('Opportunity')->reportSalesPipeline($dateFrom, $dateTo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ use Espo\ORM\Entity;
|
||||
|
||||
class Account extends \Espo\Core\ORM\Repositories\RDB
|
||||
{
|
||||
public function afterSave(Entity $entity, array $options)
|
||||
public function afterSave(Entity $entity, array $options = array())
|
||||
{
|
||||
parent::afterSave($entity, $options);
|
||||
|
||||
|
||||
@@ -33,14 +33,14 @@ use Espo\ORM\Entity;
|
||||
|
||||
class CaseObj extends \Espo\Core\ORM\Repositories\RDB
|
||||
{
|
||||
public function afterSave(Entity $entity, array $options)
|
||||
public function afterSave(Entity $entity, array $options = array())
|
||||
{
|
||||
$result = parent::afterSave($entity, $options);
|
||||
$this->handleAfterSaveContacts($entity, $options);
|
||||
return $result;
|
||||
}
|
||||
|
||||
protected function handleAfterSaveContacts(Entity $entity, array $options)
|
||||
protected function handleAfterSaveContacts(Entity $entity, array $options = array())
|
||||
{
|
||||
$contactIdChanged = $entity->has('contactId') && $entity->get('contactId') != $entity->getFetched('contactId');
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class Contact extends \Espo\Core\ORM\Repositories\RDB
|
||||
";
|
||||
}
|
||||
|
||||
public function afterSave(Entity $entity, array $options)
|
||||
public function afterSave(Entity $entity, array $options = array())
|
||||
{
|
||||
$result = parent::afterSave($entity, $options);
|
||||
$this->handleAfterSaveAccounts($entity, $options);
|
||||
@@ -59,7 +59,7 @@ class Contact extends \Espo\Core\ORM\Repositories\RDB
|
||||
return $result;
|
||||
}
|
||||
|
||||
protected function handleAfterSaveAccounts(Entity $entity, array $options)
|
||||
protected function handleAfterSaveAccounts(Entity $entity, array $options = array())
|
||||
{
|
||||
$accountIdChanged = $entity->has('accountId') && $entity->get('accountId') != $entity->getFetched('accountId');
|
||||
$titleChanged = $entity->has('title') && $entity->get('title') != $entity->getFetched('title');
|
||||
|
||||
@@ -33,7 +33,7 @@ use Espo\ORM\Entity;
|
||||
|
||||
class Lead extends \Espo\Core\ORM\Repositories\RDB
|
||||
{
|
||||
public function afterSave(Entity $entity, array $options)
|
||||
public function afterSave(Entity $entity, array $options = array())
|
||||
{
|
||||
parent::afterSave($entity, $options);
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ use Espo\ORM\Entity;
|
||||
|
||||
class Meeting extends \Espo\Core\ORM\Repositories\RDB
|
||||
{
|
||||
protected function beforeSave(Entity $entity, array $options)
|
||||
protected function beforeSave(Entity $entity, array $options = array())
|
||||
{
|
||||
parent::beforeSave($entity, $options);
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ use Espo\ORM\Entity;
|
||||
|
||||
class Opportunity extends \Espo\Core\ORM\Repositories\RDB
|
||||
{
|
||||
public function beforeSave(Entity $entity, array $options)
|
||||
public function beforeSave(Entity $entity, array $options = array())
|
||||
{
|
||||
parent::beforeSave($entity, $options);
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
{
|
||||
"name":"activities",
|
||||
"label":"Activities",
|
||||
"view":"crm:views/record/panels/activities",
|
||||
"view":"crm:views/case/record/panels/activities",
|
||||
"aclScope": "Activities"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"layouts": true,
|
||||
"tab": true,
|
||||
"acl": true,
|
||||
"aclPortal": "recordAllAccountOwnNo",
|
||||
"aclPortal": "recordAllAccountNo",
|
||||
"module": "Crm",
|
||||
"customizable": true,
|
||||
"stream": true,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"layouts":true,
|
||||
"tab":true,
|
||||
"acl":true,
|
||||
"aclPortal": "recordAllAccountContactOwnNo",
|
||||
"aclPortal": "recordAllAccountContactNo",
|
||||
"module":"Crm",
|
||||
"customizable": true,
|
||||
"stream": true,
|
||||
|
||||
@@ -52,5 +52,22 @@ class Account extends \Espo\Core\SelectManagers\Base
|
||||
);
|
||||
}
|
||||
|
||||
protected function accessPortalOnlyAccount(&$result)
|
||||
{
|
||||
$d = array();
|
||||
|
||||
$accountIdList = $this->getUser()->getLinkMultipleIdList('accounts');
|
||||
|
||||
if (count($accountIdList)) {
|
||||
$result['whereClause'][] = array(
|
||||
'id' => $accountIdList
|
||||
);
|
||||
} else {
|
||||
$result['whereClause'][] = array(
|
||||
'id' => null
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -44,5 +44,22 @@ class Contact extends \Espo\Core\SelectManagers\Base
|
||||
), $result);
|
||||
}
|
||||
|
||||
protected function accessPortalOnlyContact(&$result)
|
||||
{
|
||||
$d = array();
|
||||
|
||||
$contactId = $this->getUser()->get('contactId');
|
||||
|
||||
if ($contactId) {
|
||||
$result['whereClause'][] = array(
|
||||
'id' => $contactId
|
||||
);
|
||||
} else {
|
||||
$result['whereClause'][] = array(
|
||||
'id' => null
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ class Account extends \Espo\Services\Record
|
||||
'targetLists'
|
||||
];
|
||||
|
||||
protected function getDuplicateWhereClause(Entity $entity)
|
||||
protected function getDuplicateWhereClause(Entity $entity, $data = array())
|
||||
{
|
||||
return array(
|
||||
'name' => $entity->get('name')
|
||||
|
||||
@@ -33,7 +33,7 @@ use \Espo\ORM\Entity;
|
||||
|
||||
class Campaign extends \Espo\Services\Record
|
||||
{
|
||||
public function loadAdditionalFields($entity)
|
||||
public function loadAdditionalFields(Entity $entity)
|
||||
{
|
||||
parent::loadAdditionalFields($entity);
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ class CaseObj extends \Espo\Services\Record
|
||||
'inboundEmailId'
|
||||
];
|
||||
|
||||
public function afterCreate($entity, array $data)
|
||||
public function afterCreate($entity, array $data = array())
|
||||
{
|
||||
parent::afterCreate($entity, $data);
|
||||
if (!empty($data['emailId'])) {
|
||||
|
||||
@@ -42,7 +42,7 @@ class Contact extends \Espo\Services\Record
|
||||
'portalUserId'
|
||||
];
|
||||
|
||||
protected function getDuplicateWhereClause(Entity $entity)
|
||||
protected function getDuplicateWhereClause(Entity $entity, $data = array())
|
||||
{
|
||||
$data = array(
|
||||
'OR' => array(
|
||||
@@ -61,7 +61,7 @@ class Contact extends \Espo\Services\Record
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function afterCreate($entity, array $data)
|
||||
public function afterCreate($entity, array $data = array())
|
||||
{
|
||||
parent::afterCreate($entity, $data);
|
||||
if (!empty($data['emailId'])) {
|
||||
|
||||
@@ -44,7 +44,7 @@ class Lead extends \Espo\Services\Record
|
||||
'targetLists'
|
||||
];
|
||||
|
||||
protected function getDuplicateWhereClause(Entity $entity)
|
||||
protected function getDuplicateWhereClause(Entity $entity, $data = array())
|
||||
{
|
||||
$data = array(
|
||||
'OR' => array(
|
||||
@@ -63,7 +63,7 @@ class Lead extends \Espo\Services\Record
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function afterCreate($entity, array $data)
|
||||
public function afterCreate($entity, array $data, $data = array())
|
||||
{
|
||||
parent::afterCreate($entity, $data);
|
||||
if (!empty($data['emailId'])) {
|
||||
|
||||
@@ -445,7 +445,7 @@ class MassEmail extends \Espo\Services\Record
|
||||
$this->getMailSender()->useGlobal()->send($email, $params, $message, $attachmentList);
|
||||
|
||||
$emailObject = $emailTemplate;
|
||||
if ($massEmail->get('storeSentEmails')) {
|
||||
if ($massEmail->get('storeSentEmails') && !$isTest) {
|
||||
$this->getEntityManager()->saveEntity($email);
|
||||
$emailObject = $email;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ class Portal extends \Espo\Core\ORM\Repositories\RDB
|
||||
return $this->getInjection('config');
|
||||
}
|
||||
|
||||
protected function afterSave(Entity $entity, array $options)
|
||||
protected function afterSave(Entity $entity, array $options = array())
|
||||
{
|
||||
parent::afterSave($entity, $options);
|
||||
|
||||
|
||||
@@ -29,13 +29,13 @@
|
||||
|
||||
namespace Espo\Repositories;
|
||||
|
||||
use Espo\ORM\Entity;
|
||||
use \Espo\ORM\Entity;
|
||||
|
||||
use \Espo\Core\Exceptions\Error;
|
||||
|
||||
class User extends \Espo\Core\ORM\Repositories\RDB
|
||||
{
|
||||
protected function beforeSave(Entity $entity, array $options)
|
||||
protected function beforeSave(Entity $entity, array $options = array())
|
||||
{
|
||||
parent::beforeSave($entity, $options);
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ class Email extends Record
|
||||
return $entity;
|
||||
}
|
||||
|
||||
protected function afterUpdate(Entity $entity)
|
||||
protected function afterUpdate(Entity $entity, array $data = array())
|
||||
{
|
||||
if ($entity && $entity->get('status') == 'Sending') {
|
||||
$this->send($entity);
|
||||
|
||||
@@ -176,6 +176,15 @@ class EmailTemplate extends Record
|
||||
|
||||
if ($fieldType === 'enum') {
|
||||
$value = $this->getLanguage()->translateOption($value, $field, $entity->getEntityType());
|
||||
} else if ($fieldType === 'array' || $fieldType === 'multiEnum') {
|
||||
$valueList = [];
|
||||
if (is_array($value)) {
|
||||
foreach ($value as $v) {
|
||||
$valueList[] = $this->getLanguage()->translateOption($v, $field, $entity->getEntityType());
|
||||
}
|
||||
}
|
||||
$value = implode(', ', $valueList);
|
||||
$value = $this->getLanguage()->translateOption($value, $field, $entity->getEntityType());
|
||||
} else {
|
||||
if ($entity->fields[$field]['type'] == 'date') {
|
||||
$value = $this->getDateTime()->convertSystemDate($value);
|
||||
|
||||
@@ -421,6 +421,7 @@ class InboundEmail extends \Espo\Services\Record
|
||||
|
||||
if ($user) {
|
||||
$case->set('assignedUserId', $user->id);
|
||||
$case->set('status', 'Assigned');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -437,6 +438,7 @@ class InboundEmail extends \Espo\Services\Record
|
||||
|
||||
if ($user) {
|
||||
$case->set('assignedUserId', $user->id);
|
||||
$case->set('status', 'Assigned');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -468,19 +470,17 @@ class InboundEmail extends \Espo\Services\Record
|
||||
$caseDistribution = $params['caseDistribution'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
$targetUserPosition = null;
|
||||
if (!empty($params['targetUserPosition'])) {
|
||||
$targetUserPosition = $params['targetUserPosition'];
|
||||
}
|
||||
|
||||
$case->set('status', 'Assigned');
|
||||
|
||||
switch ($caseDistribution) {
|
||||
case 'Direct-Assignment':
|
||||
if ($userId) {
|
||||
$case->set('assignedUserId', $userId);
|
||||
$case->set('status', 'Assigned');
|
||||
}
|
||||
break;
|
||||
case 'Round-Robin':
|
||||
|
||||
@@ -38,13 +38,13 @@ class PortalRole extends Record
|
||||
$this->dependencies[] = 'fileManager';
|
||||
}
|
||||
|
||||
public function afterCreate(Entity $entity, array $data)
|
||||
public function afterCreate(Entity $entity, array $data = array())
|
||||
{
|
||||
parent::afterCreate($entity, $data);
|
||||
$this->clearRolesCache();
|
||||
}
|
||||
|
||||
public function afterUpdate(Entity $entity, array $data)
|
||||
public function afterUpdate(Entity $entity, array $data = array())
|
||||
{
|
||||
parent::afterUpdate($entity, $data);
|
||||
$this->clearRolesCache();
|
||||
|
||||
@@ -38,13 +38,13 @@ class Role extends Record
|
||||
$this->dependencies[] = 'fileManager';
|
||||
}
|
||||
|
||||
public function afterCreate(Entity $entity, array $data)
|
||||
public function afterCreate(Entity $entity, array $data = array())
|
||||
{
|
||||
parent::afterCreate($entity, $data);
|
||||
$this->clearRolesCache();
|
||||
}
|
||||
|
||||
public function afterUpdate(Entity $entity, array $data)
|
||||
public function afterUpdate(Entity $entity, array $data = array())
|
||||
{
|
||||
parent::afterUpdate($entity, $data);
|
||||
$this->clearRolesCache();
|
||||
|
||||
@@ -419,7 +419,7 @@ class User extends Record
|
||||
return parent::deleteEntity($id);
|
||||
}
|
||||
|
||||
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) || array_key_exists('teamsIds', $data)) {
|
||||
|
||||
@@ -24,31 +24,31 @@
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
Espo.define('Crm:Views.Case.Record.Panels.Activities', 'Crm:Views.Record.Panels.Activities', function (Dep) {
|
||||
Espo.define('crm:views/case/record/panels/activities', 'crm:views/record/panels/activities', function (Dep) {
|
||||
|
||||
return Dep.extend({
|
||||
|
||||
|
||||
getComposeEmailAttributes: function (data, callback) {
|
||||
data = data || {};
|
||||
var attributes = {
|
||||
status: 'Draft',
|
||||
name: '[#' + this.model.get('number') + '] ' + this.model.get('name')
|
||||
};
|
||||
|
||||
|
||||
if (this.model.get('contactId')) {
|
||||
this.getModelFactory().create('Contact', function (contact) {
|
||||
contact.id = this.model.get('contactId');
|
||||
|
||||
|
||||
this.listenToOnce(contact, 'sync', function () {
|
||||
var emailAddress = contact.get('emailAddress');
|
||||
var emailAddress = contact.get('emailAddress');
|
||||
if (emailAddress) {
|
||||
attributes.to = emailAddress;
|
||||
}
|
||||
|
||||
|
||||
callback.call(this, attributes);
|
||||
});
|
||||
});
|
||||
contact.fetch({
|
||||
error: function () {
|
||||
callback.call(this, attributes);
|
||||
@@ -58,8 +58,7 @@ Espo.define('Crm:Views.Case.Record.Panels.Activities', 'Crm:Views.Record.Panels.
|
||||
} else {
|
||||
callback.call(this, attributes);
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ Espo.define('crm:views/target-list/record/panels/relationship', 'views/record/pa
|
||||
|
||||
return Dep.extend({
|
||||
|
||||
fetchOnModelAfterRelate: true,
|
||||
|
||||
actionOptOut: function (data) {
|
||||
if (confirm(this.translate('confirmation', 'messages'))) {
|
||||
$.ajax({
|
||||
|
||||
@@ -43,11 +43,12 @@ Espo.define('views/email-template/record/detail', 'views/record/detail', functio
|
||||
this.listenTo(fieldView, 'insert-field', function (o) {
|
||||
var tag = '{' + o.entityType + '.' + o.field + '}';
|
||||
|
||||
$body = this.$el.find('[name="body"]');
|
||||
var bodyView = this.getFieldView('body');
|
||||
|
||||
if (this.model.get('isHtml')) {
|
||||
$body.summernote('insertText', tag);
|
||||
bodyView.$summernote.summernote('insertText', tag);
|
||||
} else {
|
||||
var $body = bodyView.$element;
|
||||
var text = $body.val();
|
||||
text += tag;
|
||||
$body.val(text);
|
||||
|
||||
@@ -40,6 +40,8 @@ Espo.define('views/record/panels/relationship', ['views/record/panels/bottom', '
|
||||
|
||||
readOnly: false,
|
||||
|
||||
fetchOnModelAfterRelate: false,
|
||||
|
||||
init: function () {
|
||||
Dep.prototype.init.call(this);
|
||||
},
|
||||
@@ -138,6 +140,12 @@ Espo.define('views/record/panels/relationship', ['views/record/panels/bottom', '
|
||||
|
||||
this.setFilter(this.filter);
|
||||
|
||||
if (this.fetchOnModelAfterRelate) {
|
||||
this.listenToOnce(this.model, 'after:relate', function () {
|
||||
collection.fetch();
|
||||
}, this);
|
||||
}
|
||||
|
||||
var viewName = this.defs.recordListView || this.getMetadata().get('clientDefs.' + this.scope + '.recordViews.list') || 'Record.List';
|
||||
|
||||
this.once('after:render', function () {
|
||||
|
||||
@@ -34,6 +34,13 @@ Espo.define('views/stream/notes/mention-in-post', 'views/stream/note', function
|
||||
|
||||
messageName: 'mentionInPost',
|
||||
|
||||
data: function () {
|
||||
var data = Dep.prototype.data.call(this);
|
||||
data.showAttachments = !!(this.model.get('attachmentsIds') || []).length;
|
||||
data.showPost = !!this.model.get('post');
|
||||
return data;
|
||||
},
|
||||
|
||||
setup: function () {
|
||||
if (this.model.get('post')) {
|
||||
this.createField('post', null, null, 'views/stream/fields/post');
|
||||
|
||||
Generated
+28
-18
@@ -506,48 +506,59 @@
|
||||
},
|
||||
{
|
||||
"name": "monolog/monolog",
|
||||
"version": "1.7.0",
|
||||
"version": "1.17.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Seldaek/monolog.git",
|
||||
"reference": "6225b22de9dcf36546be3a0b2fa8e3d986153f57"
|
||||
"reference": "bee7f0dc9c3e0b69a6039697533dca1e845c8c24"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/6225b22de9dcf36546be3a0b2fa8e3d986153f57",
|
||||
"reference": "6225b22de9dcf36546be3a0b2fa8e3d986153f57",
|
||||
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/bee7f0dc9c3e0b69a6039697533dca1e845c8c24",
|
||||
"reference": "bee7f0dc9c3e0b69a6039697533dca1e845c8c24",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0",
|
||||
"psr/log": "~1.0"
|
||||
},
|
||||
"provide": {
|
||||
"psr/log-implementation": "1.0.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"aws/aws-sdk-php": "~2.4.8",
|
||||
"doctrine/couchdb": "dev-master",
|
||||
"mlehner/gelf-php": "1.0.*",
|
||||
"phpunit/phpunit": "~3.7.0",
|
||||
"raven/raven": "0.5.*",
|
||||
"ruflin/elastica": "0.90.*"
|
||||
"aws/aws-sdk-php": "^2.4.9",
|
||||
"doctrine/couchdb": "~1.0@dev",
|
||||
"graylog2/gelf-php": "~1.0",
|
||||
"jakub-onderka/php-parallel-lint": "0.9",
|
||||
"php-console/php-console": "^3.1.3",
|
||||
"phpunit/phpunit": "~4.5",
|
||||
"phpunit/phpunit-mock-objects": "2.3.0",
|
||||
"raven/raven": "^0.13",
|
||||
"ruflin/elastica": ">=0.90 <3.0",
|
||||
"swiftmailer/swiftmailer": "~5.3",
|
||||
"videlalvaro/php-amqplib": "~2.4"
|
||||
},
|
||||
"suggest": {
|
||||
"aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
|
||||
"doctrine/couchdb": "Allow sending log messages to a CouchDB server",
|
||||
"ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
|
||||
"ext-mongo": "Allow sending log messages to a MongoDB server",
|
||||
"mlehner/gelf-php": "Allow sending log messages to a GrayLog2 server",
|
||||
"graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
|
||||
"php-console/php-console": "Allow sending log messages to Google Chrome",
|
||||
"raven/raven": "Allow sending log messages to a Sentry server",
|
||||
"ruflin/elastica": "Allow sending log messages to an Elastic Search server"
|
||||
"rollbar/rollbar": "Allow sending log messages to Rollbar",
|
||||
"ruflin/elastica": "Allow sending log messages to an Elastic Search server",
|
||||
"videlalvaro/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.7.x-dev"
|
||||
"dev-master": "1.16.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Monolog": "src/"
|
||||
"psr-4": {
|
||||
"Monolog\\": "src/Monolog"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
@@ -558,8 +569,7 @@
|
||||
{
|
||||
"name": "Jordi Boggiano",
|
||||
"email": "j.boggiano@seld.be",
|
||||
"homepage": "http://seld.be",
|
||||
"role": "Developer"
|
||||
"homepage": "http://seld.be"
|
||||
}
|
||||
],
|
||||
"description": "Sends your logs to files, sockets, inboxes, databases and various web services",
|
||||
@@ -569,7 +579,7 @@
|
||||
"logging",
|
||||
"psr-3"
|
||||
],
|
||||
"time": "2013-11-14 19:48:31"
|
||||
"time": "2015-10-14 12:51:02"
|
||||
},
|
||||
{
|
||||
"name": "mtdowling/cron-expression",
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
id: '{{portalId}}',
|
||||
useCache: false,
|
||||
cacheTimestamp: {{cacheTimestamp}},
|
||||
url: 'api/v1/portal/{{portalId}}',
|
||||
url: 'api/v1/portal-access/{{portalId}}',
|
||||
basePath: '{{basePath}}'
|
||||
}, function (app) {
|
||||
{{runScript}}
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
id: '{{portalId}}',
|
||||
useCache: {{useCache}},
|
||||
cacheTimestamp: {{cacheTimestamp}},
|
||||
url: 'api/v1/portal/{{portalId}}',
|
||||
url: 'api/v1/portal-access/{{portalId}}',
|
||||
basePath: '{{basePath}}'
|
||||
}, function (app) {
|
||||
{{runScript}}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "espocrm",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.2",
|
||||
"description": "",
|
||||
"main": "index.php",
|
||||
"repository": {
|
||||
|
||||
Reference in New Issue
Block a user