Compare commits

...

19 Commits

Author SHA1 Message Date
Yuri Kuznetsov 0a2c79ba81 version 2014-09-11 18:17:15 +03:00
Yuri Kuznetsov 5360ba0147 fix dutch 2014-09-11 18:14:30 +03:00
Yuri Kuznetsov 6620254d00 fix lang 2014-09-11 18:12:27 +03:00
Yuri Kuznetsov f6eb0bcce8 Merge branch 'hotfix/2.5.2' of ssh://172.20.0.1/var/git/espo/backend into hotfix/2.5.2 2014-09-11 18:06:10 +03:00
Yuri Kuznetsov c1116ff5dc fix email account 2014-09-11 18:05:58 +03:00
Taras Machyshyn 7dcdfcd231 DBAL fixed changing column length 2014-09-11 15:20:18 +03:00
Taras Machyshyn 0eadb9af69 log filename if invalid json file 2014-09-11 14:07:12 +03:00
Yuri Kuznetsov 3c3518b857 fix global search panel 2014-09-10 11:19:14 +03:00
Yuri Kuznetsov f3ab0a734c css 2014-09-09 15:11:01 +03:00
Yuri Kuznetsov 33adc67dee version 2014-09-09 15:06:12 +03:00
Yuri Kuznetsov 18e475e1b6 fix clear cache 2014-09-09 15:05:18 +03:00
Yuri Kuznetsov 438c0f7edd upgrade full calendar 2014-09-09 12:20:56 +03:00
Yuri Kuznetsov 3159c9d288 libs to metadata 2014-09-09 11:50:11 +03:00
Yuri Kuznetsov fe0f93784b fix lib loader 2014-09-09 11:21:54 +03:00
Yuri Kuznetsov 2d237eae29 remove isHtml dependency 2014-09-09 11:14:29 +03:00
Yuri Kuznetsov 747aa2d882 dashlet ch 2014-09-09 11:07:24 +03:00
Yuri Kuznetsov 46a7119ce1 month names in sales by month dashlet 2014-09-09 11:00:19 +03:00
Yuri Kuznetsov c18342694f change max resolution 2014-09-09 10:54:02 +03:00
Yuri Kuznetsov bb47b70f31 fix tooltip 2014-09-09 10:48:02 +03:00
32 changed files with 1123 additions and 666 deletions
@@ -34,7 +34,7 @@ class GlobalSearch extends \Espo\Core\Controllers\Base
$offset = $request->get('offset');
$maxSize = $request->get('maxSize');
return $this->getService('GlobalSearch')->find($query, $offset);
return $this->getService('GlobalSearch')->find($query, $offset, $maxSize);
}
}
+4 -3
View File
@@ -121,8 +121,9 @@ class DataManager
*/
public function updateCacheTimestamp()
{
return $this->getContainer()->get('config')->updateCacheTimestamp();
$this->getContainer()->get('config')->updateCacheTimestamp();
$this->getContainer()->get('config')->save();
return true;
}
}
}
+2 -2
View File
@@ -319,7 +319,7 @@ abstract class Base
$manifestPath = Util::concatPath($upgradePath, $this->manifestName);
if (!file_exists($manifestPath)) {
throw new Error('It\'s not an uprgade package.');
throw new Error('It\'s not an upgrade package.');
}
$manifestJson = $this->getFileManager()->getContents($manifestPath);
@@ -390,4 +390,4 @@ abstract class Base
}
}
}
@@ -18,15 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
************************************************************************/
namespace Espo\Core\Utils\Database\DBAL\FieldTypes;
use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\BooleanType;
class Bool extends Type
class Bool extends BooleanType
{
const BOOL = 'bool';
@@ -39,27 +37,4 @@ class Bool extends Type
{
return 'TINYINT';
}
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
{
return $platform->getBooleanTypeDeclarationSQL($fieldDeclaration);
}
public function convertToDatabaseValue($value, AbstractPlatform $platform)
{
return $platform->convertBooleans($value);
}
public function convertToPHPValue($value, AbstractPlatform $platform)
{
return (null === $value) ? null : (bool) $value;
}
public function getBindingType()
{
return \PDO::PARAM_BOOL;
}
}
@@ -18,38 +18,18 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
************************************************************************/
namespace Espo\Core\Utils\Database\DBAL\FieldTypes;
use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\IntegerType;
class Int extends Type
class Int extends IntegerType
{
const INTtype = 'int';
public function getName()
{
return self::INTtype;
}
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
{
return $platform->getIntegerTypeDeclarationSQL($fieldDeclaration);
}
public function convertToPHPValue($value, AbstractPlatform $platform)
{
return (null === $value) ? null : (int) $value;
}
public function getBindingType()
{
return \PDO::PARAM_INT;
}
}
@@ -18,14 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
************************************************************************/
namespace Espo\Core\Utils\Database\DBAL\FieldTypes;
use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\StringType;
class Password extends Type
class Password extends StringType
{
const PASSWORD = 'password';
@@ -38,23 +37,5 @@ class Password extends Type
{
return 'VARCHAR';
}
public function getSqlDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
{
return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration);
//return "MD5";
}
/*public function convertToPHPValue($value, AbstractPlatform $platform)
{
return $value;
}
public function convertToDatabaseValue($value, AbstractPlatform $platform)
{
return $value;
} */
}
@@ -18,15 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
************************************************************************/
namespace Espo\Core\Utils\Database\DBAL\FieldTypes;
use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\StringType;
class Varchar extends Type
class Varchar extends StringType
{
const VARCHAR = 'varchar';
@@ -34,16 +32,4 @@ class Varchar extends Type
{
return self::VARCHAR;
}
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
{
return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration);
//return 'varchar';
}
public function getDefaultLength(AbstractPlatform $platform)
{
return $platform->getVarcharDefaultLength();
}
}
+12 -23
View File
@@ -101,8 +101,8 @@ class Unifier
$dirName = $this->getFileManager()->getDirName($dirPath, false);
$defaultValues = $this->loadDefaultValues($dirName, $type);
$content= array();
$unsets= array();
$content = array();
$unsets = array();
foreach($fileList as $dirName => $fileName) {
if (is_array($fileName)) { /*get content from files in a sub directory*/
@@ -125,7 +125,7 @@ class Unifier
}
//unset content
$content= Utils\Util::unsetInArray($content, $unsets);
$content = Utils\Util::unsetInArray($content, $unsets);
//END: unset content
return $content;
@@ -141,27 +141,16 @@ class Unifier
*/
protected function unifyGetContents($paths, $defaults)
{
$fileContent= $this->getFileManager()->getContents($paths);
$decoded= Utils\Json::getArrayData($fileContent);
$fileContent = $this->getFileManager()->getContents($paths);
if (empty($decoded) && !is_array($decoded)) {
$GLOBALS['log']->emergency('Syntax error or empty file - '.Utils\Util::concatPath($folderPath, $fileName));
} else {
//Default values
if (is_string($defaults) && !empty($defaults)) {
$defType= $defaults;
unset($defaults);
$name= $this->getFileManager()->getFileName($fileName, '.json');
$decoded = Utils\Json::getArrayData($fileContent, null);
$defaults= $this->loadDefaultValues($name, $defType);
}
$mergedValues= Utils\Util::merge($defaults, $decoded);
//END: Default values
return $mergedValues;
if (!isset($decoded)) {
$GLOBALS['log']->emergency('Syntax error in '.Utils\Util::concatPath($paths));
return array();
}
return array();
return $decoded;
}
/**
@@ -174,10 +163,10 @@ class Unifier
*/
protected function loadDefaultValues($name, $type='metadata')
{
$defaultPath= $this->params['defaultsPath'];
$defaultPath = $this->params['defaultsPath'];
$defaultValue= $this->getFileManager()->getContents( array($defaultPath, $type, $name.'.json') );
if ($defaultValue!==false) {
$defaultValue = $this->getFileManager()->getContents( array($defaultPath, $type, $name.'.json') );
if ($defaultValue !== false) {
//return default array
return Utils\Json::decode($defaultValue, true);
}
+2 -2
View File
@@ -118,7 +118,7 @@ class Json
*
* @return array
*/
public static function getArrayData($data)
public static function getArrayData($data, $returns = array())
{
if (is_array($data)) {
return $data;
@@ -127,7 +127,7 @@ class Json
return static::decode($data, true);
}
return array();
return $returns;
}
@@ -2,7 +2,7 @@
"labels": {
"Converted To": "Vertaald naar",
"Create Lead": "Grote Lead",
"Convert": "Vertaald"
"Convert": "Converteer"
},
"fields": {
"name": "Record Naam",
@@ -29,7 +29,7 @@
"New": "Nieuw",
"Assigned": "Toegewezen",
"In Process": "In Behandeling",
"Converted": "Vertaald",
"Converted": "Converteren",
"Recycled": "Opnieuw verwerkt",
"Dead": "Dood"
},
@@ -0,0 +1,7 @@
{
"FullCalendar": {
"path": "client/modules/crm/lib/fullcalendar.min.js",
"exportsTo": "$",
"exportsAs": "fullCalendar"
}
}
@@ -95,7 +95,7 @@
"thousandSeparatorEqualsDecimalMark": "Thousand separator can not be same as decimal mark",
"userHasNoEmailAddress": "User has not email address.",
"selectEntityType": "Select entity type in the left menu.",
"selectUpgradePackage": "Select uprade package",
"selectUpgradePackage": "Select upgrade package",
"selectLayout": "Select needed layout in the left menu and edit it."
},
"descriptions": {
@@ -0,0 +1,12 @@
{
"Flotr": {
"path": "client/lib/flotr2.min.js",
"exportsTo": "window",
"exportsAs": "Flotr"
},
"Summernote": {
"path": "client/lib/summernote.min.js",
"exportsTo": "$",
"exportsAs": "summernote"
}
}
@@ -78,6 +78,16 @@ class EmailAccount extends Record
return $foldersArr;
}
public function createEntity($data)
{
$entity = parent::createEntity($data);
if ($entity) {
$entity->set('assignedUserId', $this->getUser()->id);
$this->getEntityManager()->saveEntity($entity);
}
return $entity;
}
public function fetchFromMailServer(Entity $emailAccount)
{
if ($emailAccount->get('status') != 'Active') {
+5 -3
View File
@@ -58,10 +58,12 @@ class GlobalSearch extends \Espo\Core\Services\Base
return $this->injections['metadata'];
}
public function find($query, $offset)
public function find($query, $offset, $maxSize)
{
$entityNameList = $this->getConfig()->get('globalSearchEntityList');
$entityTypeCount = count($entityNameList);
$list = array();
$count = 0;
$total = 0;
@@ -78,8 +80,8 @@ class GlobalSearch extends \Espo\Core\Services\Base
'name*' => '%' . $query . '%',
)
),
'offset' => $offset,
'limit' => 5,
'offset' => round($offset / $entityTypeCount),
'limit' => round($maxSize / $entityTypeCount),
'orderBy' => 'createdAt',
'order' => 'DESC',
);
-7
View File
@@ -1,7 +0,0 @@
{
"Flotr": {
"path": "client/lib/flotr2.min.js",
"exportsTo": "window",
"exportsAs": "Flotr"
}
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+24 -2
View File
@@ -6,9 +6,26 @@
margin: 10px 0 0;
}
.fc-event-vert .fc-event-bg {
.fc-time-grid-event .fc-bg {
opacity: 0;
}
.fc-state-default.fc-corner-left {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.fc-state-default.fc-corner-right {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.fc-event {
border-radius: 0;
background-color: none !important;
opacity: 0 !important;
}
.dashlet-body div.calendar {
@@ -17,6 +34,11 @@
margin-bottom: -15px;
margin-top: -15px;
}
.fc-event {
min-height: 19px;
}
.fc-day-grid-event .fc-time {
font-weight: normal;
}
File diff suppressed because it is too large Load Diff
@@ -1,5 +1,5 @@
/*!
* FullCalendar v1.6.4 Print Stylesheet
* FullCalendar v2.1.1 Print Stylesheet
* Docs & License: http://arshaw.com/fullcalendar/
* (c) 2013 Adam Shaw
*/
@@ -9,24 +9,193 @@
* When including this stylesheet, use the media='print' attribute of the <link> tag.
* Make sure to include this stylesheet IN ADDITION to the regular fullcalendar.css.
*/
/* Events
-----------------------------------------------------*/
.fc {
max-width: 100% !important;
}
/* Global Event Restyling
--------------------------------------------------------------------------------------------------*/
.fc-event {
background: #fff !important;
color: #000 !important;
}
/* for vertical events */
.fc-event-bg {
page-break-inside: avoid;
}
.fc-event .fc-resizer {
display: none;
}
/* Table & Day-Row Restyling
--------------------------------------------------------------------------------------------------*/
th,
td,
hr,
thead,
tbody,
.fc-row {
border-color: #ccc !important;
background: #fff !important;
}
/* kill the overlaid, absolutely-positioned common components */
.fc-bg,
.fc-highlight-skeleton,
.fc-helper-skeleton {
display: none;
}
/* don't force a min-height on rows (for DayGrid) */
.fc tbody .fc-row {
height: auto !important; /* undo height that JS set in distributeHeight */
min-height: 0 !important; /* undo the min-height from each view's specific stylesheet */
}
.fc tbody .fc-row .fc-content-skeleton {
position: static; /* undo .fc-rigid */
padding-bottom: 0 !important; /* use a more border-friendly method for this... */
}
.fc tbody .fc-row .fc-content-skeleton tbody tr:last-child td { /* only works in newer browsers */
padding-bottom: 1em; /* ...gives space within the skeleton. also ensures min height in a way */
}
.fc tbody .fc-row .fc-content-skeleton table {
/* provides a min-height for the row, but only effective for IE, which exaggerates this value,
making it look more like 3em. for other browers, it will already be this tall */
height: 1em;
}
/* Undo month-view event limiting. Display all events and hide the "more" links
--------------------------------------------------------------------------------------------------*/
.fc-more-cell,
.fc-more {
display: none !important;
}
.fc-event .ui-resizable-handle {
display: none !important;
}
}
.fc tr.fc-limited {
display: table-row !important;
}
.fc td.fc-limited {
display: table-cell !important;
}
.fc-popover {
display: none; /* never display the "more.." popover in print mode */
}
/* TimeGrid Restyling
--------------------------------------------------------------------------------------------------*/
/* undo the min-height 100% trick used to fill the container's height */
.fc-time-grid {
min-height: 0 !important;
}
/* don't display the side axis at all ("all-day" and time cells) */
.fc-agenda-view .fc-axis {
display: none;
}
/* don't display the horizontal lines */
.fc-slats,
.fc-time-grid hr { /* this hr is used when height is underused and needs to be filled */
display: none !important; /* important overrides inline declaration */
}
/* let the container that holds the events be naturally positioned and create real height */
.fc-time-grid .fc-content-skeleton {
position: static;
}
/* in case there are no events, we still want some height */
.fc-time-grid .fc-content-skeleton table {
height: 4em;
}
/* kill the horizontal spacing made by the event container. event margins will be done below */
.fc-time-grid .fc-event-container {
margin: 0 !important;
}
/* TimeGrid *Event* Restyling
--------------------------------------------------------------------------------------------------*/
/* naturally position events, vertically stacking them */
.fc-time-grid .fc-event {
position: static !important;
margin: 3px 2px !important;
}
/* for events that continue to a future day, give the bottom border back */
.fc-time-grid .fc-event.fc-not-end {
border-bottom-width: 1px !important;
}
/* indicate the event continues via "..." text */
.fc-time-grid .fc-event.fc-not-end:after {
content: "...";
}
/* for events that are continuations from previous days, give the top border back */
.fc-time-grid .fc-event.fc-not-start {
border-top-width: 1px !important;
}
/* indicate the event is a continuation via "..." text */
.fc-time-grid .fc-event.fc-not-start:before {
content: "...";
}
/* time */
/* undo a previous declaration and let the time text span to a second line */
.fc-time-grid .fc-event .fc-time {
white-space: normal !important;
}
/* hide the the time that is normally displayed... */
.fc-time-grid .fc-event .fc-time span {
display: none;
}
/* ...replace it with a more verbose version (includes AM/PM) stored in an html attribute */
.fc-time-grid .fc-event .fc-time:after {
content: attr(data-full);
}
/* Vertical Scroller & Containers
--------------------------------------------------------------------------------------------------*/
/* kill the scrollbars and allow natural height */
.fc-scroller,
.fc-day-grid-container, /* these divs might be assigned height, which we need to cleared */
.fc-time-grid-container { /* */
overflow: visible !important;
height: auto !important;
}
/* kill the horizontal border/padding used to compensate for scrollbars */
.fc-row {
border: 0 !important;
margin: 0 !important;
}
/* Button Controls
--------------------------------------------------------------------------------------------------*/
.fc-button-group,
.fc button {
display: none; /* don't display any button-related controls */
}
File diff suppressed because one or more lines are too long
@@ -19,7 +19,7 @@
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
Espo.define('Crm:Views.Calendar.Calendar', 'View', function (Dep) {
Espo.define('Crm:Views.Calendar.Calendar', ['View', 'lib!FullCalendar'], function (Dep, FullCalendar) {
return Dep.extend({
@@ -55,17 +55,6 @@ Espo.define('Crm:Views.Calendar.Calendar', 'View', function (Dep) {
};
},
init: function () {
if (!('fullCalendar' in $)) {
this.addReadyCondition(function () {
return ('fullCalendar' in $);
});
Espo.loadLib('client/modules/crm/lib/fullcalendar.min.js', function () {
this.tryReady();
}.bind(this));
}
},
events: {
'click button[data-action="prev"]': function () {
this.$calendar.fullCalendar('prev');
@@ -59,6 +59,8 @@ Espo.define('Crm:Views.Dashlets.OpportunitiesByStage', 'Crm:Views.Dashlets.Abstr
});
}
this.stageList = [];
var data = [];
var i = 0;
d.forEach(function (item) {
@@ -66,6 +68,7 @@ Espo.define('Crm:Views.Dashlets.OpportunitiesByStage', 'Crm:Views.Dashlets.Abstr
data: [[item.value, d.length - i]],
label: this.getLanguage().translateOption(item.stage, 'stage', 'Opportunity'),
});
this.stageList.push(this.getLanguage().translateOption(item.stage, 'stage', 'Opportunity'));
i++;
}, this);
@@ -107,6 +110,7 @@ Espo.define('Crm:Views.Dashlets.OpportunitiesByStage', 'Crm:Views.Dashlets.Abstr
mouse: {
track: true,
relative: true,
position: 's',
trackFormatter: function (obj) {
return self.formatNumber(obj.x) + ' ' + self.currency;
},
@@ -117,8 +117,8 @@ Espo.define('Crm:Views.Dashlets.SalesByMonth', 'Crm:Views.Dashlets.Abstract.Char
tickFormatter: function (value) {
if (value % 1 == 0) {
var i = parseInt(value);
if (i in self.months) {
return self.months[i];
if (i in self.months) {
return moment(self.months[i] + '-01').format('MMM YYYY');
}
}
return '';
+5 -3
View File
@@ -74,12 +74,11 @@ Espo.App = function (options, callback) {
var countLoaded = 0;
var manageCallback = function () {
countLoaded++;
if (countLoaded == 2) {
if (countLoaded == 1) {
callback.call(this, this);
}
}.bind(this);
this.loader.loadLibsConfig(manageCallback);
this._preLoad(manageCallback);
}
@@ -128,7 +127,10 @@ _.extend(Espo.App.prototype, {
this.settings.defs = this.metadata.get('entityDefs.Settings');
this.user.defs = this.metadata.get('entityDefs.User');
this.preferences.defs = this.metadata.get('entityDefs.Preferences');
this.preferences.defs = this.metadata.get('entityDefs.Preferences');
this.loader.addLibsConfig(this.metadata.get('app.jsLibs') || {});
this._initRouter();
}.bind(this));
+13 -7
View File
@@ -28,6 +28,8 @@
this._loadCallbacks = {};
this.pathsBeingLoaded = {};
this.libsConfig = {};
}
_.extend(Espo.Loader.prototype, {
@@ -140,11 +142,7 @@
this._loadCallbacks[name].push(callback);
},
dataLoaded: {},
libUrls: {
'Flotr': 'client/modules/crm/lib/flotr2.min.js'
},
dataLoaded: {},
load: function (name, callback, error) {
var dataType, type, path, fetchObject;
@@ -167,9 +165,13 @@
}
fetchObject = function (name, d) {
var from = Espo.Libs;
var from = root;
if (exportsTo == 'window') {
from = root;
} else {
exportsTo.split('.').forEach(function (item) {
from = from[item];
});
}
if (exportsAs in from) {
return from[exportsAs];
@@ -318,7 +320,11 @@
callback();
}.bind(this)
});
}
},
addLibsConfig: function (data) {
this.libsConfig = _.extend(this.libsConfig, data);
},
});
Espo.loader = new Espo.Loader();
+1 -1
View File
@@ -213,7 +213,7 @@ Espo.define('Views.Fields.Base', 'View', function (Dep) {
placement: 'bottom',
container: 'body',
content: this.translate(this.name, 'tooltips', this.model.name),
trigger: 'click focus',
trigger: 'click',
}).on('shown.bs.popover', function () {
$('body').one('click', function () {
$a.popover('hide');
+5 -14
View File
@@ -19,7 +19,7 @@
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
Espo.define('Views.Fields.Wysiwyg', 'Views.Fields.Text', function (Dep) {
Espo.define('Views.Fields.Wysiwyg', ['Views.Fields.Text', 'lib!Summernote'], function (Dep, Summernote) {
return Dep.extend({
@@ -30,16 +30,7 @@ Espo.define('Views.Fields.Wysiwyg', 'Views.Fields.Text', function (Dep) {
editTemplate: 'fields.wysiwyg.edit',
setup: function () {
Dep.prototype.setup.call(this);
if (!('summernote' in $)) {
this.addReadyCondition(function () {
return ('summernote' in $);
});
Espo.loadLib('client/lib/summernote.min.js', function () {
this.tryReady();
}.bind(this));
}
Dep.prototype.setup.call(this);
this.listenTo(this.model, 'change:isHtml', function (model) {
if (!model.has('isHtml') || model.get('isHtml')) {
@@ -64,13 +55,13 @@ Espo.define('Views.Fields.Wysiwyg', 'Views.Fields.Text', function (Dep) {
}
if (this.mode == 'edit') {
if (this.model.has('isHtml') && this.model.get('isHtml')) {
if (!this.model.has('isHtml') || this.model.get('isHtml')) {
this.enableWysiwygMode();
}
}
if (this.mode == 'detail') {
if (this.model.has('isHtml') && this.model.get('isHtml')) {
if (!this.model.has('isHtml') || this.model.get('isHtml')) {
this.$el.find('iframe').removeClass('hidden');
var iframe = this.$el.find('iframe').get(0);
var document = iframe.contentWindow.document;
@@ -143,7 +134,7 @@ Espo.define('Views.Fields.Wysiwyg', 'Views.Fields.Text', function (Dep) {
fetch: function () {
var data = {};
if (this.model.has('isHtml') && this.model.get('isHtml')) {
if (!this.model.has('isHtml') || this.model.get('isHtml')) {
data[this.name] = this.$element.code();
} else {
data[this.name] = this.$element.val();
@@ -42,7 +42,6 @@ Espo.define('Views.GlobalSearch.GlobalSearch', 'View', function (Dep) {
this.wait(true);
this.getCollectionFactory().create('GlobalSearch', function (collection) {
this.collection = collection;
collection.maxSize = 5;
collection.name = 'GlobalSearch';
this.wait(false);
}, this);
@@ -77,12 +76,12 @@ Espo.define('Views.GlobalSearch.GlobalSearch', 'View', function (Dep) {
$document = $(document);
$document.on('mouseup.global-search', function (e) {
if (e.target.tagName == 'A') {
if (e.target.tagName == 'A' && $(e.target).data('action') != 'showMore') {
setTimeout(function () {
this.closePanel();
}.bind(this), 100);
return;
}
}
if (!$container.is(e.target) && $container.has(e.target).length === 0) {
this.closePanel();
}
@@ -52,7 +52,8 @@ Espo.define('Views.GlobalSearch.Panel', 'View', function (Dep) {
}, function (view) {
view.render();
});
}.bind(this));
}.bind(this));
this.collection.maxLength = 10;
this.collection.fetch();
},
+6 -1
View File
@@ -102,7 +102,7 @@ table.table > thead th {
@media (min-width: @screen-lg-min) {
.container {
max-width: 1280px;
max-width: 1366px;
}
}
@@ -571,6 +571,11 @@ body > footer > p a:visited {
overflow-x: hidden !important;
}
#global-search-panel > .panel > .panel-body {
max-height: 294px;
overflow-y: auto;
overflow-x: hidden;
}
#notifications-panel > .panel > .panel-body {
max-height: 294px;
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "espocrm",
"version": "2.5.0",
"version": "2.5.2",
"description": "",
"main": "index.php",
"repository": "",