diff --git a/application/Espo/Core/Upgrades/Actions/Base.php b/application/Espo/Core/Upgrades/Actions/Base.php
index 47530373c5..55e04f0fe8 100644
--- a/application/Espo/Core/Upgrades/Actions/Base.php
+++ b/application/Espo/Core/Upgrades/Actions/Base.php
@@ -631,7 +631,13 @@ abstract class Base
protected function systemRebuild()
{
- return $this->getContainer()->get('dataManager')->rebuild();
+ try {
+ return $this->getContainer()->get('dataManager')->rebuild();
+ } catch (\Exception $e) {
+ $GLOBALS['log']->error('Database rebuild failure, details: '.$e->getMessage().'.');
+ }
+
+ return false;
}
/**
diff --git a/application/Espo/Core/Utils/Database/DBAL/Platforms/MySqlPlatform.php b/application/Espo/Core/Utils/Database/DBAL/Platforms/MySqlPlatform.php
index 6aa7d812f9..19dc3609ba 100644
--- a/application/Espo/Core/Utils/Database/DBAL/Platforms/MySqlPlatform.php
+++ b/application/Espo/Core/Utils/Database/DBAL/Platforms/MySqlPlatform.php
@@ -452,5 +452,17 @@ class MySqlPlatform extends \Doctrine\DBAL\Platforms\MySqlPlatform
return 'MEDIUMTEXT';
}
+
+ public function getColumnDeclarationListSQL(array $fields)
+ {
+ $queryFields = array();
+
+ foreach ($fields as $fieldName => $field) {
+ $quotedFieldName = $this->espoQuote($fieldName);
+ $queryFields[] = $this->getColumnDeclarationSQL($quotedFieldName, $field);
+ }
+
+ return implode(', ', $queryFields);
+ }
//end: ESPO
}
\ No newline at end of file
diff --git a/application/Espo/EntryPoints/Image.php b/application/Espo/EntryPoints/Image.php
index 4d8e52d110..3b7ec020ed 100644
--- a/application/Espo/EntryPoints/Image.php
+++ b/application/Espo/EntryPoints/Image.php
@@ -129,7 +129,7 @@ class Image extends \Espo\Core\EntryPoints\Base
}
if (!empty($size)) {
- $fileName = $sourceId . '_' . $size . '.jpg';
+ $fileName = $size . '-' . $attachment->get('name');
} else {
$fileName = $attachment->get('name');
}
@@ -197,9 +197,10 @@ class Image extends \Espo\Core\EntryPoints\Base
break;
}
- $targetImage = imagerotate($targetImage, array_values([0, 0, 0, 180, 0, 0, -90, 0, 90])[@exif_read_data($filePath)['Orientation'] ?: 0], 0);
+ if (function_exists('exif_read_data')) {
+ $targetImage = imagerotate($targetImage, array_values([0, 0, 0, 180, 0, 0, -90, 0, 90])[@exif_read_data($filePath)['Orientation'] ?: 0], 0);
+ }
return $targetImage;
}
}
-
diff --git a/application/Espo/Modules/Crm/Services/Campaign.php b/application/Espo/Modules/Crm/Services/Campaign.php
index 5bfde37ad5..fa41308208 100644
--- a/application/Espo/Modules/Crm/Services/Campaign.php
+++ b/application/Espo/Modules/Crm/Services/Campaign.php
@@ -139,12 +139,14 @@ class Campaign extends \Espo\Services\Record
$sth = $pdo->prepare($sql);
$sth->execute();
+ $revenue = null;
if ($row = $sth->fetch(\PDO::FETCH_ASSOC)) {
$revenue = floatval($row['SUM:amountConverted']);
- if ($revenue > 0) {
- $entity->set('revenue', $revenue);
+ if (!$revenue) {
+ $revenue = null;
}
}
+ $entity->set('revenue', $revenue);
}
public function logSent($campaignId, $queueItemId = null, Entity $target, Entity $emailOrEmailTemplate = null, $emailAddress, $actionDate = null, $isTest = false)
diff --git a/application/Espo/Resources/metadata/fields/attachmentMultiple.json b/application/Espo/Resources/metadata/fields/attachmentMultiple.json
index 44127549d4..cf425e8a26 100644
--- a/application/Espo/Resources/metadata/fields/attachmentMultiple.json
+++ b/application/Espo/Resources/metadata/fields/attachmentMultiple.json
@@ -15,6 +15,12 @@
"type": "float",
"tooltip": true,
"min": 0
+ },
+ {
+ "name": "previewSize",
+ "type": "enum",
+ "default": "medium",
+ "options": ["", "x-small", "small", "medium", "large"]
}
],
"actualFields":[
diff --git a/application/Espo/Services/EmailFolder.php b/application/Espo/Services/EmailFolder.php
index ecdcd271e0..8d87a64d2e 100644
--- a/application/Espo/Services/EmailFolder.php
+++ b/application/Espo/Services/EmailFolder.php
@@ -109,9 +109,11 @@ class EmailFolder extends Record
public function listAll()
{
+ $limit = $this->getConfig()->get('emailFolderMaxCount', 100);
+
$folderList = $this->getRepository()->where(array(
'assignedUserId' => $this->getUser()->id
- ))->order('order')->limit(0, 20)->find();
+ ))->order('order')->limit(0, $limit)->find();
$list = new \Espo\ORM\EntityCollection();
diff --git a/application/Espo/Services/Notification.php b/application/Espo/Services/Notification.php
index 4416cc003c..0f8259b620 100644
--- a/application/Espo/Services/Notification.php
+++ b/application/Espo/Services/Notification.php
@@ -218,6 +218,7 @@ class Notification extends \Espo\Services\Record
$note->set('relatedName', $related->get('name'));
}
}
+ $note->loadLinkMultipleField('attachments');
$entity->set('noteData', $note->toArray());
} else {
unset($collection[$k]);
diff --git a/client/modules/crm/src/views/case/record/panels/activities.js b/client/modules/crm/src/views/case/record/panels/activities.js
index 7f4db30c00..2a11913d1a 100644
--- a/client/modules/crm/src/views/case/record/panels/activities.js
+++ b/client/modules/crm/src/views/case/record/panels/activities.js
@@ -64,7 +64,7 @@ Espo.define('crm:views/case/record/panels/activities', 'crm:views/record/panels/
}, function () {resolve([])});
}, this);
} else if (parentModel.get('leadId')) {
- this.getModelFactory().create('Lead', function (account) {
+ this.getModelFactory().create('Lead', function (lead) {
lead.id = parentModel.get('leadId');
lead.fetch().then(function () {
resolve([lead]);
diff --git a/client/res/templates/email/fields/icon/detail.tpl b/client/res/templates/email/fields/icon/detail.tpl
index ce183c448c..f0a4d369b9 100644
--- a/client/res/templates/email/fields/icon/detail.tpl
+++ b/client/res/templates/email/fields/icon/detail.tpl
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/client/res/templates/notification/items/email-received.tpl b/client/res/templates/notification/items/email-received.tpl
index 8d8a1db800..4cdeace817 100644
--- a/client/res/templates/notification/items/email-received.tpl
+++ b/client/res/templates/notification/items/email-received.tpl
@@ -4,7 +4,7 @@
{{{avatar}}}
-
+
{{{message}}}
diff --git a/client/src/views/email/detail.js b/client/src/views/email/detail.js
index ceadf59819..ee41421106 100644
--- a/client/src/views/email/detail.js
+++ b/client/src/views/email/detail.js
@@ -267,7 +267,7 @@ Espo.define('views/email/detail', ['views/detail', 'email-helper'], function (De
}
attributes.emailId = this.model.id;
- var viewName = this.getMetadata().get('clientDefs.Contact.modalViews.detail') || 'Modals.Edit';
+ var viewName = this.getMetadata().get('clientDefs.Contact.modalViews.detail') || 'views/modals/edit';
this.notify('Loading...');
this.createView('quickCreate', viewName, {
diff --git a/client/src/views/fields/attachment-multiple.js b/client/src/views/fields/attachment-multiple.js
index 44cc9365e8..7a36e10f86 100644
--- a/client/src/views/fields/attachment-multiple.js
+++ b/client/src/views/fields/attachment-multiple.js
@@ -40,6 +40,8 @@ Espo.define('views/fields/attachment-multiple', 'views/fields/base', function (D
searchTemplate: 'fields/link-multiple/search',
+ previewSize: 'medium',
+
nameHashName: null,
idsName: null,
@@ -155,6 +157,8 @@ Espo.define('views/fields/attachment-multiple', 'views/fields/base', function (D
this.idsName = this.name + 'Ids';
this.foreignScope = 'Attachment';
+ this.previewSize = this.options.previewSize || this.params.previewSize || this.previewSize;
+
var self = this;
this.nameHash = _.clone(this.model.get(this.nameHashName)) || {};
@@ -182,6 +186,12 @@ Espo.define('views/fields/attachment-multiple', 'views/fields/base', function (D
this.listenTo(this.model, 'change:' + this.nameHashName, function () {
this.nameHash = _.clone(this.model.get(this.nameHashName)) || {};
}.bind(this));
+
+ this.once('remove', function () {
+ if (this.resizeIsBeingListened) {
+ $(window).off('resize.' + this.cid);
+ }
+ }.bind(this));
},
setupSearch: function () {
@@ -198,6 +208,11 @@ Espo.define('views/fields/attachment-multiple', 'views/fields/base', function (D
this.$attachments.empty();
},
+ handleResize: function () {
+ var width = this.$el.width();
+ this.$el.find('img.image-preview').css('maxWidth', width + 'px');
+ },
+
deleteAttachment: function (id) {
this.removeId(id);
if (this.model.isNew()) {
@@ -462,6 +477,16 @@ Espo.define('views/fields/attachment-multiple', 'views/fields/base', function (D
var type = this.$el.find('select.search-type').val();
this.handleSearchType(type);
}
+
+ if (this.mode === 'detail') {
+ if (this.previewSize === 'large') {
+ this.handleResize();
+ this.resizeIsBeingListened = true;
+ $(window).on('resize.' + this.cid, function () {
+ this.handleResize();
+ }.bind(this));
+ }
+ }
},
isTypeIsImage: function (type) {
@@ -478,9 +503,8 @@ Espo.define('views/fields/attachment-multiple', 'views/fields/base', function (D
name = Handlebars.Utils.escapeExpression(name);
var preview = name;
-
if (this.isTypeIsImage(type)) {
- preview = '
';
+ preview = '
';
}
return preview;
},
@@ -495,7 +519,13 @@ Espo.define('views/fields/attachment-multiple', 'views/fields/base', function (D
for (var id in nameHash) {
var type = typeHash[id] || false;
var name = nameHash[id];
- if (this.showPreviews && ~this.previewTypeList.indexOf(type) && this.mode !== 'list') {
+ if (
+ this.showPreviews
+ &&
+ ~this.previewTypeList.indexOf(type)
+ &&
+ (this.mode === 'detail' || this.mode === 'list' && this.showPreviewsInListMode)
+ ) {
previews.push('' + this.getDetailPreview(name, type, id) + '
');
continue;
}
diff --git a/client/src/views/fields/file.js b/client/src/views/fields/file.js
index f67b655c4d..16e155924e 100644
--- a/client/src/views/fields/file.js
+++ b/client/src/views/fields/file.js
@@ -153,6 +153,8 @@ Espo.define('views/fields/file', 'views/fields/link', function (Dep) {
this.typeName = this.name + 'Type';
this.foreignScope = 'Attachment';
+ this.previewSize = this.options.previewSize || this.params.previewSize || this.previewSize;
+
var sourceDefs = this.getMetadata().get(['clientDefs', 'Attachment', 'sourceDefs']) || {};
this.sourceList = Espo.Utils.clone(this.params.sourceList || []).filter(function (item) {
@@ -181,6 +183,11 @@ Espo.define('views/fields/file', 'views/fields/link', function (Dep) {
this.acceptAttribue = this.accept.join('|');
}
+ this.once('remove', function () {
+ if (this.resizeIsBeingListened) {
+ $(window).off('resize.' + this.cid);
+ }
+ }.bind(this));
},
afterRender: function () {
@@ -219,6 +226,21 @@ Espo.define('views/fields/file', 'views/fields/link', function (Dep) {
var type = this.$el.find('select.search-type').val();
this.handleSearchType(type);
}
+
+ if (this.mode === 'detail') {
+ if (this.previewSize === 'large') {
+ this.handleResize();
+ this.resizeIsBeingListened = true;
+ $(window).on('resize.' + this.cid, function () {
+ this.handleResize();
+ }.bind(this));
+ }
+ }
+ },
+
+ handleResize: function () {
+ var width = this.$el.width();
+ this.$el.find('img.image-preview').css('maxWidth', width + 'px');
},
getDetailPreview: function (name, type, id) {
@@ -229,7 +251,7 @@ Espo.define('views/fields/file', 'views/fields/link', function (Dep) {
case 'image/png':
case 'image/jpeg':
case 'image/gif':
- preview = '
';
+ preview = '
';
}
return preview;
},
diff --git a/client/src/views/fields/image.js b/client/src/views/fields/image.js
index 088302a020..bb7e21b4d8 100644
--- a/client/src/views/fields/image.js
+++ b/client/src/views/fields/image.js
@@ -38,16 +38,7 @@ Espo.define('views/fields/image', 'views/fields/file', function (Dep) {
defaultType: 'image/jpeg',
- previewSize: 'small',
-
- setup: function () {
- Dep.prototype.setup.call(this);
-
- if ('previewSize' in this.params && this.params.previewSize) {
- this.previewSize = this.params.previewSize;
- }
- }
+ previewSize: 'small'
});
});
-
diff --git a/client/src/views/fields/link-multiple.js b/client/src/views/fields/link-multiple.js
index d097211838..3dccfccedd 100644
--- a/client/src/views/fields/link-multiple.js
+++ b/client/src/views/fields/link-multiple.js
@@ -126,7 +126,9 @@ Espo.define('views/fields/link-multiple', 'views/fields/base', function (Dep) {
boolFilterList: this.getSelectBoolFilterList(),
primaryFilterName: this.getSelectPrimaryFilterName(),
multiple: true,
- createAttributes: (this.mode === 'edit') ? this.getCreateAttributes() : null
+ createAttributes: (this.mode === 'edit') ? this.getCreateAttributes() : null,
+ mandatorySelectAttributeList: this.mandatorySelectAttributeList,
+ forceSelectAllAttributes: this.forceSelectAllAttributes
}, function (dialog) {
dialog.render();
self.notify(false);
diff --git a/client/src/views/fields/link-parent.js b/client/src/views/fields/link-parent.js
index bbed73e8e8..f40202c525 100644
--- a/client/src/views/fields/link-parent.js
+++ b/client/src/views/fields/link-parent.js
@@ -133,7 +133,9 @@ Espo.define('views/fields/link-parent', 'views/fields/base', function (Dep) {
filters: this.getSelectFilters(),
boolFilterList: this.getSelectBoolFilterList(),
primaryFilterName: this.getSelectPrimaryFilterName(),
- createAttributes: (this.mode === 'edit') ? this.getCreateAttributes() : null
+ createAttributes: (this.mode === 'edit') ? this.getCreateAttributes() : null,
+ mandatorySelectAttributeList: this.getMandatorySelectAttributeList(),
+ forceSelectAllAttributes: this.isForceSelectAllAttributes()
}, function (dialog) {
dialog.render();
Espo.Ui.notify(false);
@@ -181,6 +183,14 @@ Espo.define('views/fields/link-parent', 'views/fields/base', function (Dep) {
this.trigger('change');
},
+ getMandatorySelectAttributeList: function () {
+ this.mandatorySelectAttributeList;
+ },
+
+ isForceSelectAllAttributes: function () {
+ this.forceSelectAllAttributes;
+ },
+
getAutocompleteUrl: function () {
var url = this.foreignScope + '?sortBy=name&maxCount=' + this.AUTOCOMPLETE_RESULT_MAX_COUNT;
var boolList = this.getSelectBoolFilterList();
diff --git a/client/src/views/fields/link.js b/client/src/views/fields/link.js
index bd63946ebe..025bacafb1 100644
--- a/client/src/views/fields/link.js
+++ b/client/src/views/fields/link.js
@@ -116,7 +116,9 @@ Espo.define('views/fields/link', 'views/fields/base', function (Dep) {
filters: this.getSelectFilters(),
boolFilterList: this.getSelectBoolFilterList(),
primaryFilterName: this.getSelectPrimaryFilterName(),
- createAttributes: (this.mode === 'edit') ? this.getCreateAttributes() : null
+ createAttributes: (this.mode === 'edit') ? this.getCreateAttributes() : null,
+ mandatorySelectAttributeList: this.mandatorySelectAttributeList,
+ forceSelectAllAttributes: this.forceSelectAllAttributes
}, function (view) {
view.render();
this.notify(false);
diff --git a/client/src/views/global-search/panel.js b/client/src/views/global-search/panel.js
index 3f517becbf..22c1bcb48b 100644
--- a/client/src/views/global-search/panel.js
+++ b/client/src/views/global-search/panel.js
@@ -32,8 +32,14 @@ Espo.define('views/global-search/panel', 'view', function (Dep) {
template: 'global-search/panel',
- afterRender: function () {
+ setup: function () {
+ this.maxSize = this.getConfig().get('globalSearchMaxSize') || 10;
+ this.navbarPanelHeightSpace = this.getThemeManager().getParam('navbarPanelHeightSpace') || 100;
+ this.navbarPanelBodyMaxHeight = this.getThemeManager().getParam('navbarPanelBodyMaxHeight') || 600;
+ },
+
+ afterRender: function () {
this.listenToOnce(this.collection, 'sync', function () {
this.createView('list', 'views/record/list-expanded', {
el: this.options.el + ' .list-container',
@@ -46,7 +52,7 @@ Espo.define('views/global-search/panel', 'view', function (Dep) {
view: 'views/global-search/name-field',
params: {
containerEl: this.options.el
- },
+ }
}
]
],
@@ -59,12 +65,18 @@ Espo.define('views/global-search/panel', 'view', function (Dep) {
}, function (view) {
view.render();
});
- }.bind(this));
- this.collection.maxSize = this.getConfig().get('recordsPerPageSmall') || 10;
+ }, this);
+
+ this.collection.reset();
+ this.collection.maxSize = this.maxSize;
this.collection.fetch();
+
+ var windowHeight = $(window).height();
+ if (windowHeight - this.navbarPanelBodyMaxHeight < this.navbarPanelHeightSpace) {
+ var maxHeight = windowHeight - this.navbarPanelHeightSpace;
+ this.$el.find('> .panel > .panel-body').css('maxHeight', maxHeight + 'px');
+ }
}
});
-
});
-
diff --git a/client/src/views/modals/image-preview.js b/client/src/views/modals/image-preview.js
index 9e6aed9883..0d9f194ee5 100644
--- a/client/src/views/modals/image-preview.js
+++ b/client/src/views/modals/image-preview.js
@@ -55,6 +55,10 @@ Espo.define('views/modals/image-preview', 'views/modal', function (Dep) {
this.navigationEnabled = (this.options.imageList && this.options.imageList.length > 1);
this.imageList = this.options.imageList || [];
+
+ this.once('remove', function () {
+ $(window).off('resize.image-review');
+ }, this);
},
getImageUrl: function () {
@@ -90,7 +94,8 @@ Espo.define('views/modals/image-preview', 'views/modal', function (Dep) {
$img.css('maxWidth', width);
}.bind(this);
- $(window).on('resize', function () {
+ $(window).off('resize.image-review');
+ $(window).on('resize.image-review', function () {
manageSize();
});
diff --git a/client/src/views/modals/select-records.js b/client/src/views/modals/select-records.js
index 885d45463e..1bfc0b2aac 100644
--- a/client/src/views/modals/select-records.js
+++ b/client/src/views/modals/select-records.js
@@ -225,15 +225,33 @@ Espo.define('views/modals/select-records', ['views/modal', 'search-manager'], fu
}, this);
}
- view.getSelectAttributeList(function (selectAttributeList) {
- if (selectAttributeList) {
- this.collection.data.select = selectAttributeList.join(',');
- }
+ if (this.options.forceSelectAllAttributes || this.forceSelectAllAttributes) {
this.listenToOnce(view, 'after:build-rows', function () {
this.wait(false);
}, this);
this.collection.fetch();
- }.bind(this));
+ } else {
+ view.getSelectAttributeList(function (selectAttributeList) {
+ if (!~selectAttributeList.indexOf('name')) {
+ selectAttributeList.push('name');
+ }
+
+ var mandatorySelectAttributeList = this.options.mandatorySelectAttributeList || this.mandatorySelectAttributeList || [];
+ mandatorySelectAttributeList.forEach(function (attribute) {
+ if (!~selectAttributeList.indexOf(attribute)) {
+ selectAttributeList.push(attribute);
+ }
+ }, this);
+
+ if (selectAttributeList) {
+ this.collection.data.select = selectAttributeList.join(',');
+ }
+ this.listenToOnce(view, 'after:build-rows', function () {
+ this.wait(false);
+ }, this);
+ this.collection.fetch();
+ }.bind(this));
+ }
});
},
diff --git a/client/src/views/notification/fields/container.js b/client/src/views/notification/fields/container.js
index de104df0e5..6676d0b6f5 100644
--- a/client/src/views/notification/fields/container.js
+++ b/client/src/views/notification/fields/container.js
@@ -72,6 +72,7 @@ Espo.define('views/notification/fields/container', 'views/fields/base', function
isUserStream: true,
el: this.params.containerEl + ' li[data-id="' + this.model.id + '"]',
onlyContent: true,
+ isNotification: true
});
this.wait(false);
}, this);
@@ -88,6 +89,7 @@ Espo.define('views/notification/fields/container', 'views/fields/base', function
isUserStream: true,
el: this.params.containerEl + ' li[data-id="' + this.model.id + '"]',
onlyContent: true,
+ isNotification: true
});
this.wait(false);
}, this);
diff --git a/client/src/views/notification/panel.js b/client/src/views/notification/panel.js
index be815655be..24c6c18d7e 100644
--- a/client/src/views/notification/panel.js
+++ b/client/src/views/notification/panel.js
@@ -51,9 +51,12 @@ Espo.define('views/notification/panel', 'view', function (Dep) {
this.wait(true);
this.getCollectionFactory().create('Notification', function (collection) {
this.collection = collection;
- collection.maxSize = 5;
+ collection.maxSize = this.getConfig().get('notificationsMaxSize') || 5;
this.wait(false);
}, this);
+
+ this.navbarPanelHeightSpace = this.getThemeManager().getParam('navbarPanelHeightSpace') || 100;
+ this.navbarPanelBodyMaxHeight = this.getThemeManager().getParam('navbarPanelBodyMaxHeight') || 600;
},
afterRender: function () {
@@ -71,7 +74,7 @@ Espo.define('views/notification/panel', 'view', function (Dep) {
view: 'views/notification/fields/container',
params: {
containerEl: this.options.el
- },
+ }
}
]
],
@@ -86,8 +89,13 @@ Espo.define('views/notification/panel', 'view', function (Dep) {
});
}, this);
this.collection.fetch();
+
+ var windowHeight = $(window).height();
+ if (windowHeight - this.navbarPanelBodyMaxHeight < this.navbarPanelHeightSpace) {
+ var maxHeight = windowHeight - this.navbarPanelHeightSpace;
+ this.$el.find('> .panel > .panel-body').css('maxHeight', maxHeight + 'px');
+ }
}
});
-
});
diff --git a/client/src/views/portal-user/list.js b/client/src/views/portal-user/list.js
index 15fdbafc8f..02f7aa1c58 100644
--- a/client/src/views/portal-user/list.js
+++ b/client/src/views/portal-user/list.js
@@ -42,7 +42,18 @@ Espo.define('views/portal-user/list', 'views/list', function (Dep) {
this.createView('modal', viewName, {
scope: 'Contact',
primaryFilterName: 'notPortalUsers',
- createButton: false
+ createButton: false,
+ mandatorySelectAttributeList: [
+ 'salutationName',
+ 'firstName',
+ 'lastName',
+ 'accountName',
+ 'accountId',
+ 'emailAddress',
+ 'emailAddressData',
+ 'phoneNumber',
+ 'phoneNumberData'
+ ]
}, function (view) {
view.render();
diff --git a/client/src/views/stream/fields/attachment-multiple.js b/client/src/views/stream/fields/attachment-multiple.js
index e422e1eeff..4064f6f7f6 100644
--- a/client/src/views/stream/fields/attachment-multiple.js
+++ b/client/src/views/stream/fields/attachment-multiple.js
@@ -30,7 +30,9 @@ Espo.define('views/stream/fields/attachment-multiple', 'views/fields/attachment-
return Dep.extend({
- showPreviews: true
+ showPreviews: true,
+
+ showPreviewsInListMode: true,
});
diff --git a/client/src/views/stream/note.js b/client/src/views/stream/note.js
index eec88c601e..e944a10689 100644
--- a/client/src/views/stream/note.js
+++ b/client/src/views/stream/note.js
@@ -118,9 +118,9 @@ Espo.define('views/stream/note', 'view', function (Dep) {
return string;
},
- createField: function (name, type, params, view) {
+ createField: function (name, type, params, view, options) {
type = type || this.model.getFieldType(name) || 'base';
- this.createView(name, view || this.getFieldManager().getViewName(type), {
+ var o = {
model: this.model,
defs: {
name: name,
@@ -128,7 +128,13 @@ Espo.define('views/stream/note', 'view', function (Dep) {
},
el: this.options.el + ' .cell-' + name,
mode: 'list'
- });
+ };
+ if (options) {
+ for (var i in options) {
+ o[i] = options[i];
+ }
+ }
+ this.createView(name, view || this.getFieldManager().getViewName(type), o);
},
isMale: function () {
diff --git a/client/src/views/stream/notes/mention-in-post.js b/client/src/views/stream/notes/mention-in-post.js
index 35b47ed853..2c225a14ca 100644
--- a/client/src/views/stream/notes/mention-in-post.js
+++ b/client/src/views/stream/notes/mention-in-post.js
@@ -46,7 +46,9 @@ Espo.define('views/stream/notes/mention-in-post', 'views/stream/note', function
this.createField('post', null, null, 'views/stream/fields/post');
}
if ((this.model.get('attachmentsIds') || []).length) {
- this.createField('attachments', 'attachmentMultiple', {}, 'views/stream/fields/attachment-multiple');
+ this.createField('attachments', 'attachmentMultiple', {}, 'views/stream/fields/attachment-multiple', {
+ previewSize: this.options.isNotification ? 'small' : null
+ });
}
var data = this.model.get('data');
diff --git a/client/src/views/stream/notes/post.js b/client/src/views/stream/notes/post.js
index 0c047c59bc..083d425030 100644
--- a/client/src/views/stream/notes/post.js
+++ b/client/src/views/stream/notes/post.js
@@ -49,7 +49,9 @@ Espo.define('views/stream/notes/post', 'views/stream/note', function (Dep) {
setup: function () {
this.createField('post', null, null, 'views/stream/fields/post');
- this.createField('attachments', 'attachmentMultiple', {}, 'views/stream/fields/attachment-multiple');
+ this.createField('attachments', 'attachmentMultiple', {}, 'views/stream/fields/attachment-multiple', {
+ previewSize: this.options.isNotification ? 'small' : 'medium'
+ });
this.isInternal = this.model.get('isInternal');
diff --git a/composer.json b/composer.json
index b10c75811d..ee796a83dc 100644
--- a/composer.json
+++ b/composer.json
@@ -13,6 +13,7 @@
"ext-mbstring": "*",
"ext-xml": "*",
"ext-curl": "*",
+ "ext-exif": "*",
"doctrine/dbal": "2.*",
"slim/slim": "2.6.2",
"mtdowling/cron-expression": "1.0.*",
diff --git a/frontend/less/espo-vertical/layout.less b/frontend/less/espo-vertical/layout.less
index df2a7fc80a..25a0e89cbc 100644
--- a/frontend/less/espo-vertical/layout.less
+++ b/frontend/less/espo-vertical/layout.less
@@ -356,9 +356,9 @@ body > #header .navbar-brand span.home-icon {
}
@media (min-width: @screen-lg-min) {
- .container {
- max-width: 1580px;
- }
+ .container {
+ max-width: @container-max-width;
+ }
}
diff --git a/frontend/less/espo/custom.less b/frontend/less/espo/custom.less
index 3c637e0b5d..c43988dda7 100644
--- a/frontend/less/espo/custom.less
+++ b/frontend/less/espo/custom.less
@@ -557,7 +557,8 @@ ul.dropdown-menu > li.checkbox:last-child {
margin-top: 1px;
}
-.field .link-container > .list-group-item.link-with-role a {
+.field .link-container > .list-group-item.link-with-role > a,
+.field .link-container > .list-group-item.link-with-role > div > a {
margin-top: 6px;
}
diff --git a/frontend/less/espo/layout.less b/frontend/less/espo/layout.less
index 327607f5cf..440542dafa 100644
--- a/frontend/less/espo/layout.less
+++ b/frontend/less/espo/layout.less
@@ -123,7 +123,7 @@ body > #header .navbar-brand span.home-icon {
}
@media (min-width: @screen-lg-min) {
- .container {
- max-width: 1366px;
- }
+ .container {
+ max-width: @container-max-width;
+ }
}
diff --git a/frontend/less/espo/variables.less b/frontend/less/espo/variables.less
index 464766efe7..050d0fd481 100644
--- a/frontend/less/espo/variables.less
+++ b/frontend/less/espo/variables.less
@@ -137,10 +137,12 @@
@panel-border-width: 2px;
-@navbar-panel-body-max-height: 350px;
+@navbar-panel-body-max-height: 600px;
@form-group-margin-bottom: 12px;
@modal-title-line-height: floor(@font-size-h4 * @line-height-base);
@navbar-color-border-width: 4px;
+
+@container-max-width: 1800px;
diff --git a/install/core/config.php b/install/core/config.php
index 2ced280f56..623bf421f6 100644
--- a/install/core/config.php
+++ b/install/core/config.php
@@ -27,43 +27,33 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-return array(
-
+return [
'apiPath' => '/api/v1',
-
- 'requirements' => array(
+ 'requirements' => [
'phpVersion' => '5.6',
-
- 'phpRequires' => array(
- 'JSON',
+ 'phpRequires' => [
+ 'json',
'openssl',
- 'pdo_mysql'
- ),
-
- 'phpRecommendations' => array(
+ 'pdo_mysql',
+ 'mbstring',
'zip',
'gd',
- 'mbstring',
+ ],
+ 'phpRecommendations' => [
'curl',
'xml',
+ 'exif',
'max_execution_time' => 180,
'max_input_time' => 180,
'memory_limit' => '256M',
'post_max_size' => '20M',
'upload_max_filesize' => '20M',
- ),
-
+ ],
'mysqlVersion' => '5.5.3',
- 'mysqlRequires' => array(
-
- ),
-
- 'mysqlRecommendations' => array(
-
- ),
- ),
-
- 'rewriteRules' => array(
+ 'mysqlRequires' => [],
+ 'mysqlRecommendations' => [],
+ ],
+ 'rewriteRules' => [
'APACHE1' => 'a2enmod rewrite
service apache2 restart',
'APACHE2' => '<Directory /PATH_TO_ESPO/>
@@ -131,10 +121,9 @@ service apache2 restart',
deny all;
}
}',
- ),
+ ],
'blog' => 'http://blog.espocrm.com',
'twitter' => 'https://twitter.com/espocrm',
'forum' => 'http://forum.espocrm.com',
-
-);
\ No newline at end of file
+];
\ No newline at end of file
diff --git a/install/core/tpl/main.tpl b/install/core/tpl/main.tpl
index e1b6b055bd..ca031568a6 100644
--- a/install/core/tpl/main.tpl
+++ b/install/core/tpl/main.tpl
@@ -12,7 +12,7 @@
-
+
-