Compare commits

...

10 Commits
3.7.2 ... 3.7.3

Author SHA1 Message Date
yuri
d04f72cfd8 vers 2015-10-19 16:14:44 +03:00
yuri
a9203b8e22 fix global search 2015-10-19 16:13:52 +03:00
yuri
e89c7c9328 email filter improvement 2015-10-19 15:36:22 +03:00
yuri
7808865080 import csv label 2015-10-19 15:27:09 +03:00
yuri
404e2de3b6 fix email isRead 2015-10-16 17:19:51 +03:00
yuri
f02dabc540 industry list 2015-10-16 13:50:42 +03:00
yuri
c29da46a97 fix client side access denied 2015-10-16 13:07:37 +03:00
yuri
b7702d2418 order fields in entity manager 2015-10-16 12:40:15 +03:00
yuri
2bc56db4c6 fix edit view link to detail 2015-10-16 12:33:59 +03:00
yuri
dd0ef5455e fix 2015-10-16 10:40:45 +03:00
16 changed files with 43 additions and 17 deletions

View File

@@ -36,7 +36,7 @@ class FiltersMatcher
{
foreach ($filterList as $filter) {
if ($filter->get('from')) {
if (strtolower($filter->get('from')) === strtolower($email->get('from'))) {
if ($this->matchString(strtolower($filter->get('from')), strtolower($email->get('from')))) {
return true;
}
}
@@ -44,7 +44,7 @@ class FiltersMatcher
if ($email->get('to')) {
$toArr = explode(';', $email->get('to'));
foreach ($toArr as $to) {
if (strtolower($to) === strtolower($filter->get('to'))) {
if ($this->matchString(strtolower($filter->get('to')), strtolower($to))) {
return true;
}
}

View File

@@ -795,7 +795,7 @@ class Base
foreach ($fieldList as $field) {
if (
strlen($item['value']) >= self::MIN_LENGTH_FOR_CONTENT_SEARCH
strlen($textFilter) >= self::MIN_LENGTH_FOR_CONTENT_SEARCH
&&
!empty($fieldDefs[$field]['type']) && $fieldDefs[$field]['type'] == 'text'
) {

View File

@@ -40,6 +40,7 @@
"Automotive": "Automotive",
"Banking": "Banking",
"Biotechnology": "Biotechnology",
"Building Materials & Equipment": "Building Materials & Equipment",
"Chemical": "Chemical",
"Computer": "Computer",
"Education": "Education",

View File

@@ -30,6 +30,7 @@
"Automotive",
"Banking",
"Biotechnology",
"Building Materials & Equipment",
"Chemical",
"Computer",
"Education",
@@ -47,7 +48,7 @@
"Real Estate",
"Service",
"Sports",
"Sofware",
"Software",
"Technology",
"Telecommunications",
"Television",

View File

@@ -18,7 +18,8 @@
"Create Only": "Nur erstellen",
"Create and Update": "Erstellen und aktualisieren",
"Update Only": "Nur aktualisieren",
"Update by": "Aktualisieren durch"
"Update by": "Aktualisieren durch",
"File (CSV)": "Datei (CSV)"
},
"messages": {
"utf8": "Sollte UTF-8 kodiert sein",

View File

@@ -12,8 +12,8 @@
"name": "Just a name of the filter.",
"subject": "Use wildcard *:\n\ntext* - starts with text,\n*text* - contains text,\n*text - ends with text.",
"bodyContains": "Body of email contains any of specified words or phrases.",
"from": "Emails being sent from the specified address. Leave empty if not needed.",
"to": "Emails being sent to the specified address. Leave empty if not needed.",
"from": "Emails being sent from the specified address. Leave empty if not needed. You can use wildcard *.",
"to": "Emails being sent to the specified address. Leave empty if not needed. You can use wildcard *.",
"parent": "Leave it empty to apply this filter globally (to all incoming emails)."
}
}

View File

@@ -18,7 +18,8 @@
"Create Only": "Create Only",
"Create and Update": "Create & Update",
"Update Only": "Update Only",
"Update by": "Update by"
"Update by": "Update by",
"File (CSV)": "File (CSV)"
},
"messages": {
"utf8": "Should be UTF-8 encoded",

View File

@@ -9,12 +9,14 @@
"from": {
"type": "varchar",
"maxLength": 255,
"tooltip": true
"tooltip": true,
"trim": true
},
"to": {
"type": "varchar",
"maxLength": 255,
"tooltip": true
"tooltip": true,
"trim": true
},
"subject": {
"type": "varchar",

View File

@@ -13,7 +13,7 @@
</select>
</div>
<div class="col-sm-4 form-group">
<label class="control-label">{{translate 'File' scope='Import'}}</label>
<label class="control-label">{{translate 'File (CSV)' scope='Import'}}</label>
<div>
<input type="file" id="import-file">
</div>

View File

@@ -152,7 +152,7 @@ Espo.define('controller', [], function () {
handleAccessGlobal: function () {
if (!this.checkAccessGlobal()) {
throw new Espo.Exceptions.AccessDenied("Denied access to action '" + this.name + "#" + action + "'");
throw new Espo.Exceptions.AccessDenied("Denied access to '" + this.name + "'");
}
},

View File

@@ -142,7 +142,9 @@ Espo.define('views/admin/entity-manager/modals/edit-entity', ['views/modal', 'mo
return false;
}
return true;
}, this);
}, this).sort(function (v1, v2) {
return this.translate(v1, 'fields', scope).localeCompare(this.translate(v2, 'fields', scope));
}.bind(this));
var translatedOptions = {};
orderableFieldList.forEach(function (item) {

View File

@@ -67,7 +67,7 @@ Espo.define('views/edit', 'views/main', function (Dep) {
if (this.options.noHeaderLinks) {
arr.push(name);
} else {
arr.push('<a href="#' + this.model.name + '/view/' + this.model.id + '" class="action" data-action="navigateToRoot">' + name + '</a>');
arr.push('<a href="#' + this.model.name + '/view/' + this.model.id + '" class="action">' + name + '</a>');
}
}
return this.buildHeaderHtml(arr);

View File

@@ -58,7 +58,7 @@ Espo.define('views/email/record/detail', 'views/record/detail', function (Dep) {
if (!this.model.get('isRead')) {
this.model.set({
isRead: true
}, {silent: true});
});
}
}, this);

View File

@@ -57,7 +57,7 @@ Espo.define('views/global-search/global-search', 'view', function (Dep) {
runSearch: function (text) {
var text = this.$input.val();
if (text != '' && text.length > 2) {
text = encodeURI(text);
text = text;
this.search(text);
}
},

View File

@@ -1,6 +1,6 @@
{
"name": "espocrm",
"version": "3.7.2",
"version": "3.7.3",
"description": "",
"main": "index.php",
"repository": {

View File

@@ -89,6 +89,15 @@ class FiltersMatcherTest extends \PHPUnit_Framework_TestCase
$filterList = [$filter];
$this->assertTrue($this->object->match($email, $filterList));
$email = new \Espo\Entities\Email($this->emailDefs);
$email->set('from', 'test@tester');
$filter = new \Espo\Entities\EmailFilter($this->filterDefs);
$filter->set(array(
'from' => '*@tester'
));
$filterList = [$filter];
$this->assertTrue($this->object->match($email, $filterList));
$email->set('from', 'test@tester');
$email->set('to', 'test@tester;baraka@tester');
$filter = new \Espo\Entities\EmailFilter($this->filterDefs);
@@ -98,6 +107,15 @@ class FiltersMatcherTest extends \PHPUnit_Framework_TestCase
$filterList = [$filter];
$this->assertTrue($this->object->match($email, $filterList));
$email->set('from', 'test@tester');
$email->set('to', 'test@tester;baraka@man');
$filter = new \Espo\Entities\EmailFilter($this->filterDefs);
$filter->set(array(
'to' => '*@tester'
));
$filterList = [$filter];
$this->assertTrue($this->object->match($email, $filterList));
$email->set('subject', 'test hello man');
$filter = new \Espo\Entities\EmailFilter($this->filterDefs);
$filter->set(array(