Merge branch 'hotfix/5.5.7'

This commit is contained in:
yuri
2019-02-11 10:59:03 +02:00
36 changed files with 64 additions and 86 deletions
+2 -2
View File
@@ -224,7 +224,7 @@ class Note extends Record
if ($link === 'teams' || $link === 'users') {
throw new Forbidden();
}
return parant::link($id, $link, $foreignId);
return parent::link($id, $link, $foreignId);
}
public function unlink($id, $link, $foreignId)
@@ -232,7 +232,7 @@ class Note extends Record
if ($link === 'teams' || $link === 'users') {
throw new Forbidden();
}
return parant::unlink($id, $link, $foreignId);
return parent::unlink($id, $link, $foreignId);
}
public function processNoteAclJob($data)
@@ -166,7 +166,7 @@ Espo.define('crm:views/calendar/modals/edit', 'views/modals/edit', function (Dep
Dep.prototype.setup.call(this);
if (!this.id) {
this.header = this.translate('Create', 'labels', 'Calendar');
this.headerHtml = this.translate('Create', 'labels', 'Calendar');
}
if (this.id) {
@@ -40,7 +40,7 @@ Espo.define('crm:views/campaign/modals/mail-merge-pdf', ['views/modal', 'model']
setup: function () {
Dep.prototype.setup.call(this);
this.header = this.translate('Generate Mail Merge PDF', 'labels', 'Campaign');
this.headerHtml = this.translate('Generate Mail Merge PDF', 'labels', 'Campaign');
var linkList = ['contacts', 'leads', 'accounts', 'users'];
this.linkList = [];
linkList.forEach(function (link) {
@@ -36,7 +36,7 @@ Espo.define('crm:views/mass-email/modals/send-test', ['views/modal', 'model'], f
setup: function () {
Dep.prototype.setup.call(this);
this.header = this.translate('Send Test', 'labels', 'MassEmail');
this.headerHtml = this.translate('Send Test', 'labels', 'MassEmail');
var model = new Model();
@@ -64,7 +64,7 @@ Espo.define('views/email-folder/modals/select-folder', 'views/modal', function (
],
setup: function () {
this.header = '';
this.headerHtml = '';
this.wait(true);
this.getCollectionFactory().create('EmailFolder', function (collection) {
@@ -79,5 +79,3 @@ Espo.define('views/email-folder/modals/select-folder', 'views/modal', function (
},
});
});
+1 -2
View File
@@ -41,7 +41,7 @@ Espo.define('views/email/modals/body-plain', 'views/modal', function (Dep) {
'label': 'Close'
});
this.header = Handlebars.Utils.escapeExpression(this.model.get('name'));
this.headerHtml = Handlebars.Utils.escapeExpression(this.model.get('name'));
this.createView('bodyPlain', 'views/fields/text', {
el: this.options.el + ' .field[data-name="bodyPlain"]',
@@ -58,4 +58,3 @@ Espo.define('views/email/modals/body-plain', 'views/modal', function (Dep) {
});
});
-1
View File
@@ -54,4 +54,3 @@ Espo.define('views/email/modals/detail', ['views/modals/detail', 'views/email/de
});
});
+3
View File
@@ -370,6 +370,9 @@ Espo.define('views/fields/wysiwyg', ['views/fields/text', 'lib!Summernote'], fun
this.trigger('change')
}.bind(this),
},
onCreateLink: function (link) {
return link;
},
toolbar: this.toolbar,
buttons: this.buttons
};
+6 -1
View File
@@ -36,6 +36,8 @@ Espo.define('views/modal', 'view', function (Dep) {
header: false,
headerHtml: null,
dialog: null,
containerSelector: null,
@@ -68,6 +70,7 @@ Espo.define('views/modal', 'view', function (Dep) {
var containerSelector = this.containerSelector = '#' + id;
this.header = this.options.header || this.header;
this.headerHtml = this.options.headerHtml || this.headerHtml;
this.options = this.options || {};
@@ -127,9 +130,11 @@ Espo.define('views/modal', 'view', function (Dep) {
modalBodyDiffHeight = this.getThemeManager().getParam('modalBodyDiffHeight');
}
var headerHtml = this.headerHtml || this.header;
this.dialog = new Espo.Ui.Dialog({
backdrop: this.backdrop,
header: this.header,
header: headerHtml,
container: containerSelector,
body: '',
buttons: buttonListExt,
+2 -5
View File
@@ -30,8 +30,6 @@ Espo.define('views/modals/action-history', ['views/modal', 'search-manager'], fu
return Dep.extend({
header: false,
scope: 'ActionHistoryRecord',
className: 'dialog dialog-record',
@@ -52,8 +50,8 @@ Espo.define('views/modals/action-history', ['views/modal', 'search-manager'], fu
this.scope = this.entityType = this.options.scope || this.scope;
this.header = this.getLanguage().translate(this.scope, 'scopeNamesPlural');
this.header = '<a href="#ActionHistoryRecord" class="action" data-action="listView">' + this.header + '</a>';
this.headerHtml = this.getLanguage().translate(this.scope, 'scopeNamesPlural');
this.headerHtml = '<a href="#ActionHistoryRecord" class="action" data-action="listView">' + this.headerHtml + '</a>';
this.waitForView('list');
@@ -111,4 +109,3 @@ Espo.define('views/modals/action-history', ['views/modal', 'search-manager'], fu
},
});
});
+1 -3
View File
@@ -59,7 +59,7 @@ Espo.define('views/modals/add-dashlet', 'views/modal', function (Dep) {
],
setup: function () {
this.header = this.translate('Add Dashlet');
this.headerHtml = this.translate('Add Dashlet');
var dashletList = Object.keys(this.getMetadata().get('dashlets') || {}).sort(function (v1, v2) {
return this.translate(v1, 'dashlets').localeCompare(this.translate(v2, 'dashlets'));
@@ -85,5 +85,3 @@ Espo.define('views/modals/add-dashlet', 'views/modal', function (Dep) {
},
});
});
@@ -63,4 +63,3 @@ Espo.define('views/modals/array-field-add', 'views/modal', function (Dep) {
});
});
+1 -1
View File
@@ -47,7 +47,7 @@ Espo.define('views/modals/change-password', 'views/modal', function (Dep) {
}
];
this.header = this.translate('Change Password', 'labels', 'User');
this.headerHtml = this.translate('Change Password', 'labels', 'User');
this.wait(true);
+1 -1
View File
@@ -54,7 +54,7 @@ Espo.define('views/modals/compose-email', 'views/modals/edit', function (Dep) {
style: 'primary'
});
this.header = this.getLanguage().translate('Compose Email');
this.headerHtml = this.getLanguage().translate('Compose Email');
if (
this.getConfig().get('emailForceUseExternalClient') ||
+5 -7
View File
@@ -32,8 +32,6 @@ Espo.define('views/modals/detail', 'views/modal', function (Dep) {
cssName: 'detail-modal',
header: false,
template: 'modals/detail',
editDisabled: false,
@@ -209,19 +207,19 @@ Espo.define('views/modals/detail', 'views/modal', function (Dep) {
var model = this.model;
var scope = this.getScope();
this.header = '';
this.headerHtml = '';
var iconHtml = this.getHelper().getScopeColorIconHtml(this.scope);
this.header += this.getLanguage().translate(scope, 'scopeNames');
this.headerHtml += this.getLanguage().translate(scope, 'scopeNames');
if (model.get('name')) {
this.header += ' &raquo; ' + Handlebars.Utils.escapeExpression(model.get('name'));
this.headerHtml += ' &raquo; ' + Handlebars.Utils.escapeExpression(model.get('name'));
}
if (!this.fullFormDisabled) {
this.header = '<a href="#' + scope + '/view/' + this.id+'" class="action" title="'+this.translate('Full Form')+'" data-action="fullForm">' + this.header + '</a>';
this.headerHtml = '<a href="#' + scope + '/view/' + this.id+'" class="action" title="'+this.translate('Full Form')+'" data-action="fullForm">' + this.headerHtml + '</a>';
}
this.header = iconHtml + this.header;
this.headerHtml = iconHtml + this.headerHtml;
if (!this.editDisabled) {
var editAccess = this.getAcl().check(model, 'edit', true);
-3
View File
@@ -32,8 +32,6 @@ Espo.define('views/modals/duplicate', 'views/modal', function (Dep) {
cssName: 'duplicate-modal',
header: false,
template: 'modals/duplicate',
data: function () {
@@ -65,4 +63,3 @@ Espo.define('views/modals/duplicate', 'views/modal', function (Dep) {
});
});
+1 -1
View File
@@ -88,7 +88,7 @@ Espo.define('views/modals/edit-dashboard', ['views/modal', 'model'], function (D
model: model
});
this.header = this.translate('Edit Dashboard');
this.headerHtml = this.translate('Edit Dashboard');
this.dashboardLayout = this.options.dashboardLayout;
},
+6 -8
View File
@@ -32,8 +32,6 @@ Espo.define('views/modals/edit', 'views/modal', function (Dep) {
cssName: 'edit-modal',
header: false,
template: 'modals/edit',
saveDisabled: false,
@@ -95,22 +93,22 @@ Espo.define('views/modals/edit', 'views/modal', function (Dep) {
this.id = this.options.id;
if (!this.id) {
this.header = this.getLanguage().translate('Create ' + this.scope, 'labels', this.scope);
this.headerHtml = this.getLanguage().translate('Create ' + this.scope, 'labels', this.scope);
} else {
this.header = this.getLanguage().translate('Edit');
this.header += ': ' + this.getLanguage().translate(this.scope, 'scopeNames');
this.headerHtml = this.getLanguage().translate('Edit');
this.headerHtml += ': ' + this.getLanguage().translate(this.scope, 'scopeNames');
}
if (!this.fullFormDisabled) {
if (!this.id) {
this.header = '<a href="#' + this.scope + '/create" class="action" title="'+this.translate('Full Form')+'" data-action="fullForm">' + this.header + '</a>';
this.headerHtml = '<a href="#' + this.scope + '/create" class="action" title="'+this.translate('Full Form')+'" data-action="fullForm">' + this.headerHtml + '</a>';
} else {
this.header = '<a href="#' + this.scope + '/edit/' + this.id+'" class="action" title="'+this.translate('Full Form')+'" data-action="fullForm">' + this.header + '</a>';
this.headerHtml = '<a href="#' + this.scope + '/edit/' + this.id+'" class="action" title="'+this.translate('Full Form')+'" data-action="fullForm">' + this.headerHtml + '</a>';
}
}
var iconHtml = this.getHelper().getScopeColorIconHtml(this.scope);
this.header = iconHtml + this.header;
this.headerHtml = iconHtml + this.headerHtml;
this.sourceModel = this.model;
-2
View File
@@ -44,8 +44,6 @@ Espo.define('views/modals/image-crop', ['views/modal', 'lib!Cropper'], function
},
setup: function () {
this.header = null;
this.buttonList = [
{
name: 'crop',
+1 -3
View File
@@ -32,8 +32,6 @@ Espo.define('views/modals/image-preview', ['views/modal', 'lib!exif'], function
cssName: 'image-preview',
header: true,
template: 'modals/image-preview',
size: '',
@@ -61,7 +59,7 @@ Espo.define('views/modals/image-preview', ['views/modal', 'lib!exif'], function
setup: function () {
this.buttonList = [];
this.header = '&nbsp;';
this.headerHtml = '&nbsp;';
this.navigationEnabled = (this.options.imageList && this.options.imageList.length > 1);
+4 -4
View File
@@ -51,12 +51,12 @@ Espo.define('views/modals/kanban-move-over', 'views/modal', function (Dep) {
this.statusField = this.options.statusField;
this.header = '';
this.header += this.getLanguage().translate(this.scope, 'scopeNames');
this.headerHtml = '';
this.headerHtml += this.getLanguage().translate(this.scope, 'scopeNames');
if (this.model.get('name')) {
this.header += ' &raquo; ' + Handlebars.Utils.escapeExpression(this.model.get('name'));
this.headerHtml += ' &raquo; ' + Handlebars.Utils.escapeExpression(this.model.get('name'));
}
this.header = iconHtml + this.header;
this.headerHtml = iconHtml + this.headerHtml;
this.buttonList = [
{
+2 -2
View File
@@ -56,8 +56,8 @@ Espo.define('views/modals/last-viewed', ['views/modal', 'search-manager'], funct
}
];
this.header = this.getLanguage().translate('LastViewed', 'scopeNamesPlural');
this.header = '<a href="#LastViewed" class="action" data-action="listView">' + this.header + '</a>';
this.headerHtml = this.getLanguage().translate('LastViewed', 'scopeNamesPlural');
this.headerHtml = '<a href="#LastViewed" class="action" data-action="listView">' + this.headerHtml + '</a>';
this.waitForView('list');
@@ -47,7 +47,7 @@ Espo.define('views/modals/mass-convert-currency', ['views/modal', 'model'], func
],
setup: function () {
this.header = this.translate(this.options.entityType, 'scopeNamesPlural') + ' &raquo ' + this.translate('convertCurrency', 'massActions');
this.headerHtml = this.translate(this.options.entityType, 'scopeNamesPlural') + ' &raquo ' + this.translate('convertCurrency', 'massActions');
this.addButton({
name: 'convert',
text: this.translate('Update'),
+1 -3
View File
@@ -32,8 +32,6 @@ Espo.define('views/modals/mass-update', 'views/modal', function (Dep) {
cssName: 'mass-update',
header: false,
template: 'modals/mass-update',
data: function () {
@@ -76,7 +74,7 @@ Espo.define('views/modals/mass-update', 'views/modal', function (Dep) {
this.selectData = this.options.selectData;
this.byWhere = this.options.byWhere;
this.header = this.translate(this.scope, 'scopeNamesPlural') + ' &raquo ' + this.translate('Mass Update');
this.headerHtml = this.translate(this.scope, 'scopeNamesPlural') + ' &raquo ' + this.translate('Mass Update');
this.wait(true);
this.getModelFactory().create(this.scope, function (model) {
@@ -48,7 +48,7 @@ Espo.define('views/modals/password-change-request', 'views/modal', function (Dep
}
];
this.header = this.translate('Password Change Request', 'labels', 'User');
this.headerHtml = this.translate('Password Change Request', 'labels', 'User');
},
actionSubmit: function () {
+7 -7
View File
@@ -150,13 +150,13 @@ Espo.define('views/modals/related-list', ['views/modal', 'search-manager'], func
});
}
this.header = '';
this.headerHtml = '';
var iconHtml = this.getHelper().getScopeColorIconHtml(this.scope);
if (this.model) {
this.header += Handlebars.Utils.escapeExpression(this.model.get('name'));
if (this.header) {
this.header += ' &raquo ';
this.headerHtml += Handlebars.Utils.escapeExpression(this.model.get('name'));
if (this.headerHtml) {
this.headerHtml += ' &raquo ';
}
}
@@ -165,13 +165,13 @@ Espo.define('views/modals/related-list', ['views/modal', 'search-manager'], func
title = Handlebars.Utils.escapeExpression(this.options.title);
title = title.replace(/&amp;raquo/, '&raquo;');
}
this.header += title || this.getLanguage().translate(this.link, 'links', this.model.name);
this.headerHtml += title || this.getLanguage().translate(this.link, 'links', this.model.name);
if (this.options.listViewUrl) {
this.header = '<a href="'+this.options.listViewUrl+'">'+this.header+'</a>';
this.headerHtml = '<a href="'+this.options.listViewUrl+'">'+this.headerHtml+'</a>';
}
this.header = iconHtml + this.header;
this.headerHtml = iconHtml + this.headerHtml;
this.waitForView('list');
if (this.searchPanel) {
+1 -1
View File
@@ -54,7 +54,7 @@ Espo.define('views/modals/save-filters', ['views/modal', 'model'], function (Dep
}
];
this.header = this.translate('Save Filters');
this.headerHtml = this.translate('Save Filters');
var model = new Model();
this.createView('name', 'views/fields/varchar', {
@@ -76,11 +76,11 @@ Espo.define('views/modals/select-category-tree-records', 'views/modals/select-re
this.scope = this.options.scope;
this.header = '';
this.headerHtml = '';
var iconHtml = this.getHelper().getScopeColorIconHtml(this.scope);
this.header += this.translate('Select') + ': ';
this.header += this.getLanguage().translate(this.scope, 'scopeNamesPlural');
this.header = iconHtml + this.header;
this.headerHtml += this.translate('Select') + ': ';
this.headerHtml += this.getLanguage().translate(this.scope, 'scopeNamesPlural');
this.headerHtml = iconHtml + this.headerHtml;
this.waitForView('list');
+4 -4
View File
@@ -128,11 +128,11 @@ Espo.define('views/modals/select-records', ['views/modal', 'search-manager'], fu
}
}
this.header = '';
this.headerHtml = '';
var iconHtml = this.getHelper().getScopeColorIconHtml(this.scope);
this.header += this.translate('Select') + ': ';
this.header += this.getLanguage().translate(this.scope, 'scopeNamesPlural');
this.header = iconHtml + this.header;
this.headerHtml += this.translate('Select') + ': ';
this.headerHtml += this.getLanguage().translate(this.scope, 'scopeNamesPlural');
this.headerHtml = iconHtml + this.headerHtml;
this.waitForView('list');
if (this.searchPanel) {
@@ -32,8 +32,6 @@ Espo.define('views/modals/select-template', ['views/modals/select-records', 'sea
multiple: false,
header: false,
createButton: false,
searchPanel: false,
@@ -58,4 +56,3 @@ Espo.define('views/modals/select-template', ['views/modals/select-records', 'sea
}
});
});
-2
View File
@@ -34,5 +34,3 @@ Espo.define('views/note/modals/edit', 'views/modals/edit', function (Dep) {
});
});
@@ -46,8 +46,8 @@ Espo.define('views/personal-data/modals/personal-data', ['views/modal'], functio
}
];
this.header = this.getLanguage().translate('Personal Data');
this.header += ': ' + Handlebars.Utils.escapeExpression(this.model.get('name'));
this.headerHtml = this.getLanguage().translate('Personal Data');
this.headerHtml += ': ' + Handlebars.Utils.escapeExpression(this.model.get('name'));
if (this.getAcl().check(this.model, 'edit')) {
this.buttonList.unshift({
+1 -1
View File
@@ -55,7 +55,7 @@ Espo.define('views/role/modals/add-field', 'views/modal', function (Dep) {
},
setup: function () {
this.header = this.translate('Add Field');
this.headerHtml = this.translate('Add Field');
var scope = this.scope = this.options.scope;
@@ -33,7 +33,7 @@ Espo.define('views/stream/modals/create-post', 'views/modal', function (Dep) {
_template: '<div class="record">{{{record}}}</div>',
setup: function () {
this.header = this.translate('Create Post');
this.headerHtml = this.translate('Create Post');
this.buttonList = [
{
+1 -2
View File
@@ -89,9 +89,8 @@ Espo.define('views/user/modals/access', 'views/modal', function (Dep) {
final: true
});
this.header = this.translate('Access');
this.headerHtml = this.translate('Access');
}
});
});
-1
View File
@@ -39,4 +39,3 @@ Espo.define('views/user/modals/detail', 'views/modals/detail', function (Dep) {
});
});