This commit is contained in:
yuri
2019-02-08 14:11:20 +02:00
8 changed files with 30 additions and 19 deletions
@@ -118,6 +118,6 @@ class SumRelatedType extends \Espo\Core\Formula\Functions\Base
return 0;
}
return $rowList[0]['SUM:' . $field];
return floatval($rowList[0]['SUM:' . $field]);
}
}
@@ -1,4 +1,4 @@
<?php
<?php
/************************************************************************
* This file is part of EspoCRM.
*
@@ -50,7 +50,7 @@ class DivisionType extends \Espo\Core\Formula\Functions\Base
$result = $this->evaluate($item->value[0]);
$part = $this->evaluate($item->value[1]);
if (!is_float($part) && !is_int($part)) {
$part = intval($part);
$part = floatval($part);
}
$result /= $part;
@@ -1,4 +1,4 @@
<?php
<?php
/************************************************************************
* This file is part of EspoCRM.
*
@@ -48,7 +48,7 @@ class ModuloType extends \Espo\Core\Formula\Functions\Base
$part = $this->evaluate($subItem);
if (!is_float($part) && !is_int($part)) {
$part = intval($part);
$part = floatval($part);
}
$result %= $part;
@@ -1,4 +1,4 @@
<?php
<?php
/************************************************************************
* This file is part of EspoCRM.
*
@@ -49,7 +49,7 @@ class MultiplicationType extends \Espo\Core\Formula\Functions\Base
$part = $this->evaluate($subItem);
if (!is_float($part) && !is_int($part)) {
$part = intval($part);
$part = floatval($part);
}
$result *= $part;
@@ -1,4 +1,4 @@
<?php
<?php
/************************************************************************
* This file is part of EspoCRM.
*
@@ -50,7 +50,7 @@ class SubtractionType extends \Espo\Core\Formula\Functions\Base
$result = $this->evaluate($item->value[0]);
$part = $this->evaluate($item->value[1]);
if (!is_float($part) && !is_int($part)) {
$part = intval($part);
$part = floatval($part);
}
$result -= $part;
@@ -1,4 +1,4 @@
<?php
<?php
/************************************************************************
* This file is part of EspoCRM.
*
@@ -48,7 +48,7 @@ class SummationType extends \Espo\Core\Formula\Functions\Base
$part = $this->evaluate($subItem);
if (!is_float($part) && !is_int($part)) {
$part = intval($part);
$part = floatval($part);
}
$result += $part;
+8 -1
View File
@@ -5156,7 +5156,7 @@ Flotr.addPlugin('hit', {
x: (this.plotWidth)/2,
y: (this.plotHeight)/2
},
radius = (Math.min(this.canvasWidth, this.canvasHeight) * s.pie.sizeRatio) / 2,
radius = (Math.min(this.canvasWidth, this.canvasHeight) * s.pie.sizeRatio), // EspoCRM fix line
bisection = n.sAngle<n.eAngle ? (n.sAngle + n.eAngle) / 2: (n.sAngle + n.eAngle + 2* Math.PI) / 2;
pos += 'bottom:' + (m - top - center.y - Math.sin(bisection) * radius/2 + this.canvasHeight) + 'px;top:auto;';
@@ -5173,6 +5173,13 @@ Flotr.addPlugin('hit', {
p = 'e';
}
}
if (n.mouse.autoPositionVertical) {
if (n.yaxis.d2p(n.y) > this.plotHeight * 2 / 3) {
p = 'n';
} else {
p = 's';
}
}
// EspoCRM fix end
pos += 'top:';
+11 -7
View File
@@ -406,6 +406,8 @@ Espo.define('views/record/list', 'view', function (Dep) {
selectAllResult: function () {
this.allResultIsChecked = true;
this.hideActions();
this.$el.find('input.record-checkbox').prop('checked', true).attr('disabled', 'disabled');
this.$el.find('input.select-all').prop('checked', true);
@@ -905,6 +907,7 @@ Espo.define('views/record/list', 'view', function (Dep) {
this.checkAllResultMassActionList = checkAllResultMassActionList;
(this.getMetadata().get(['clientDefs', this.scope, 'checkAllResultMassActionList']) || []).forEach(function (item) {
if (this.collection.url !== this.entityType) return;
if (~this.massActionList.indexOf(item)) {
var defs = this.getMetadata().get(['clientDefs', this.scope, 'massActionDefs', item]) || {};
var acl = defs.acl;
@@ -954,23 +957,24 @@ Espo.define('views/record/list', 'view', function (Dep) {
this.addMassAction('printPdf');
}
if (this.options.unlinkMassAction && this.collection) {
this.addMassAction('unlink', false, true);
}
if (this.collection.url !== this.entityType) {
this.removeAllResultMassAction('massUpdate');
this.removeAllResultMassAction('remove');
this.removeAllResultMassAction('export');
}
this.setupMassActionItems();
if (this.getUser().isAdmin() && this.collection.url == this.entityType) {
if (this.getUser().isAdmin()) {
if (this.getMetadata().get(['formula', this.entityType, 'beforeSaveCustomScript'])) {
this.addMassAction('recalculateFormula', true);
}
}
this.setupMassActionItems();
if (this.collection.url !== this.entityType) {
Espo.Utils.clone(this.checkAllResultMassActionList).forEach(function (item) {
this.removeAllResultMassAction(item);
}, this);
}
Espo.Utils.clone(this.massActionList).forEach(function (item) {
var propName = 'massAction' + Espo.Utils.upperCaseFirst(item) + 'Disabled';