Merge branch 'hotfix/4.0.4'

This commit is contained in:
yuri
2016-03-16 12:49:17 +02:00
5 changed files with 32 additions and 21 deletions
+3 -1
View File
@@ -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) {}
}
}
+3 -3
View File
@@ -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',
+3
View File
@@ -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)
+18 -17
View File
@@ -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') {
+5
View File
@@ -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());